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

Allow to sort widget dropdowns on items descriptions

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Implemented
    • Affects Version/s: Trunk
    • Fix Version/s: 16.11.01
    • Component/s: ALL APPLICATIONS
    • Labels:
      None
    • Sprint:
      Bug Crush Event - 21/2/2015, Community Day 1 - 2016

      Description

      This would be mostly useful for other languages than English, but not only I guess.

      I thought 1st to add an entity-order-by-description attribute to entity-options. But in order to make this change easier I suggest rather to enhance the entity-order-by attribute with a special keyword (say description) wich will be used in place of a field-name and used in

      1. EntityOptions constructor to bypass the entity-order-by block.
      2. And then used in EntityOptions.addOptionValues() to sort entities on their descriptions.
      3. If no description is provided for an entity it will be put at end.

      Just a proposition at this stage, there are maybe better way.

      1. OFBIZ-3311.patch
        9 kB
        Nicolas Malin
      2. OFBIZ-3311.patch
        5 kB
        Nicolas Malin
      3. OFBIZ-3311-1307.patch
        8 kB
        Nicolas Malin

        Activity

        Hide
        soledad Nicolas Malin added a comment -

        Hi Jacques,

        I use this follow solution :
        When dorp-down use an entity with localized label, force the order by in memory and not by database. I added a generic functionin EntityUtil to use this method for other case.

        Nicolas

        Show
        soledad Nicolas Malin added a comment - Hi Jacques, I use this follow solution : When dorp-down use an entity with localized label, force the order by in memory and not by database. I added a generic functionin EntityUtil to use this method for other case. Nicolas
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Hi Nicolas,

        I tried it and looked at the "Type de rôle" in https://localhost:8443/partymgr/control/main, it was not sorted. I did not look into details, could you put me on the right track please?

        Thanks

        Show
        jacques.le.roux Jacques Le Roux added a comment - Hi Nicolas, I tried it and looked at the "Type de rôle" in https://localhost:8443/partymgr/control/main , it was not sorted. I did not look into details, could you put me on the right track please? Thanks
        Hide
        soledad Nicolas Malin added a comment -

        It's old, I completely forget but it's interested to find a solution

        Show
        soledad Nicolas Malin added a comment - It's old, I completely forget but it's interested to find a solution
        Hide
        soledad Nicolas Malin added a comment -

        I update the patch. This works for entity but not for entity-view. I will check to improve this last point

        Show
        soledad Nicolas Malin added a comment - I update the patch. This works for entity but not for entity-view. I will check to improve this last point
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Thanks for your work on this Nicolas

        Show
        jacques.le.roux Jacques Le Roux added a comment - Thanks for your work on this Nicolas
        Hide
        soledad Nicolas Malin added a comment -

        Ok well done,

        This patch now works with entity-view.
        I have a doubt on the solution so sharing your remarks
        I modified PartyForms only for test, the concerned code is only on framework

        Show
        soledad Nicolas Malin added a comment - Ok well done, This patch now works with entity-view. I have a doubt on the solution so sharing your remarks I modified PartyForms only for test, the concerned code is only on framework
        Hide
        soledad Nicolas Malin added a comment -

        Done on trunk at revision 1735741

        Show
        soledad Nicolas Malin added a comment - Done on trunk at revision 1735741
        Hide
        soledad Nicolas Malin added a comment -

        Here a backport patch for 13.07, (I need it on my project )

        Show
        soledad Nicolas Malin added a comment - Here a backport patch for 13.07, (I need it on my project )
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Thanks Nicolas!

        Show
        jacques.le.roux Jacques Le Roux added a comment - Thanks Nicolas!

          People

          • Assignee:
            soledad Nicolas Malin
            Reporter:
            jacques.le.roux Jacques Le Roux
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development

                Agile