Hello, I'm evaluating smartgwt for server side integration using DMI. I have defined the datasource in ds.xml & ListGrid, DynamicForm are bound to this datasource for viewing & updating the schedules. I'm trying to display a drop down whose values are obtained during runtime. I have set the field type to "enum" in ds.xml & on the server side fetch method i'm populating the field values with the code below, but the drop down is empty in both the ListGrid & the form. Could you help me find the issue? Also, is there is an alternate way of doing this. Thanks.
dsRequest.getDataSource().getField("room").put("x","X");
dsRequest.getDataSource().getField("room").put("y","Y");
Below is my ds.xml-
<DataSource
ID="schedules"
servertype="generic"
>
<fields>
<field name="title" type="text" title="Title" length="128" required="true"/>
<field name="presenter" type="text" title="Presenter" length="128" required="true"/>
<field name="startDate" type="date" title="StartDate">
</field>
<field name="endDate" type="date" title="EndDate">
</field>
<field name="startTime" type="text" title="StartTime"/>
<field name="durationSeconds" type="int" title="Duration(in secs)">
<validators>
<validator type="integerRange" min="0" max="300000" errorMessage="Enter a positive number between 0 and 300000"/>
</validators>
</field>
<field name="room" type="enum" title="Room"/>
</fields>
<serverObject lookupStyle="factory" className="com.smartgwt.sample.server.ScheduleStoreFactory"/>
</DataSource>
dsRequest.getDataSource().getField("room").put("x","X");
dsRequest.getDataSource().getField("room").put("y","Y");
Below is my ds.xml-
<DataSource
ID="schedules"
servertype="generic"
>
<fields>
<field name="title" type="text" title="Title" length="128" required="true"/>
<field name="presenter" type="text" title="Presenter" length="128" required="true"/>
<field name="startDate" type="date" title="StartDate">
</field>
<field name="endDate" type="date" title="EndDate">
</field>
<field name="startTime" type="text" title="StartTime"/>
<field name="durationSeconds" type="int" title="Duration(in secs)">
<validators>
<validator type="integerRange" min="0" max="300000" errorMessage="Enter a positive number between 0 and 300000"/>
</validators>
</field>
<field name="room" type="enum" title="Room"/>
</fields>
<serverObject lookupStyle="factory" className="com.smartgwt.sample.server.ScheduleStoreFactory"/>
</DataSource>
Comment