[jira] [Updated] (OFBIZ-7266) Auto-complete on lookup field should be able to support filter by date.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (OFBIZ-7266) Auto-complete on lookup field should be able to support filter by date.

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-7266?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nicolas Malin updated OFBIZ-7266:
---------------------------------
    Attachment: OFBIZ-7266-NMA.patch

Ok I review the patch and do some test.

I have a second proposal with these changes :
 * We check only if conditionDates is present on context
 ** if yes analyse from/thruDateName and the date value
 ** if both from/thruDateName are empty, use default fromDate, thruDate
 
Advantage :
 * quick to activate by default the filter
 * possibility to realize a filter only on the fromDateName (or thruDateName)

example :
default with fromDate thruDate
{code}
 <set field="conditionDates.default" value="Y"/>
{code}
only on salesDiscontinuationDate
{code}
<set field="conditionDates.thruDateName" value="salesDiscontinuationDate"/>
{code}

only on fromDate
{code}
<set field="conditionDates.fromDateName" value="fromDate"/>
{code}

What do you thinks about this last version ?

> Auto-complete on lookup field should be able to support filter by date.
> -----------------------------------------------------------------------
>
>                 Key: OFBIZ-7266
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-7266
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: ALL COMPONENTS
>    Affects Versions: Trunk
>            Reporter: Kongrath Suankaewmanee
>            Assignee: Nicolas Malin
>            Priority: Minor
>         Attachments: OFBIZ-7266-NMA.patch, OFBIZ-7266-NMA.patch, OFBIZ-7266.patch
>
>
> Hi,
> For the general reason, if the lookup popup (like as performFind service work) able to filter the result from date. so, in the auto complete for lookup filed should be also able too.
> Simple :
> add this tag in action tag before call LookupDecorator
> and filter on field "fromDate", "thruDate" as default.
> {code:xml}
>     <set field="conditionDates.filterByDate" value="true"/>
> {code}
> Advance :
> you can customize "fromDate" and "thruDate" field names by do follow below
> {code:xml}
>     <set field="conditionDates.filterByDate" value="true"/>
>     <set field="conditionDates.fromDateName" value="startDate"/>
>     <set field="conditionDates.thruDateName" value="endDate"/>
> {code}
> Best Regards,
> Kongrath



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)