struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Toni Lyytikäinen" <tol...@gmail.com>
Subject Re: capturing the value of a <s:checkbox> tag in an action
Date Tue, 14 Aug 2007 15:22:19 GMT
I don't know if you can capture the checkbox value to String, boolean should
work though (it works for me at least). Try changing the String element to
boolean.

On 8/14/07, Session A Mwamufiya <smwamufi@andrew.cmu.edu> wrote:
>
> Hi,
>
> I started a thread on this topic a while back, but the example I was
> guided to was hard to understand and implement.
>
> The question is straight forward: How do you get the value of a checkbox
> from within an action?
>
> - I have named my <s:checkbox> in the jsp, and have a private String
> element with the same name in my action
> - I have created get/set methods
>
> Each time I try to obtain the value when a button is pressed, I get null,
> regardless of whether the checkbox is clicked or not.
>
> It's easy and straight forward to get the value of other tags (textfield,
> selectbox, ...), so I'm thinking that there's something more for
> checkboxes.  Do I need to set an interceptor?  Please let me know whether
> I'm missing something here.
>
> Thanks,
> Session
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message