You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Wolfgang Woger <wo...@syslog.at> on 2004/08/31 12:25:18 UTC

prechecked checkbox using DynaValidatorForm

Hi,
I have acheckbox that needs to be prechecked with the value of myBean.toEat.

<html:checkbox property="eatable" value="true"/>

I use a DynaValidatorForm, "eatable" is a property of my 
DynaValidatorForm, I
tried to set: myForm.set("eatable","true"); before forwarding to the jsp 
page,
but without success.

Any ideas ?


 Wolfgang


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


Re: prechecked checkbox using DynaValidatorForm

Posted by Wolfgang Woger <wo...@syslog.at>.
Thank you, Yves

I solved my problem, the form-bean was not preset in the
right action.

Wolfgang

Yves Sy wrote:

>Hi,
>
>Try declaring eatable in your form-bean declaration as
>java.lang.Boolean and in the action before your edit page go
>myForm.set("eatable", new Boolean(true))
>
>-Yves-
>
>On Tue, 31 Aug 2004 12:25:18 +0200, Wolfgang Woger
><wo...@syslog.at> wrote:
>  
>
>>Hi,
>>I have acheckbox that needs to be prechecked with the value of myBean.toEat.
>>
>><html:checkbox property="eatable" value="true"/>
>>
>>I use a DynaValidatorForm, "eatable" is a property of my
>>DynaValidatorForm, I
>>tried to set: myForm.set("eatable","true"); before forwarding to the jsp
>>page,
>>but without success.
>>
>>Any ideas ?
>>
>> Wolfgang
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>    
>>
>
>
>  
>

Re: prechecked checkbox using DynaValidatorForm

Posted by Yves Sy <yv...@gmail.com>.
Hi,

Try declaring eatable in your form-bean declaration as
java.lang.Boolean and in the action before your edit page go
myForm.set("eatable", new Boolean(true))

-Yves-

On Tue, 31 Aug 2004 12:25:18 +0200, Wolfgang Woger
<wo...@syslog.at> wrote:
> Hi,
> I have acheckbox that needs to be prechecked with the value of myBean.toEat.
> 
> <html:checkbox property="eatable" value="true"/>
> 
> I use a DynaValidatorForm, "eatable" is a property of my
> DynaValidatorForm, I
> tried to set: myForm.set("eatable","true"); before forwarding to the jsp
> page,
> but without success.
> 
> Any ideas ?
> 
>  Wolfgang
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 


-- 
For me to poop on!
http://www.formetopoopon.com
http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml

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