You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by mo...@dit.unitn.it on 2003/01/29 10:57:54 UTC
Urgent
Good day!
I'm new to struts and i need to help..:
<mytag:corsoSIter colors="#FFFFFF,#E5E9F5">
<TR bgcolor="<%=Color%>">
<TD align=left><%=CorsoSId%></TD>
<TD align=left><%=CorsoSName%></TD>
<TD align=left><%=CorsoSFacolta%></TD>
<TD align=left><%=CorsoSCrediti%></TD>
<TD align=left>
<%
String url = "corsiIA.do?IDFacolta="+request.getParameter("IDFacolta")
+"&CorsoSId="+CorsoSId;
%>
<html:link action="<%=url%>">Vis. Corsi Insegn.</html:link>
</TD>
</TR>
</mytag:corsoSIter>
where corsoSIter is an customtag that i create for iterate on a collection
of "course of study"(i pass it and IDFacolta in the request from my first
Action)and IDFacolta is an ID that i need to next jsp.Now i need
to pass to action the CorsoSId(the user's select course from jsp) and the
IDFacolta.I tryed to pas an HashMap:
HashMap mappaOld=(HashMap)request.getAttribute("mappa");
/*the Attribute mappa contains now only IDFacolta and the next HashMap i would
like to contains the IDFacolta and the CorsoSId that my user will select from
jsp*/
<mytag:corsoSIter colors="#FFFFFF,#E5E9F5">
<TR bgcolor="<%=Color%>">
<TD align=left><%=CorsoSId%></TD>
<TD align=left><%=CorsoSName%></TD>
<TD align=left><%=CorsoSFacolta%></TD>
<TD align=left><%=CorsoSCrediti%></TD>
<TD align=left>
<%
HashMap mappa = new HashMap();
mappa.putAll(mappaOld);
mappa.put(CorsoSId);
pageContext.setAttribute(mappa);
%>
<html:link action="corsiIA.do" name="mappa">Vis. Insegn.</html:link>
</TD>
</TR>
</mytag:corsoSIter>
This is corectly,but i create an HashMap for each cycle..i'd like using only
one HashMap..it's very heavy using more HashMap for each page in my
WebApplication...
Plese help me..is very important.
Sorry for the my horrible English.
Thanks in advance
Alessio.
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org