• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to pass row id of colection to next JSP page for display using Struts

 
Mark Brothers
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is where I want to place the program name on my second jsp page: (This now works fine to get the program name � but it returns the program names in the collection, so I can have multiple program names if there were more than one row of data on the previous page)

<TD align="right"><I>Program</I></TD>
<TD>
<logic:iterate indexId="indx" id="part" name="r.juvParticipationData">
<osca:emailProgram name="part" juvenile="r.juvData" user="s.userData"/>
</logic:iterate>
</TD>

How do I check each iteration in the above code to see if it equals the row index of the selected data row that was on the previous jsp page (shown below)? Here is the code that places the link on the jsp (IN BOLD) that a user might choose (each row would have a different index number for the collection of iterations). Where in this code would I put some code to write the row index to the session (or somewhere so it can be available to the next page to test against the collection again to get the program name associated with the same record row as on this page)?

<logic:iterate indexId="indx" id="part" name="r.juvParticipationData">
<TR bgcolor="<osca:evenodd name='indx' even='#ffffff' odd='#cccccc'/>">
<TD rowspan="2" valign="top"><bean:write name="part" property="agencyName"/> </TD>
<TD rowspan="2" valign="top"><osca:casenetLink name="part" juvenile="r.juvData" user="s.userData"/> </TD>
<TD><bean:write name="part" property="contactFName"/> <bean:write name="part" property="contactLName"/> </TD>
<TD> </TD>
<TD><bean:write name="part" property="agencyLocation"/> </TD>
</TR>
<TR bgcolor="<osca:evenodd name='indx' even='#ffffff' odd='#cccccc'/>">
<TD><bean:write name="part" property="contactPhone"/> </TD>
<TD><bean:write name="part" property="contactFax"/> </TD>
<TD> <a href="<osca:sendEmail juvenile="r.juvData" part="part"/>"><bean:write name="part" property="contactEmail"/></a></TD>
</TR>
</logic:iterate>


Thanks so much for your help!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic