struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrice" <>
Subject Re: Search Results Forms
Date Mon, 02 Dec 2002 08:51:27 GMT
I think you can use the <html:multibox> tag.
If you have a property "myArray" in your ActionForm, corresponding to an
array of String:

<html:multibox property="myArray" value="0"/>
<html:multibox property="myArray" value="1"/>
<html:multibox property="myArray" value="2"/>

After submission, the array will contain only values corresponding to the
checked checkboxes ("1", "2"...).
The values corresponding to non-checked selectboxes will not appear.
Don't forget to setting the corresponding array to zero length in the
reset() method.

Hope it helps

----- Original Message -----
From: "Wendy Cameron" <>
To: "Struts Users Mailing List (E-mail)" <>
Sent: Monday, December 02, 2002 3:16 AM
Subject: Search Results Forms

> Has anyone come up with a good way to do checkbox form process with
Scrolling search results?
> Basically you have a list of search results each with a check box next to
it.  You also have scrolling pages, so you have Page 1 | 2 | 3 links etc.
> If you use the checkbox with the same name, this can be easily picked up
in your form bean etc, however if the user scrolls back and forth through
the result checking and unchecking items, this could lead to problems with
elements having been checked add, but later they were unchecked etc, and you
wouldnt know.
> I think you could possible work it by numbering the checkbox name.
However you lose your ability to automatically populate a form bean.
> Where the ideal situation is an array 0..n-1 where n is the length, with a
set of values, checked if the checkbox was checked and null if it was not or
an array of booleans.
> Has anyone found a nice way to solve this little picadello
> Regards Wendy
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message