struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Vervecken <Jan.Vervec...@vlaamsparlement.be>
Subject Re: Urgent <html:link>
Date Wed, 29 Jan 2003 10:18:48 GMT
hi

I've recently written a tag that solves these problems and works
together with the html:link tag, see c-html:parameter tag below.

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

<c-html:parameter map="parameters" paramId="IDFacolta"
name="IDFacolta"/>
<c-html:parameter map="parameters" paramId="CorsoSId"
name="CorsoSId"/>
<html:link action="<%=url%>" name="parameters">Vis. Corsi
Insegn.</html:link>

	</TD>
   </TR>
</mytag:corsoSIter>

You can write yours in a similar way.
A tag like this might be a useful Struts tag if you ask me.

succes
-Jan

>>> modena@dit.unitn.it 01/29/03 10:57AM >>>
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 


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