struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Riyad Kalla <...@email.arizona.edu>
Subject Re: name="params" in <html:submit>?
Date Mon, 26 Apr 2004 22:46:41 GMT
If you are asking how you can (a) create that HashMap in a scriplet in a JSP 
page and then (b) submit it to an Action, my answer is "I don't know".

If you are asking how you can (a) create that HashMap in a sciplet in a JSP 
page AND put it into the session THEN (b) submit to an Action and get it back 
out of the session, my answer is "no problem, just do a 
request.getSession().getAttribute("params"); from within the action, you 
don't need to setup anything in your html:form"


On Monday 26 April 2004 03:45 pm, Julia Weaver wrote:
> Thanks for your response.
> What I mean is without use any link on the page, only
> use submit buttons, how can I get parameters? plus the
> page has multiple submit buttons, so I have to use
> LookupDispatchAction.
>
> --- Riyad Kalla <rsk@email.arizona.edu> wrote:
> > I'm not terribly clear on what you are asking...
> > your line:
> > request.getSession(true).setAttribute("params",
> > params);
> >
> > sets the 'params' variable in your session, so your
> > link could actually just
> > be a plan HTML link:
> > <a href="/myapp/GetChildTool.do">Get Tool</a>
> >
> > and your action could still pull params out of your
> > session and process it.
> >
> > Am I missing something?
> >
> > On Monday 26 April 2004 03:10 pm, Julia Weaver
> >
> > wrote:
> > > Hi all,
> > >
> > > Please advise:
> > > I know how to pass params when use <html:link>
> >
> > tag.
> >
> > > But if I want to <html:submit> tag instead, what I
> > > should use to replace: name="params"? Since I
> >
> > cannot
> >
> > > use: <html:submit property="action" name="params"
> >
> > />
> >
> > > This is in my jsp:
> > >
> > > <%
> > > java.util.HashMap params = new
> >
> > java.util.HashMap();
> >
> > > 		params.put("toolId", "thisId");
> > > 		params.put("toolName", "thisName" );
> > > request.getSession(true).setAttribute("params",
> > > params);
> > > %>
> > >
> > > <html:link page="/GetChildTool.do" name= "params"
> > >
> > > 	<bean:write name="tool" property="ToolNbr"/>
> > > </html:link>
> > >
> > >
> > >
> > >
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > Yahoo! Photos: High-quality 4x6 digital prints for
> >
> > 25¢
> >
> > > http://photos.yahoo.com/ph/print_splash
>
> ---------------------------------------------------------------------
>
> > > To unsubscribe, e-mail:
> >
> > user-unsubscribe@struts.apache.org
> >
> > > For additional commands, e-mail:
> >
> > user-help@struts.apache.org
>
> ---------------------------------------------------------------------
>
> > To unsubscribe, e-mail:
> > user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> > user-help@struts.apache.org
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Photos: High-quality 4x6 digital prints for 25¢
> http://photos.yahoo.com/ph/print_splash
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org

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


Mime
View raw message