[
https://issues.apache.org/jira/browse/OFBIZ-13173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17897846#comment-17897846
]
ASF subversion and git services commented on OFBIZ-13173:
---------------------------------------------------------
Commit 38cb93168cf4151fad9af22964bdb9b4f451fe12 in ofbiz-framework's branch
refs/heads/release24.09 from Nicolas Malin
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=38cb93168c ]
Improved: Add display result format for auto-completion on lookup (OFBIZ-13173)
(#853)
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.
> Add display result format for auto-completion on lookup
> -------------------------------------------------------
>
> Key: OFBIZ-13173
> URL: https://issues.apache.org/jira/browse/OFBIZ-13173
> Project: OFBiz
> Issue Type: Improvement
> Components: theme/common-theme
> Reporter: Nicolas Malin
> Assignee: Nicolas Malin
> Priority: Minor
> Labels: display, lookup
>
> 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.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)