You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dante le Poole <da...@maverick.nl> on 2001/06/04 23:48:10 UTC

"multiple" selectlists

Hi all,

Can Struts deal with selectlists which allow multiple selections? If so, how should I create the accessors methods for the formbean,
i.e. how does Struts get/set the multiple selections from the formbean?

Thanx!

Dante


Re: "multiple" selectlists

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Mon, 4 Jun 2001, Dante le Poole wrote:

> Hi all,
> 
> Can Struts deal with selectlists which allow multiple selections?

Sure.  There is an example of this on the "html-select.jsp" page in the
exercise example application.  Basically, you say something like:

  <html:select property="propname" multiple="true">
    ...
  </html:select>

> If so, how should I create the accessors methods for the formbean, i.e.
> how does Struts get/set the multiple selections from the formbean?
> 

Use a String array for your property.  All of the selected values will be
returned.

> Thanx!
> 
> Dante
> 
> 

Craig