SC_SNAPSHOT-2011-08-02/PowerEdition Deployment (built 2011-08-02)
I have an application client that defines a form with a couple of multi-value select items. I am using the Smart GWT Server to handle the SQL CRUD operations and everything works as expected.
My issue lies with the restoring of the select item so that it reflects the multi-values previously assigned.
The data source field definition is below.
The Dynamic Form logic that defines the select item field is below.
Based on my prior experience working with multi-value select item, I added a method to my logic that gets fired after the dynamic form is loaded. This method takes the single text value "[Time Course, Dose Curve]" and extracts it into a String[] multiValues array object.
The Developer Console log messages I captured to trace my logic seems to validate that the string array has been properly constructed.
The method assigns the multiValues to the select item via the following logic.
Unfortunately, the select item component is not honoring the updated values. Only the first option "Time Course" is shown as selected.
I could use some advice on how I could resolve this or troubleshoot it further.
Thanks
I have an application client that defines a form with a couple of multi-value select items. I am using the Smart GWT Server to handle the SQL CRUD operations and everything works as expected.
My issue lies with the restoring of the select item so that it reflects the multi-values previously assigned.
The data source field definition is below.
Code:
<field name="PURPOSE" title="Purpose" type="text" multiple="true" length="1024"> <valueMap> <value>Time Course</value> <value>Dose Curve</value> <value>Tox Tolerance</value> <value>Expression</value> <value>Efficacy</value> </valueMap> </field>
Code:
SelectItem tissueTypeItem = new SelectItem("PURPOSE", "Purpose"); tissueTypeItem.setMultiple(true); tissueTypeItem.setMultipleAppearance(MultipleAppearance.PICKLIST); tissueTypeItem.setShowTitle(true);
The Developer Console log messages I captured to trace my logic seems to validate that the string array has been properly constructed.
Code:
12:22:25.669:XRP0:WARN:Log:multiValues.length = 2 12:22:25.684:XRP0:WARN:Log:multiValues[0] = Time Course 12:22:25.700:XRP0:WARN:Log:multiValues[1] = Dose Curve
Code:
FormItem formItem = mExperimentForm.getItem("PURPOSE"); SelectItem selectItem = (SelectItem) formItem; selectItem.setValues(multiValues);
I could use some advice on how I could resolve this or troubleshoot it further.
Thanks
Comment