Hi,
The Datasource is set to the SelectItem of Dynamic form element. if the DataSource response has a single value then we are not able to view the data's in the SelectItem. Sample image is attached with this post. Please help me to resolve this issue.. Thanks in Advance... !
Here is the sample code:
Here is the Datasource
The Datasource is set to the SelectItem of Dynamic form element. if the DataSource response has a single value then we are not able to view the data's in the SelectItem. Sample image is attached with this post. Please help me to resolve this issue.. Thanks in Advance... !
Here is the sample code:
Code:
DeviceGroupsDS withoutall = new DeviceGroupsDS("DataSource"); DynamicForm form = new DynamicForm(); form.setWrapItemTitles(false); com.smartgwt.client.widgets.form.fields.SelectItem grp = new com.smartgwt.client.widgets.form.fields.SelectItem(); grp.setTitle("Device Group"); grp.setOptionDataSource(withoutall); grp.setAutoFetchData(true); form.setFields(grp); form.draw();
Code:
DataSourceField groupNameField = new DataSourceField("UserId", FieldType.TEXT, "Group Name"); setFields(groupNameField); OperationBinding oppFetch = new OperationBinding(); oppFetch.setDataFormat(DSDataFormat.XML); oppFetch.setOperationType(DSOperationType.FETCH); oppFetch.setDataProtocol(DSProtocol.GETPARAMS); oppFetch.setRecordXPath("/XDocument/XUser"); setOperationBindings(oppFetch);
Comment