struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shirishchandra.sakh...@ubs.com
Subject RE: <html:link> with Parameter
Date Wed, 29 Jan 2003 08:19:31 GMT
a bit out of context but after looking at u r jsp it seems that u are packing 
too much logic in u r jsp..cant u prepare the link parameers in u r action and 
set them on the form...

and then in the jsp just acces that property of form...

-----Original Message-----
From: modena [mailto:modena@dit.unitn.it]
Sent: Wednesday, January 29, 2003 9:16 AM
To: struts-user
Cc: modena
Subject: <html:link> with Parameter


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



---------------------------------------------------------------------
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