File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes html:multibox problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:multibox problem" Watch "html:multibox problem" New topic

html:multibox problem

Chatura Dilan
Ranch Hand

Joined: Feb 13, 2007
Posts: 44
According to this example <html:multibox> returns a String[]
I have created 10 dynamic multiboxses using <c:forEach> tag. like this

But the problem is in the ActionForm when I declare selectedItems variable as String[] it does not work (It does not render checkboxes). It works only when I declare it as a boolean. It does not work even it declared as boolean[]. I am confused and I wonder why it does not return an array and why it works when I declare it selectedItems variable as a boolean.

-----------------------------------<br />If at first you don't succeed, try again without cry. Everytime You will learn what not to do next time, untill you succeed.<br /> <br />SCJP 1.4 (78%)<br />SCWCD 5 (95%)<br />BICT - UCSC
Chatura Dilan
Ranch Hand

Joined: Feb 13, 2007
Posts: 44
Thanks, I got the answer .
Getter mehtod should be getSelectedItems(), I used Netbeans IDE to create it and it has created it as isSelectedItems().
I agree. Here's the link:
subject: html:multibox problem
It's not a secret anymore!