[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


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>

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,

Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- 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