I tried using s:include with nested s:param tags, but could not read the
parameters using the s:property tag at all.  The only way that I could read
the parameter was by using:

<%= "param1:" + request.getParameter("param1") %> 

as suggested in:
http://www.nabble.com/struts2-how-to-access-a-param-s%3Ainclude-tf2871075.html

I've had success with the following strategy (adapted to your example):

File: callPassRow.jsp

<tr id="sub-<s:property value="param1"/>">
  <td class="canFade indent2"><s:property value="name"/></td>
  <td class="canFade<s:property value="formattedDates"/> </td>
...
</tr>


File: Random jsp's
<s:set name="param1" value="%{'01234'}" scope="action"/>
<s:set name="name" value="%{'foo'}" scope="action"/>
<s:set name="formattedDates" value="%{'25Dec2006'}" scope="action"/>
<s:include value="/web/common/callpassRow.jsp" />


This feels like a Tiles-like strategy to me -- which is actually how I'm
using it:

pageToBeDisplayed.jsp:

<s:set name="analysisParameters" value="%{'includes/tile1.jsp'}"
scope="action" />
<s:include value="template.jsp" />

template.jsp:

<p>Some text</p>
<s:include value="%{#analysisParameters}" />


so that includes/tile1.jsp gets included in template.jsp which is used to
make pageToBeDisplayed.jsp
It may not be the speediest operation, but it does provide flexibility.

Hope this helps...
Ezra

-- 
View this message in context: 
http://www.nabble.com/S2----parameter-passing-%28newbie%29-question-tf3902253.html#a11437742
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to