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).
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.
Data file needed to run example [option.xml]
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
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).
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(); } }
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>
Browser: 65.0.3325.146 (Build) (64-bit) in desktop mode and Galaxy S5 emulated mode
MichalG
Comment