You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by rmanchu <rm...@gmail.com> on 2005/05/10 17:25:43 UTC

multiple forms from 1 action

i have the following case:

click link "search" => action => output.jsp

output.jsp has 2 forms, both forms use a hidden variable "table"

link "search" passes parameter "table". action creates "search form" and 
"table" is correctly set by struts. now in output.jsp i have a tag that 
creates a "recent records" form using RequestUtils.createActionForm. 
however, in this form the "table" parameter is not set.

i thought if there were parameters that were of the same name as fields 
then they would be set? i must be doing something wrong here. doesn't 
creating the form, populate it? or is it separate?

============ [snip]
Object tmp = request.getAttribute(formName);
if (tmp == null) {
     ActionServlet servlet = getActionServlet(pCntxt);
     ModuleConfig modConfig = getModuleConfig(pCntxt);
     FormBeanConfig formBean = modConfig.findFormBeanConfig(formName);
     tmp = RequestUtils.createActionForm(formBean, servlet);
}
// Dyna is guaranteed by struts-config - only extensios r used
return (DynaActionForm)tmp;


:(

riyaz

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