Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-2422

On select tagx when disable form binding: field always is multiple and not selected functionality

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 1.1.4.RELEASE
    • Fix Version/s: 1.1.4.RELEASE
    • Component/s: WEB MVC
    • Labels:
    • Environment:
      Linux Ubuntu 10.10, Apache Maven 3.0.2, Java 1.6.0_23, Commit 4e7e817def6094bfc6f8f1b7cc989c9969954651

      Description

      On select field tag:

      src/main/webapp/WEB-INF/tags/form/fields/select.tagx
      

      1.- In two places, when disabled form binding:

      <c:when test="${disableFormBinding}">
      <select id="_${sec_field}_id" name="${sec_field}" multiple="${multiple}">
      

      Whatever the value, the select is always multiple. When the attribute is informed with any value, the this specifies that multiple options can be selected.

      There is no a standard, but usually is not defined when single selection and defined with multiple="multiple" when multiple selection.

      2.- There is no possibility to mark an option as selected when disabled form binding.

      Possible solutions:

      • Provide the value that should be selected as another tag attribute
      • Provide the name of a model attribute setted on the controller that should be selected as another tag attribute

        Attachments

          Activity

            People

            Assignee:
            sschmidt Stefan Schmidt
            Reporter:
            mmartinez Mario Martínez Sánchez - gvNIX - DISID
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 5h
                5h
                Remaining:
                Remaining Estimate - 5h
                5h
                Logged:
                Time Spent - Not Specified
                Not Specified