I'm building an enterprise web-site which contains:
1) a table with editable fields (checkboxes, textboxes, etc.)
2) multiple "buttons" which represent actions.
How can I redirect from a particular button to a particualar action and
get the values of all the controls on the form?
I know that ASP.NET and Java create wrappers for the buttons and save
the state of the controls in a hidden filed ViewState. Is there any way
in RoR to do the same?
I'm building an enterprise web-site which contains:
1) a table with editable fields (checkboxes, textboxes, etc.)
2) multiple "buttons" which represent actions.
How can I redirect from a particular button to a particualar action and
get the values of all the controls on the form?
I know that ASP.NET and Java create wrappers for the buttons and save
the state of the controls in a hidden filed ViewState. Is there any way
in RoR to do the same?
Thanks in advance,
Dmitry
One way to do this would be to have 1 form and
1 action with a bunch of submit buttons.
Rails helpers names submit buttons "commit" so in
your controller you could switch on params[:commit]
and call an appropriate method for your "action".
the state of the controls in a hidden filed ViewState. Is there any way
in RoR to do the same?
Thanks in advance,
Dmitry
One way to do this would be to have 1 form and
1 action with a bunch of submit buttons.
Rails helpers names submit buttons "commit" so in
your controller you could switch on params[:commit]
and call an appropriate method for your "action".
Could you please give an example on how to define such a submit button?
Actually I need not a button but an image which submits the form
following the onclick event.