Results 1 to 3 of 3

Thread: Multiselect binding and no element selected

  1. #1
    Join Date
    Jun 2006
    Posts
    15

    Question Multiselect binding and no element selected

    Hello,

    We have a multi select component which is bound to a List<T> in our model. The binding is working well.

    The problem is when no element is selected. Then the binding is not made to the List<T> and if the List was previously containing elements, they are not removed since Spring Web Flow don't know it should bind an empty list to the model and since the model is not recreated at each POST (like in Spring MVC with SimpleFormController).

    I expected to have a configuration in the flow.xml to force the binding but I couldn't find anything.

    I'm still looking for a solution. Has anybody any solution ?

    Thank you.

  2. #2
    Join Date
    Jun 2006
    Posts
    15

    Default

    I found the solution to my problem.
    I've to add an hidden field called "_path.to.myfield".

    See MvcViewFactoryCreator for more information.

  3. #3
    Join Date
    Jul 2009
    Posts
    15

    Default

    It might be that using the "<form:" tags will give you this automatically.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •