You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Scriven, Marcos" <Ma...@gs.com> on 2001/12/04 12:36:15 UTC
Setting up form from the query string
Hi
Is it possible in struts to setup a form like so:
myForm.jsp?action=3
Where in the form you have a property called action? The only way I have
been able to do it is this:
<html:hidden property="action" value="<%=request.getParameter("action")%>"/>
Which seems to be a bit redundant, what with repeating the property name.
I've also tried the method given in the examples app, whereby I have an
action just to set up the form. This seems rather an overkill for a form I
simply want to populate with a copule of values. Even then I still have to
pass the values in the URL like so: setupMyForm?action=3, which then
forwards to the new form bean, which then reads the values out of the
populated bean.
There must be an easier way!
Thanks
Marcos
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>