Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Struts 2 multibox to checkboxlist help

Struts 2 multibox to checkboxlist help

Struts 2 multibox to checkboxlist help

Hi All,

I currently upgrading from struts 1.x to struts 2 and have come into some difficulty with a dynamic page full of checkboxes.

In my original code I had a bean (productList) which contained the following: catalogueNumber, Description, title, +others used in the display.  I also had a String array (selectedItems  ) of all the pre-selected items that needed to be checked.  now on my jsp I had the following code


<c:forEach items="${productlist}" var="prod" >
         <div class="productcatnum"><c:out value="${prod.catalogueNumber}" /></div>
         <div class="producttitle"> <c:out value="${prod.Description}" /></div>
         <div class="productaction">
            <html:multibox property="selectedItems" >
              <c:out value="${prod.product.catalogueNumber}" />

As you can see I would loop through all the products in the productList and the multibox tag would then write out the checkbox and check it if required.  When submitting the form I would then examine selectedItems which would produce and array of catalogue numbers that have been selected.

Can anyone help me on the syntax for using checkbox / checkboxlist to product the same result as what I was getting above.  I'm totally lost at the moment.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close