Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SGWT.mobile - SelectItem: Integer value field initialisation

    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

    Code:
    record.put("id_order", new Integer(1));
    form.editNewRecord(record);
    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,
    Code:
    record.put("id_order", new Double(1));
    form.editNewRecord(record);
    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.
    Last edited by bda@n-side.com; 24 Feb 2013, 08:25.

    #2
    Should be fixed for tomorrow's builds.

    Comment


      #3
      Thanks, working fine now

      Comment

      Working...
      X