Isomorphic,
We recently upgraded to v12.0p_2018-08-28/Pro Deployment (built 2018-08-28) and unknown values are now showing up in the picklist for SelectItems. This appears to only affect SelectItems if the form has a DataSource.
Please see the following stand-alone test case.
The following screenshots illustrate how the SelectItem on the Local Form does not show the unknown value "Orange"; however, the SelectItem on the Databound form does.
Thanks
We recently upgraded to v12.0p_2018-08-28/Pro Deployment (built 2018-08-28) and unknown values are now showing up in the picklist for SelectItems. This appears to only affect SelectItems if the form has a DataSource.
Please see the following stand-alone test case.
Code:
public class UnknownValuesTest extends HLayout implements EntryPoint { @Override public void onModuleLoad() { setLayoutMargin(10); setMembersMargin(10); DynamicForm localForm = getForm(null); localForm.setGroupTitle("Local Form"); addMember(localForm); DynamicForm databoundForm = getForm(getTestDataSource()); databoundForm.setGroupTitle("Databound Form"); addMember(databoundForm); draw(); } private static DynamicForm getForm(DataSource ds) { DynamicForm form = new DynamicForm(); form.setWidth(300); form.setHeight(50); form.setIsGroup(true); if (ds != null) { form.setDataSource(ds); } SelectItem colorItem = new SelectItem("color", "Color"); colorItem.setValueMap("Red", "Blue", "Green"); colorItem.setAddUnknownValues(Boolean.FALSE); form.setItems(colorItem); form.setValue("color", "Orange"); return form; } private static DataSource getTestDataSource() { DataSource ds = new DataSource(); ds.setClientOnly(Boolean.TRUE); DataSourceTextField colorField = new DataSourceTextField("color"); ds.setFields(colorField); return ds; } }
Thanks
Comment