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

Add display result format for auto-completion on lookup

    XMLWordPrintableJSON

Details

    Description

      Currently, when you have a lookup with autoCompletion, the result contains the fields to display or by default search fields.

      The format is strict. This improvement add new field  displayFieldFormat to send a UEL schema that we want.

      This commit introduce an example with LookupWorkEffort :

      ****
            <set field="displayFieldFormat" value="\${workEffortName} - \${groovy: description?.length() > 20 ? description.substring(0, 20) + '…': description}"/>
      ****

      We want display the workEffortName and the description limited to 20 chars. To forward the UEL string, we need to use the escape char \ like this the screen engine doesn't parse displayFieldFormat and let the ftl AjaxAutocompleteOptions.ftl realized the translation.

      Attachments

        Activity

          People

            nmalin Nicolas Malin
            nmalin Nicolas Malin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: