In our application we have some dynamic datasource generators. Basically what they do is take an existing static datasource file and then append some extra fields to it.
However there is one problem when the original static datasource contains a valuemap:
The output of getFieldXml on this field will be:
I tried some manipulation serverside to the DSField objects to fix this, but I can't get it right: i can't really specify the content of the values (like "Pending", "Available", ...) in that. Do you have any directions?
This is on SmartGWT 2.5, GWT 2.1, Firefox 5.
Code:
DataSource staticDataSource = DataSource.forName(id + "_static", request); List<DSField> fields = staticDataSource.getLocalFields(); addCustomFields(fields, id); System.err.println(DataSource.getFieldXML(fields));
Code:
<field type="enum" length="20" name="cntn_status" title=""> <valueMap> <value ID="10">Pending</value> <value ID="20">Available</value> <value ID="30">Labeled</value> <value ID="40">Approved</value> <value ID="50">Removed</value> <value ID="60">Cancelled</value> </valueMap> </field>
Code:
<field title="" name="cntn_status" length="20" required="true"> <valueMap 10="Pending" 20="Available" 30="Labeled" 40="Approved" 50="Removed" 60="Cancelled"></valueMap> </field>
This is on SmartGWT 2.5, GWT 2.1, Firefox 5.
Comment