You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by StoicxPhilia Nguyen <st...@yahoo.com> on 2002/09/12 01:21:50 UTC

html:checkbox problem: set property never get executed.

I have an interesting problem in which the setRemove() method of my Value Bean never gets called in html:checkbox, though the getRemove() does get called:

 <html:checkbox name="rating"  property="remove" value="on" styleClass="formElementRadio"/></td>

* where rating is my value bean within a colletion (logic:iterate).

Any ideas? or is it a bug?

Thanks.



---------------------------------
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost

Re: html:checkbox problem: set property never get executed.

Posted by John Yu <jo...@scioworks.com>.
I think you've misunderstood how <html:check> worked.

<html:checkbox> will only render a <input type="checkbox">, but doesn't 
update your bean stored in the session (or request if you mistakenly 
expected that) upon submission. Instead, you will get the value back as one 
of the URI query parameters from the form. If you let Struts auto populate 
them into your FormBean, you will get the value in the form object passed 
into Action.execute(mapping, form, req, res).


At 07:21 am 12-09-2002, you wrote:

>I have an interesting problem in which the setRemove() method of my Value 
>Bean never gets called in html:checkbox, though the getRemove() does get 
>called:
>
>  <html:checkbox name="rating"  property="remove" value="on" 
> styleClass="formElementRadio"/></td>
>
>* where rating is my value bean within a colletion (logic:iterate).
>
>Any ideas? or is it a bug?
>
>Thanks.

-- 
John Yu                       Scioworks Technologies
e: john@scioworks.com         w: +(65) 873 5989
w: http://www.scioworks.com   m: +(65) 9782 9610

Scioworks Camino - "Don't develop Struts Apps without it!"
Copyright (c) 2002 John Yu/Scioworks Technologies. All rights reserved.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>