DWR

Overhaul of form and named elements handling

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: 4.0
  • Component/s: Util
  • Description:
    Hide
    BETTER HANDLING OF FORMS

    Discuss and decide on data mapping used when getting/setting values in forms, and try to make it work well together with the "classic" id mapping.

    Support distinguishing between named elements/values from different forms (today it is f ex not possible to direct getValue() to fetch a radio group value from a specific form, in case the same radio group name has been used in multiple forms).


    CONSISTENT HANDLING OF MULTI-VALUED OR MULTI-HEADED ELEMENTS

    There are a couple of elements that are a bit more complex to handle than others:
    - select-multiple
    - radio group (multiple radio boxes with the same name attribute)
    - checkbox group (multiple checkboxes with the same name attribute)

    Considering how data should be mapped we have the following alternatives:
    - select-multiple and checkbox groups:
      - list of selected items' indexes
      - list of selected items' values (current behaviour)
      - list of all items' checked (boolean) property
    - radio groups:
      - index of selected item
      - value of selected item (current behaviour)
      - list of all items' checked (boolean) property

    When it comes to locating the elements the first case is no problem as we do have an actual HTML element that represents the collection of selected values, but for the two latter cases there is no element representing the radio- or checkbox group, but instead we should use the combination of a form and a group name. This is somewhat a challenge when wanting to create a smooth API for working on the values of these.


    NESTED OBJECTS AND PROPERTIES

    We should probably do some more thinking here to find ways for automatic population of more areas.


    OTHER

    When the same identifier exists both for id and name on different elements, which should get priority in get/setValue(s) ?

    Should we add any support for working on forms/names/ids in different frames?

    Show
    BETTER HANDLING OF FORMS Discuss and decide on data mapping used when getting/setting values in forms, and try to make it work well together with the "classic" id mapping. Support distinguishing between named elements/values from different forms (today it is f ex not possible to direct getValue() to fetch a radio group value from a specific form, in case the same radio group name has been used in multiple forms). CONSISTENT HANDLING OF MULTI-VALUED OR MULTI-HEADED ELEMENTS There are a couple of elements that are a bit more complex to handle than others: - select-multiple - radio group (multiple radio boxes with the same name attribute) - checkbox group (multiple checkboxes with the same name attribute) Considering how data should be mapped we have the following alternatives: - select-multiple and checkbox groups:   - list of selected items' indexes   - list of selected items' values (current behaviour)   - list of all items' checked (boolean) property - radio groups:   - index of selected item   - value of selected item (current behaviour)   - list of all items' checked (boolean) property When it comes to locating the elements the first case is no problem as we do have an actual HTML element that represents the collection of selected values, but for the two latter cases there is no element representing the radio- or checkbox group, but instead we should use the combination of a form and a group name. This is somewhat a challenge when wanting to create a smooth API for working on the values of these. NESTED OBJECTS AND PROPERTIES We should probably do some more thinking here to find ways for automatic population of more areas. OTHER When the same identifier exists both for id and name on different elements, which should get priority in get/setValue(s) ? Should we add any support for working on forms/names/ids in different frames?

Activity

There are no comments yet on this issue.

People

Dates

  • Created:
    16/Apr/07 9:44 PM
    Updated:
    14/Sep/08 3:39 PM