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

databinding in select.tagx - only one element is shown as selected, although there should be multiple

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 1.1.0.M1
    • Fix Version/s: 1.1.0.M2
    • Component/s: WEB MVC
    • Labels:
      None
    • Environment:
      Firefox 3.6.3 or IE 8, Windows XP SP 2

      Description

      I have a One-To-Many relationship in my domain model:

      An entity Post has many Categories.

      So, in the create.jspx and update.jspx for Post, a select tag with multiple=true is generated for the property category.
      I can select multiple categories and sucessfully persist a Post with Multiple categories.
      But, when I try to edit the Post (i.e. use update.jspx), there is always only one Category selected in the select box, even the Post has multiple Categories.
      I looked into the html in the Browser, and that seems okay, since multiple opetion tages have "selected=true" there.

      Then I removed the the following DOJO decoration in select.tagx, and then it worked:

      <script type="text/javascript">Spring.addDecoration(new Spring.ElementDecoration({elementId : '_${field}_id', widgetType: 'dijit.form.MultiSelect', widgetAttrs : {}})); </script>

        Attachments

          Activity

            People

            Assignee:
            sschmidt Stefan Schmidt
            Reporter:
            stefanoc Stefan Ocke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: