Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Issue with setRecordComponentPosition(EmbeddedPosition.WITHIN)

    Hello,

    I am using smartgwtpower-6.0p (SmartClient Version: v11.0p_2016-11-25/PowerEdition Deployment (built 2016-11-25)).

    There is an issue when setRecordComponentPosition is set to EmbeddedPosition.WITHIN. I have a record list and when i add a new record at a certain position ( addAt(newRecord, index)), instead of sliding the records, the new record is displayed over the next one ( this one is only partially slid).
    If i resize the window and put it back to full screen, the records are correctly displayed.

    This is the code that i am using to create the ListGrid:
    Code:
    ​    public EditedCopyPane(Record editedCopyRecord) {
            
            // turn off column headers
            this.setShowHeader(false);
            // store the provided record
            this.editedCopyRecord = editedCopyRecord;
    
            // build the toolstrip that's displayed at the top of the grid/pane
            final ToolStrip toolStrip = createToolStrip();
            
            ToolStrip statusBar = createTaskInfoBar();
            
            this.setGridComponents(new Object[] { toolStrip, statusBar, ListGridComponent.HEADER, "body" });
    
            /* GRID FIELDS */
            ListGridField text = new ListGridField("TXT", "Copy Text");
            text.setWidth(0); // Prevent text from being visible under custom component.
            ListGridField dragHandle = new ListGridField(); // Placeholder so dragging works.
            this.setFields(text, dragHandle);
            
            final DataSource sectionDS = DataSource.get("editedCopySection");
            this.setDataSource(sectionDS);
            this.setSaveLocally(true);
            this.setAutoFetchData(false);
            
            this.setHeight100();
            this.setWidth100();
            
            this.setCanReorderRecords(true);
            this.setCanAcceptDroppedRecords(true);
    
            this.setShowRecordComponents(true);
            this.setRecordComponentPoolingMode(RecordComponentPoolingMode.DATA);
            this.setRecordComponentPosition(EmbeddedPosition.WITHIN);
    Here are some print screens with and without "setRecordComponentPosition " :
    1. Print screen containing 3 records displayed correctly:
    Click image for larger version

Name:	CorrectlyDisplayedRecords.PNG
Views:	90
Size:	49.8 KB
ID:	243641

    2. This is what is happening after i add another record on second position:
    Click image for larger version

Name:	IncorrectDisplay.PNG
Views:	82
Size:	58.6 KB
ID:	243643


    As you can see the new record is displayed over the 3rd one which did not completely slid down. If i resize the browser and put it back to full-screen, the records are displayed correctly.
    Also if i remove "this.setRecordComponentPosition(EmbeddedPosition.WITHIN)" everything works just fine, but the component position doesn't have the same aesthetics as it had while the RecordComponentPosition was used.

    Thanks!
    Attached Files

    #2
    This partial code snippet doesn't suggest any reason for this problem.

    If you think it might be caused by a framework bug rather than a problem in your own code, please put together a minimal, ready-to-run test case that has been tested against the latest patched build (see smartclient.com/builds) and we can take a look.

    Comment

    Working...
    X