RE: CheckBox Values on FormSubmit

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

RE: CheckBox Values on FormSubmit

Shalini Seth
Thanks a lot.

The approach worked.

Shalini

-----Original Message-----
From: Karthik Abram [mailto:[hidden email]]
Sent: Thursday, May 05, 2005 5:35 PM
To: Tapestry users
Subject: RE: CheckBox Values on FormSubmit


If you have an unknown list of checkboxes, then put a hidden field
before the list of checkboxes and bind the value to a list property .
This way the right number of checkboxes will be preserved on form post.

-----Original Message-----
From: Shalini Seth [mailto:[hidden email]]
Sent: Thursday, May 05, 2005 7:31 PM
To: Tapestry users
Subject: RE: CheckBox Values on FormSubmit


Hi Karthik,

The checkboxes are rendered based on values from the database.
So they do not have a fixed number. Rendering them is not a problem.
Since the state changes after render, on  formsubmit the server does not
know.

Shalini


-----Original Message-----
From: Karthik Abram [mailto:[hidden email]]
Sent: Thursday, May 05, 2005 4:24 PM
To: Tapestry users
Subject: RE: CheckBox Values on FormSubmit


Hey Shalini,
        Can you not put the checkboxe's value (Boolean) in an List and
use a foreach to render them? If the number of your checkboxes will not
change, this is the easiest solution. When the form posts, the boolean
values will be set based on the checkbox states.

-----Original Message-----
From: Shalini Seth [mailto:[hidden email]]
Sent: Thursday, May 05, 2005 4:11 PM
To: [hidden email]
Subject: CheckBox Values on FormSubmit


Hi,

I have a form that renders multiple checkboxes. On FormSubmit I write
whatever I have checked to a javascript component.
Once that is done I write to the service parameters and the save is
called. Is there any other way this can be done?

Is there a ideal way of sending the values of checkboxes to the server?


Thanks
Shalini


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]