struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wes Wannemacher <w...@wantii.com>
Subject Re: Specifying a target while using the <s:a> tag
Date Fri, 16 Jan 2009 05:25:59 GMT
On Fri, 2009-01-16 at 10:32 +0530, Rajeshwari Godbole wrote:
[snip]
> 
> Here is a snippet of my code in the jsp:
> 
> <s:url id="url2" includeParams='none' action="chartView">
>     <s:param name="toDate">
>         <s:property value="toDate" />
>     </s:param>
>     <s:param name="fromDate">
>         <s:property value="fromDate" />
>     </s:param>
> </s:url>
> <ul>
>     <li><s:a href="%{url2}">View Chart</s:a></li>
>     <li><a
>         href="<s:url id='url2' includeParams='none'
> action='chartView'><s:param name='toDate'><s:property value='toDate'
> /></s:param><s:param name='fromDate'><s:property value='fromDate'
> /></s:param></s:url>"
>         target="contentFrame">View Chart2</a></li>
> </ul>
> 
> <iframe id="contentFrame" name="contentFrame" scrolling="no" align="center"
> frameborder="0" width="520px"
>     height="750px" style="overflow:hidden;"></iframe>

I have been successful using the vanilla HTML 'a' tag with the <s:url.
Try this - 

<a href="<s:url id='url2' includeParams='none' action='chartView'>
  <s:param name='toDate' value='%{toDate}' />
  <s:param name='fromDate' value='%{fromDate}' />
</s:url>" target="contentFrame">View Chart2</a>



-- 
Wes Wannemacher
Author - Struts 2 In Practice 
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message