[
https://issues.apache.org/jira/browse/OFBIZ-7350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17440432#comment-17440432
]
Jacques Le Roux edited comment on OFBIZ-7350 at 11/8/21, 12:40 PM:
-------------------------------------------------------------------
Hi [~deepak], [~charles steltzlen],
Could you please explain how work, or rather would work, the description you
did Deepak?
I mean:
{quote}
Here is an example for this:
Goto
[https://ofbiz-vm.apache.org:8443/ordermgr/control/editOrderItems?orderId=DEMO10091]
On "Add To Order" section we have product auto-complete and "Choose Catalog"
drop-down.
Currently all product listed under auto-complete/lookup irrespective to
catalog, Ideally only selected catalog product should list in product
auto-complete.
So we can use this feature for these kind of screen where we need to get values
dependent on other dynamic field.
{quote}
I tried to use targetParameterIter passing catalogIds using
{noformat}
<#assign catalogIds =
Static["org.apache.ofbiz.product.catalog.CatalogWorker"].getAllCatalogIds(request)>
{noformat}
to no avail.
This is the error I got:
{noformat}
2021-11-08 10:32:17,018 |sse-nio-8443-exec-10 |FreeMarkerWorker
|E| null
freemarker.core.NonSequenceOrCollectionException: For "?join" left-hand
operand: Expected a sequence or collection, but this has evaluated to a string
(wrapper: f.t.SimpleScalar):
==> targetParameterIter [in template
"component://common-theme/template/macro/HtmlFormMacroLibrary.ftl" at line 620,
column 27]
----
FTL stack trace ("~" means nesting-related):
- Failed at: #local args = "${targetParameterIter?... [in template
"component://common-theme/template/macro/HtmlFormMacroLibrary.ftl" in macro
"renderLookupField" at line 620, column 9]
- Reached through: @renderLookupField name, formName, fi... [in
template "component://common-theme/template/includes/HtmlTemplate.ftl" in macro
"lookupField" at line 35, column 3]
- Reached through: @htmlTemplate.lookupField formName="a... [in
template "component://order/template/order/AppendOrderItem.ftl" at line 80,
column 25]
{noformat}
Note: It seems Florian Montalbano was able to have it working at OFBIZ-7324
was (Author: jacques.le.roux):
Hi [~deepak], [~charles steltzlen],
Could you please explain how work, or rather would work, the description you
did Deepak?
I mean:
{quote}
Here is an example for this:
Goto
[https://ofbiz-vm.apache.org:8443/ordermgr/control/editOrderItems?orderId=DEMO10091]
On "Add To Order" section we have product auto-complete and "Choose Catalog"
drop-down.
Currently all product listed under auto-complete/lookup irrespective to
catalog, Ideally only selected catalog product should list in product
auto-complete.
So we can use this feature for these kind of screen where we need to get values
dependent on other dynamic field.
{quote}
I tried to use targetParameterIter passing catalogIds using
{noformat}
<#assign catalogIds =
Static["org.apache.ofbiz.product.catalog.CatalogWorker"].getAllCatalogIds(request)>
{noformat}
to no avail.
This is the error I got:
{noformat}
2021-11-08 10:32:17,018 |sse-nio-8443-exec-10 |FreeMarkerWorker
|E| null
freemarker.core.NonSequenceOrCollectionException: For "?join" left-hand
operand: Expected a sequence or collection, but this has evaluated to a string
(wrapper: f.t.SimpleScalar):
==> targetParameterIter [in template
"component://common-theme/template/macro/HtmlFormMacroLibrary.ftl" at line 620,
column 27]
----
FTL stack trace ("~" means nesting-related):
- Failed at: #local args = "${targetParameterIter?... [in template
"component://common-theme/template/macro/HtmlFormMacroLibrary.ftl" in macro
"renderLookupField" at line 620, column 9]
- Reached through: @renderLookupField name, formName, fi... [in
template "component://common-theme/template/includes/HtmlTemplate.ftl" in macro
"lookupField" at line 35, column 3]
- Reached through: @htmlTemplate.lookupField formName="a... [in
template "component://order/template/order/AppendOrderItem.ftl" at line 80,
column 25]
{noformat}
> Manage filters in lookup auto completion
> ----------------------------------------
>
> Key: OFBIZ-7350
> URL: https://issues.apache.org/jira/browse/OFBIZ-7350
> Project: OFBiz
> Issue Type: Improvement
> Components: framework
> Affects Versions: Release Branch 12.04, Release Branch 13.07, Release
> Branch 14.12, Release Branch 15.12, Trunk
> Reporter: Charles STELTZLEN
> Assignee: Deepak Dixit
> Priority: Minor
> Fix For: 15.12.01
>
> Attachments: OFBIZ-7350.13.07.patch, OFBIZ-7350.patch
>
>
> On form lookup, we can specify target parameters to pass them to the lookup
> screen and do filtered searches with these parameters. It works fine when you
> click on lookup button. But when you start to write something in lookup
> input, these parameters are not passed to the ajax auto-complete system. So,
> the results are not filtered.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)