Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-2507

Sort options in form fields by their visible description (also if localized)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Trunk, Upcoming Branch
    • None
    • framework
    • None
    • Bug Crush Event - 21/2/2015

    Description

      Currently, when options are shown in drop-down fields we can use entity-order-by to sort the options by e.g. description.

      But the order in which options appear is only valid for non-localized descriptions.

      If we have localized descriptions we want to make sure that these also appear in order, otherwise we make it difficult for the user to find the desired option especially in drop-down fields with many options.

      Btw i consider this major because for users who do not use the default language:

      • the presentation is non-standard and a usability obstacle
      • it's simply a real pain to look for an option in 'strangely-ordered' drop-downs

      Proposed Solution

      My proposal is to have a default ordering based on the description value of the OptionValue key-description-pairs in ModelFormField.java.

      The advantage of doing this is that you get what you'd normally expect, by default, in any drop-down field without even having to tell the system to order by description. An implementation should of course respect entity-order-by if present.

      Attachments

        1. ModelFormField.java.patch
          2 kB
          Karim Rahimpur

        Activity

          People

            Unassigned Unassigned
            karim Karim Rahimpur
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: