Hi,
I have a form with a field "id_order" declared in the ds.xml as type="integer".
I have a SelectItem within the form to edit this "id_order" field. The selectItem uses an optional DS. The optional DS contains two fields:
"id" declared as type="sequence"
"name" declared as text.
value field of selectItem is set to "id".
display field is set to "name".
When I open an existing record with the form, the select item does the link between id_order (from the form ds) and id (from the optional ds), and displays the "name" as expected.
My problem comes when editing a new record with an initial Record. If I put in my initial record the following entry
The selectItem does not seem to make the link between Integer(1) and the "id" field to retrieve the "name" to display, it displays "1" instead.
If I replace the Integer type in the initialisation record by a Double as follows,
then the selectItem does the link and properly display the "name" attached to 1.
It looks like at initialization (editNewRecord(record)) selectItem mixes Integer/Double types.
Thanks, Ben.
I have a form with a field "id_order" declared in the ds.xml as type="integer".
I have a SelectItem within the form to edit this "id_order" field. The selectItem uses an optional DS. The optional DS contains two fields:
"id" declared as type="sequence"
"name" declared as text.
value field of selectItem is set to "id".
display field is set to "name".
When I open an existing record with the form, the select item does the link between id_order (from the form ds) and id (from the optional ds), and displays the "name" as expected.
My problem comes when editing a new record with an initial Record. If I put in my initial record the following entry
Code:
record.put("id_order", new Integer(1)); form.editNewRecord(record);
If I replace the Integer type in the initialisation record by a Double as follows,
Code:
record.put("id_order", new Double(1)); form.editNewRecord(record);
It looks like at initialization (editNewRecord(record)) selectItem mixes Integer/Double types.
Thanks, Ben.
Comment