struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Session A Mwamufiya" <>
Subject Re: getting the value of a s:checkbox
Date Wed, 08 Aug 2007 18:47:32 GMT
I appreciate the explanation on how it's all supposed to work, but given my limited experience
with struts 2 and this type of framework as a whole, I am not yet proficient enough to figure
out where things are being generated.  I use log4j to log a number of events in my code, but
I don't even know how to display this type of request object logging you're presenting.  I
need examples to run with and understand how things work; going through this was helpful to
get a big view, and I don't mean to be rude, but it still doesn't help me read the checkbox

Is there a simple example I can follow?  That's the best way I learn.


> Dale Newfield wrote:
>> OK--now this request goes to your server.  Hopefully eventually to 
>> struts.  Struts then steps through the interceptors and eventually
>> calls your action.  The action does it's thing and selects a result.
> And this whole process can generate as many logs as you have log4j set up
> to generate.  For example, here's a piece from a log (in this case 
> generated because the request was multipart/included an upload) in my app
> showing that there were two parameters found in the request corresponding
> with the form's single checkbox:
> MultiPartRequest.parse(94) | Found item user.commentsPlain 
> MultiPartRequest.parse(96) | Item is a normal form field 
> MultiPartRequest.parse(94) | Found item __checkbox_user.commentsPlain 
> MultiPartRequest.parse(96) | Item is a normal form field
> Why were there two?  Because s:checkbox generated not only an <input> of 
> type checkbox, but also an <input> of type hidden.  These are both visible
> in the html of the page with the form.
> How does having the __checkbox_user.commentsPlain parameter help?  Well, 
> the "checkbox" interceptor notices that it's there, and if 
> user.commentsPlain is not, it does whatever it needs to to make the rest 
> of the process do the right thing.
> -Dale
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: For additional
> commands, e-mail:

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

View raw message