Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

html:multibox problem

 
Chatura Dilan
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to this example http://husted.com/struts/tips/007.html <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.
Thanks,
 
Chatura Dilan
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, I got the answer .
Getter mehtod should be getSelectedItems(), I used Netbeans IDE to create it and it has created it as isSelectedItems().
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic