Announcement

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

  • ComboBoxItem display value cleared on blur (12.1d mobile only)

    Hi,

    After upgrade to 12.1d, I noticed problems with ComboBoxItems. When user choose value from pickList and move focus to other field then contents of the comboBox is cleared if you are using mobile version of browser (OK in desktop mode).
    Click image for larger version

Name:	desktopComboBox.gif
Views:	1
Size:	77.3 KB
ID:	258110

    Click image for larger version

Name:	mobileComboBox.gif
Views:	1
Size:	96.2 KB
ID:	258111




    In real application I noticed that this issue has something in common with setting formatOnBlur, but trying to prepare stand alone case I am not able to replicate it fully. So, in the following example, issue is occurring regardless of formatOfBlur.

    Code:
    package pl.com.tech4.client;
    
    import com.google.gwt.core.client.EntryPoint;
    import com.smartgwt.client.data.DataSourceField;
    import com.smartgwt.client.data.OperationBinding;
    import com.smartgwt.client.data.RestDataSource;
    import com.smartgwt.client.data.fields.DataSourceTextField;
    import com.smartgwt.client.types.DSDataFormat;
    import com.smartgwt.client.types.DSOperationType;
    import com.smartgwt.client.types.DSProtocol;
    import com.smartgwt.client.widgets.form.DynamicForm;
    import com.smartgwt.client.widgets.form.fields.ComboBoxItem;
    import com.smartgwt.client.widgets.form.fields.TextItem;
    
    public class MainEntryPoint implements EntryPoint {
    
        public void onModuleLoad() {
    
            layout();
        }
    
        private void layout() {
    
            RestDataSource ds = new RestDataSource();
            ds.setID("DS");
    
            OperationBinding fetchBinding = new OperationBinding();
            fetchBinding.setOperationType(DSOperationType.FETCH);
            fetchBinding.setDataFormat(DSDataFormat.XML);
            fetchBinding.setDataProtocol(DSProtocol.POSTXML);
            ds.setOperationBindings(fetchBinding);
    
            DataSourceField fieldId = new DataSourceField();
            fieldId.setName("id");
            fieldId.setPrimaryKey(true);
    
            DataSourceField fieldOption = new DataSourceField();
            fieldOption.setName("option");
            fieldOption.setForeignKey("optionDS.id");
    
            ds.setFields(fieldId, fieldOption);
    
            RestDataSource optionDs = new RestDataSource();
            optionDs.setID("optionDS");
            optionDs.setOperationBindings(fetchBinding);
            optionDs.setDataURL("option.xml");
    
            DataSourceField optionFieldId = new DataSourceField();
            optionFieldId.setName("id");
            optionFieldId.setPrimaryKey(true);
    
            DataSourceTextField optionFieldName = new DataSourceTextField();
            optionFieldName.setName("name");
    
            optionDs.setFields(optionFieldId, optionFieldName);
    
            DynamicForm form = new DynamicForm();
    
            ComboBoxItem itemOption = new ComboBoxItem("option");
            itemOption.setValueField("id");
            itemOption.setDisplayField("name");
            itemOption.setOptionDataSource(optionDs);
    
            itemOption.setFormatOnBlur(true);
            itemOption.setAddUnknownValues(false);
    
            TextItem itemText = new TextItem("text");
    
            form.setDataSource(ds);
            form.setFields(itemOption, itemText);
    
            form.draw();
        }
    
    }
    Data file needed to run example [option.xml]

    Code:
    <response>
        <status>STATUS_SUCCESS</status>
        <startRow>0</startRow>
        <endRow>1</endRow>
        <totalRows>2</totalRows>
        <data>
            <UnitDir>
                <id>1</id>
                <name>szt</name>
            </UnitDir>
            <UnitDir>
                <id>2</id>
                <name>kg</name>
            </UnitDir>
        </data>
    </response>
    SmartClient Version: SNAPSHOT_v12.1d_2019-05-23/LGPL Development Only (built 2019-05-23)

    Browser: 65.0.3325.146 (Build) (64-bit) in desktop mode and Galaxy S5 emulated mode

    MichalG


  • #2
    You can spot this issue in the latest showcase: https://www.smartclient.com/smartcli...boListComboBox
    Just add one line setting formatOnBlur for the second comboBoxItem:
    Code:
    isc.DynamicForm.create({
        width: 500,
        numCols: 4,
        isGroup: true,
        groupTitle: "List - ComboBox",
        wrapItemTitles: false,
        fields : [{
            name: "bugStatus", title: "Bug Status",
            editorType: "ComboBoxItem",
            valueMap : {
                "new" : "New",
                "active" : "Active",
                "revisit" : "Revisit",
                "fixed" : "Fixed",
                "delivered" : "Delivered",
                "resolved" : "Resolved",
                "reopened" : "Reopened"
            }
        },{
            name: "itemName", title: "Item Name", editorType: "ComboBoxItem",
            optionDataSource: "supplyItem", pickListWidth: 250,
    formatOnBlur : true
        }]
    });
    Run sample in browser responsive mode and pick second comboBoxItem option using mouse (or finger if you run it on real mobile device).
    Thanks,
    MichalG

    Comment


    • #3
      Thanks for letting us know.
      This has been noted and queued up for investigation. No ETA on this yet - it's queued up behind some other more urgent tasks, but we'll follow up here when we have more information for you

      Regards
      Isomorphic Software

      Comment

      Working...
      X