struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mod...@dit.unitn.it
Subject <html:link> with Parameter
Date Wed, 29 Jan 2003 08:16:08 GMT
Good day!
I'm new to struts and i need to help..my problem is:

<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 DB.Now i need to 
pass to action the CorsoSId and the IDFacolta(this is another parameter from 
another controller).I tryed to pas an HashMap:

HashMap mappaOld=(HashMap)request.getAttribute("mappa");
<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'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.
Tanks Alessio.



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


Mime
View raw message