You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Christian Grobmeier <gr...@gmail.com> on 2011/05/01 10:41:22 UTC

Converting a hidden input field to Boolean?

Hi,

given the following:
<s:hidden name="myBean.active" value="true" />

and the fact MyBean contains a method with this signature:

MyBean.setActive(Boolean value) {}

I always receive null for this field in my Action.

I guess it is because the conversion does not apply to hidden fields - right?

Any chance i can make this work?

Cheers
Christian

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Converting a hidden input field to Boolean?

Posted by Christian Grobmeier <gr...@gmail.com>.
Forget this. I found out that I do not need a setter for MyBean only,
I do necessary need a getter.
As I found out, getMyBean is always called before setting a property

Cheers


On Sun, May 1, 2011 at 10:41 AM, Christian Grobmeier
<gr...@gmail.com> wrote:
> Hi,
>
> given the following:
> <s:hidden name="myBean.active" value="true" />
>
> and the fact MyBean contains a method with this signature:
>
> MyBean.setActive(Boolean value) {}
>
> I always receive null for this field in my Action.
>
> I guess it is because the conversion does not apply to hidden fields - right?
>
> Any chance i can make this work?
>
> Cheers
> Christian
>



-- 
http://www.grobmeier.de

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org