You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by "Bhardwaj, Sharod" <sb...@allstate.com> on 2004/03/22 19:30:11 UTC

Please correct me if I m wrong

Execution of <html:checkbox name=mailSent property=mailSent value="Sharad"> tag :

	name - Used to get value of the checkbox once the form is submitted.
	property - used to map the status, i.e. whether the checkbox shd be Yes or No, to the bean property.
	value - value of the checkbox.

if I m right then is it necessary to specify the "name" and "property" with the literals ? Please explain as this is eating my head out. Please don't refer me to Jakarta site as I couldn't figure out anything from there.

Re: Please correct me if I m wrong

Posted by Ted Husted <hu...@apache.org>.
On Mon, 22 Mar 2004 12:30:11 -0600, Bhardwaj, Sharod wrote:
> Execution of  tag :         name - Used to get value of the checkbox once
> the form is submitted.         property - used to map the status, i.e.
> whether the checkbox shd be Yes or No, to the bean property.         value
> - value of the checkbox. if I m right then is it necessary to
> specify the "name" and "property" with the literals ? Please
> explain as this is eating my head out. Please don't refer me to
> Jakarta site as I couldn't figure out anything from there.

The place to ask questions like this is the USER list. 

The thing with checkboxes is that the browsers do not submit them if they are not checked. If the checkbox input is there, it was checked. If the checkbox is not in the request, then it is not present. 

Typically people will represent checkboxes with a boolean that defaults to false. So if they are checked, then they are set to true. 

But do not post any follow questions here. Post to the USER list instead. 

-Ted.



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