Checkout
Nicolas Malin
committed
on 26 Sep
Fixed: Default option for ModelFormField.DateFindField doesn't work
(OFBIZ-11212)
When you use a date-find element on form, the defaut optio… Show more
Fixed: Default option for ModelFormField.DateFindField doesn't work

(OFBIZ-11212)

When you use a date-find element on form, the defaut option are in code like to greater_than and less _than

       public DateFindField(int fieldSource, String type) {

           super(fieldSource, type);

           this.defaultOptionFrom = greaterThanEqualTo;

           this.defaultOptionThru = lessThanEqualTo;

       }

but on macro

<#macro renderDateFindField ...

     <option value=greaterThan<#if defaultOptionFrom==greaterThan> selected=selected</#if>></option><#rt/>

     ...

     <option value=opLessThan<#if defaultOptionThru==opLessThan> selected=selected</#if>></option><#rt/>

     ...

</#macro>

So the value java isn't correct with ftl values and default value never used.

Show less