struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "MK Tan" <mktan...@gmail.com>
Subject Re: [S2] <s:a> using <s:param ...
Date Thu, 05 Apr 2007 10:47:06 GMT
have u try this
<s:url id="url" action="DoIt" >
<s:param name="id" value="1"/>
</s:url>

<s:a id="link1" theme="ajax" href="%{#url}" errorText="An
error ocurred" loadingText="Loading...">
     <img border="none" src="<%=request.getContextPath()%>/images/
delete.gif"/>
 </s:a>

On 4/5/07, paul.edmondson@fifeventures.co.uk <
paul.edmondson@fifeventures.co.uk> wrote:
>
> Hello,
>
> I've been trying to use <s:a ..> but come across a problem when using
> it with <s:param> to set parameters on the action url.
>
> From the documentation there is an example:
>
>   <s:a id="link1" theme="ajax" href="/DoIt.action" errorText="An
> error ocurred" loadingText="Loading...">
>       <img border="none" src="<%=request.getContextPath()%>/images/
> delete.gif"/>
>       <s:param name="id" value="1"/>
>   </s:a>
>
> Which should results in
>
>   <a dojoType="BindAnchor" executeScripts="true" id="link1" href="/
> DoIt.action?id=1" errorText="An error ocurred"></a>
>
> However the actual result when trying this example from the browser is:
>
> <a dojoType="struts:BindAnchor"
>
>         id="link1"      href="/DoIt.action"    loadingText="Loading..."
> errorText="An error ocurred"    showError="true">
>
>       <img border="none" src="/webcomposer/images/delete.gif"/>
>
>   </a>
>
> The params do not get added to the href URL.  Does this look like a
> bug in the org.apache.struts2.components.Anchor class?
>
> Thanks for any pointers,
>
>
> Paul.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message