You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Raghvendra Sinha <rs...@software-automation.com> on 2001/07/24 22:25:17 UTC
change java statements in jsp
A problem that I'm facing is to convert the following to a struts equivalent
command, here I guess the jsp is called based on the multiple params passed
to it, I couldn't find anything similar in struts. Please help.
<td class="ft"><a
href="invoice/list.jsp?numFields=1&wo0=eq&wf0=InvoiceStatus&wv0=<%=rec.getIn
voiceStatus()%>"><%=rec.getInvoiceStatusDescription ()%></a></td>
B Rgds
Raghu
Re: change java statements in jsp
Posted by David Winterfeldt <dw...@yahoo.com>.
You would normally have the action put this in scope
or make a bean that returns this. There is a
paramProperty attribute to call a method on the bean
specified in paramName.
<%
java.util.Map params = new java.util.HashMap();
params.put("numFields", "1");
params.put("wo0", "eq");
params.put("wf0", "InvoiceStatus");
params.put("wv0", rec.getInvoiceStatus()");
pageContext.setAttribute("paramMap", params,
PageContext.PAGE_SCOPE);
%>
<html:link page="invoice/list.jsp"
paramName="paramMap">
<bean:write name="rec"
property="invoiceStatusDescription"/>
</html:link>
David
--- Raghvendra Sinha <rs...@software-automation.com>
wrote:
> A problem that I'm facing is to convert the
> following to a struts equivalent
> command, here I guess the jsp is called based on the
> multiple params passed
> to it, I couldn't find anything similar in struts.
> Please help.
>
> <td class="ft"><a
>
href="invoice/list.jsp?numFields=1&wo0=eq&wf0=InvoiceStatus&wv0=<%=rec.getIn
> voiceStatus()%>"><%=rec.getInvoiceStatusDescription
> ()%></a></td>
>
> B Rgds
> Raghu
>
> ATTACHMENT part 2 application/ms-tnef
name=winmail.dat
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/