[jboss-user] [jBPM] - Form with multi-select yields single String instead of Collection

Martin Müller do-not-reply at jboss.com
Wed Sep 12 09:13:34 EDT 2012


Martin Müller [https://community.jboss.org/people/martinmueller] created the discussion

"Form with multi-select yields single String instead of Collection"

To view the discussion, visit: https://community.jboss.org/message/759203#759203

--------------------------------------------------------------
Hey,

when a user starts a process instance in the jBPM Console I'd like to display a form with a select input allowing multiple selection.
I've got the form displayed properly with the multi-select box. However, when submitting the form the corresponding process variable only gets filled with a String containing the first selected value. Any other selected value is discarded, and I would have expected some Collection type instead of a String.
The form is a basic HTML form inside the <process_id>.ftl file:

<form action="complete" method="POST" enctype="multipart/form-data">
  <select name="list" multiple="multiple">
    <option value="value1">Option 1</option>
    <option value="value2">Option 2</option>
    <option value="value3">Option 3</option>
  </select>
</form>

If I select "Option 2" and "Option 3" in this example and then start the process the list variable is set to a String "value2".
How do I make it return a Collection with all selected values instead?

Thanks in advance,
Martin
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/759203#759203]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120912/4aa16d54/attachment.html 


More information about the jboss-user mailing list