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

Default option for ModelFormField.DateFindField doesn't work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Trunk
    • 17.12.01, 18.12.01
    • framework
    • None

    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

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

            Dates

              Created:
              Updated:
              Resolved: