Announcement

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

  • SetShowPending(true) not working in tabSet correclty

    In a tabset, the styling of the setShowPending(true) fields is not working correctly for fields shown in tabs not immediately visible. Please look at this:
    Click image for larger version  Name:	7wB2cFQ9Ud.gif Views:	1 Size:	33.1 KB ID:	253535
    The second field is not being styled, although the button "set value" sets the values for both.

    My code:
    Code:
    public void onModuleLoad() {
    
            final VLayout vlayout = new VLayout();
            ValuesManager vm = new ValuesManager();
            vm.setDataSource(DataSource.get("schueler"));
    
            DynamicForm firstDf = new DynamicForm();
            TextItem firstItem = new TextItem("f_vorname", "First name");
            firstItem.setShowPending(true);
            firstDf.setFields(firstItem);
            firstDf.setValuesManager(vm);
    
            DynamicForm secondDf = new DynamicForm();
            DateItem secondItem = new DateItem("f_geb_datum", "Geb Datum");
            secondItem.setUseTextField(true);
            secondItem.setUseMask(true);
            secondItem.setEnforceDate(true);
            secondItem.setShowPending(true);
            secondDf.setFields(secondItem);
            secondDf.setValuesManager(vm);
    
            IButton saveButton = new IButton("Save");
            saveButton.addClickHandler(event -> vm.saveData());
    
            Criteria c = new Criteria();
            c.addCriteria("f_schueler_id", 10788);
            vm.fetchData(c);
    
            IButton setValueButton = new IButton("Set value");
            setValueButton.addClickHandler(event -> {
                firstDf.getField("f_vorname").setValue("abc");
                secondDf.getField("f_geb_datum").setValue(new Date());
            });
    
            TabSet myTabSet = new TabSet();
            Tab firstTab = new Tab("1");
            firstTab.setPane(firstDf);
            myTabSet.addTab(firstTab);
            Tab secondTab = new Tab("2");
            secondTab.setPane(secondDf);
            myTabSet.addTab(secondTab);
    
            vlayout.addMembers(myTabSet, setValueButton, saveButton);
            vlayout.setWidth100();
            vlayout.setHeight100();
            vlayout.draw();
    
        }
    The datasource is a very simple sql datasource. Pasted for completeness:
    Code:
    <DataSource ID="schueler" serverType="sql" tableName="t_schueler">
        <fields>
            <field name="f_schueler_id" primaryKey="true" type="integer" />
            <field name="f_vorname" type="text" />
            <field name="f_name" type="text" />
            <field name="f_geb_datum" type="text" />
        </fields>
    </DataSource>
    Using smartgwt 6.1p power 04.06.18. This is happening both in chrome 67.0.3396.62 (Offizieller Build) (64-Bit) and in firefox 60.0.1 (64-Bit)

    Edit: If I first click on tab 2, then on tab 1, then on the button, it works. It seems to not work when the tab is not drawn.
    Last edited by edulid; 6th Jun 2018, 01:41.

  • #2
    Hi Isomorphic
    have you been able to reproduce the issue?

    Comment


    • #3
      Yes, we see this one as well.

      Comment


      • #4
        This should be fixed back to SGWT 5.1p/SC 10.1p in todays builds, dated 2018-06-15.

        Comment

        Working...
        X