Need a struts based solution for this

Discussions

Web tier: servlets, JSP, Web frameworks: Need a struts based solution for this

  1. Need a struts based solution for this (2 messages)

    Problem:
    I have a Collection of value objects(say User(userId, name, dateOfBirth..). One Action sets the collection in session and forwards to a JSP that displays a list of Users using <logic:iterate> over this collection.
    One each row of User information, one checkbox is provided to select one. Now if I select multiple checkboxes and submit the form(in JSP), I need the ActionForm to have a Collection that has User value objects corresponding to the selected user information.

    How can we do this in struts?
    Pepper

    Threaded Messages (2)

  2. Problem:

    > I have a Collection of value objects(say User(userId, name, dateOfBirth..). One Action sets the collection in session and forwards to a JSP that displays a list of Users using <logic:iterate> over this collection.
    > One each row of User information, one checkbox is provided to select one. Now if I select multiple checkboxes and submit the form(in JSP), I need the ActionForm to have a Collection that has User value objects corresponding to the selected user information.
    >
    > How can we do this in struts?
    > Pepper

    in your jsp page have use an html:multibox with the property set the form property which will be a String[] and for the html:mutltibox value use the value that you in the array

    http://husted.com/struts/tips/

    and for the multibox example

    http://husted.com/struts/tips/007.html
  3. Thanks[ Go to top ]

    thanks buddy.
    That link is really useful.