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

Field Lookup do not show description when widget-verbose is set to false

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Release Branch 12.04, Release Branch 13.07, Release Branch 14.12, Trunk
    • Fix Version/s: 14.12.01, 13.07.03, 16.11.01
    • Component/s: framework
    • Labels:
      None

      Description

      When widget verbose is set to false and using field lookup, the description of the selected object is not displayed (not using auto completion but the popup).

      To reproduice : Set in framework/widget/config/widget.properties

      widget.verbose=false

      Clear OFBiz cache then go to :
      https://localhost:8443/partymgr/control/EditPartyRelationships?partyId=Company

      In the partyRelationship creation form, in party Id From field, click on lookup, search, select AUTHOR_MADMAX, and so no description displayed.

      Using autocompletion it's fine.

      1. OFBIZ-6396.patch
        2 kB
        Gil Portenseigne
      2. fieldlookup.js.patch
        0.9 kB
        Adrian Crum

        Activity

        Hide
        gil portenseigne Gil Portenseigne added a comment -

        This patch use a trick to no care about widgetVerbose comments. Sad to use this kind of trick, but if not, spaces might not be trimed.

        With that, the display is perfect. No side effect detected.

        Show
        gil portenseigne Gil Portenseigne added a comment - This patch use a trick to no care about widgetVerbose comments. Sad to use this kind of trick, but if not, spaces might not be trimed. With that, the display is perfect. No side effect detected.
        Hide
        adrianc@hlmksw.com Adrian Crum added a comment -

        Jacques,

        I have this fixed on my local copy. The attached patch is not necessary.

        Show
        adrianc@hlmksw.com Adrian Crum added a comment - Jacques, I have this fixed on my local copy. The attached patch is not necessary.
        Hide
        jacques.le.roux Jacques Le Roux added a comment - - edited

        Thanks Gil,

        Your patch is in
        trunk r1680873
        R14.12 1680874
        R13.07 1680875
        R12 conflict, gave up

        About the hack, I still regret Hans's past attitude about widgetVerbose which initially forced me to use this hack.

        Show
        jacques.le.roux Jacques Le Roux added a comment - - edited Thanks Gil, Your patch is in trunk r1680873 R14.12 1680874 R13.07 1680875 R12 conflict, gave up About the hack, I still regret Hans's past attitude about widgetVerbose which initially forced me to use this hack.
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Oops we crossed on wire, how did you fix it?

        Show
        jacques.le.roux Jacques Le Roux added a comment - Oops we crossed on wire, how did you fix it?
        Hide
        adrianc@hlmksw.com Adrian Crum added a comment -

        See the attached patch.

        Show
        adrianc@hlmksw.com Adrian Crum added a comment - See the attached patch.
        Hide
        gil portenseigne Gil Portenseigne added a comment -

        Hi Adrian, i tried this solution, but it remains some spaces before the display " Mad Max". The initial comment and if condition were here to solve this little issue.

        It's not a great deal I guess to let this kind of little issue... Hack is kinda bad, but i wanted to get a perfect behaviour...

        Show
        gil portenseigne Gil Portenseigne added a comment - Hi Adrian, i tried this solution, but it remains some spaces before the display " Mad Max". The initial comment and if condition were here to solve this little issue. It's not a great deal I guess to let this kind of little issue... Hack is kinda bad, but i wanted to get a perfect behaviour...
        Hide
        adrianc@hlmksw.com Adrian Crum added a comment -

        It worked fine for me. I did not see any "bad spaces."

        Show
        adrianc@hlmksw.com Adrian Crum added a comment - It worked fine for me. I did not see any "bad spaces."
        Hide
        gil portenseigne Gil Portenseigne added a comment -

        Ok for me, Thanks Adrian for the review and Jacques for the commit !

        Show
        gil portenseigne Gil Portenseigne added a comment - Ok for me, Thanks Adrian for the review and Jacques for the commit !
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Thanks Adrian,

        It did not occur to me that all the rest of the result was only commented out HTML code, so a simple trim() was enough. Happy to get rid of this ugly kludge!

        I reverted the previous patch from Gil. Your patch is in
        trunk r1680881
        R14.12 r1680882
        R13.07 r1680883

        Show
        jacques.le.roux Jacques Le Roux added a comment - Thanks Adrian, It did not occur to me that all the rest of the result was only commented out HTML code, so a simple trim() was enough. Happy to get rid of this ugly kludge! I reverted the previous patch from Gil. Your patch is in trunk r1680881 R14.12 r1680882 R13.07 r1680883
        Hide
        gil portenseigne Gil Portenseigne added a comment -

        Just FYI, only commented out HTML code => I just try it out there is a :

        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

        Just before the description display.

        Show
        gil portenseigne Gil Portenseigne added a comment - Just FYI, only commented out HTML code => I just try it out there is a : <meta http-equiv= "Content-Type" content= "text/html; charset=UTF-8" > Just before the description display.
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Yes but this is ripped off as well by browsers, it's never rendered I initially wrote this kludge (in 2010). I think I then simply did no try to render the result in a browser. If you do you will see that only the field value is rendered, so it's safe to use only trim().

        Show
        jacques.le.roux Jacques Le Roux added a comment - Yes but this is ripped off as well by browsers, it's never rendered I initially wrote this kludge (in 2010). I think I then simply did no try to render the result in a browser. If you do you will see that only the field value is rendered, so it's safe to use only trim().

          People

          • Assignee:
            jacques.le.roux Jacques Le Roux
            Reporter:
            gil portenseigne Gil Portenseigne
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development