Details

    • Type: Improvement
    • Status: Reopened
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      all

      Description

      Currently the QuerySelect is rendered into two different ways on a form:

      with required set to true an Option.EMPTY_OPTION is add on the option's list
      with required set to false the first option is rendered

      I have a form with a lot of QuerySelect and some are mandatory and some are optional with the same options, so I modified the QuerySelect adding a new optional flag with his setter and getter methods:

      protected boolean optional;

      a new constructor

      public QuerySelect(String name, boolean required, boolean optional)

      { super(name, required); this.setOptional(optional); }

      and on the loadOptionList() method

      if (!isRequired() && isOptional())

      { getOptionList().add(Option.EMPTY_OPTION); }

      Probably the right place where to put this is on the Field class, but this modification cover my needs.

        Attachments

          Activity

            People

            • Assignee:
              medgar Malcolm Edgar
              Reporter:
              lorselli Lorenzo Orselli
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: