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

Default option for ModelFormField.DateFindField doesn't work

    XMLWordPrintableJSON

    Details

      Description

      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>>${opGreaterThan}</option><#rt/>
      ...
            <option value="opLessThan"<#if defaultOptionThru=="opLessThan"> selected="selected"</#if>>${opLessThan}</option><#rt/>
      ...
      

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

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              nmalin#1 nmalin#1
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: