> From: Mathieu Grimault [mailto:[EMAIL PROTECTED]
> I've found a way of bypassing the problem by using a logic:equal and
> logic:notEqual inside the jsp and testing my row value. This way, the
> display is correct... it's just not clean.
You really shouldn't need to do all that. Here's a working example of
multibox from my project. In my case 'accountMap' is not a form
property, it's a Map sitting in session scope. I'm not sure if the code
you posted is wrapped in a or not? Stuts will
pre-select the correct checkboxes based on the values in the String[]
form property.
In the JSP
The Form property is a String[]:
And the reset method, which only resets if the form is actually being
submitted:
public void reset( ActionMapping mapping, HttpServletRequest request )
{
log.debug( "reset: begin" );
if ( request.getMethod().equals( "POST" ) ) {
log.debug( "reset: request was POSTed, resetting" );
set( "accounts", new String[]{} );
set( "includeDetail", Boolean.FALSE );
}
}
I put this on my Wiki because it comes up often:
http://wiki.wendysmoak.com/cgi-bin/wiki.pl?StrutsMultiBox
If anyone has suggestions, just edit the page...
Hope that helps!
--
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]