1 Reply Latest reply on Dec 3, 2008 4:11 PM by Ingo Jobling

    <a4j:actionparam> with Seam's <s:link> ?

    Ingo Jobling Master


      I am attempting to use <a4j:actionparam> with Seam's <s:link>

      The paramater is included in the GET request, but its value is not being interpreted as Javascript, even though noEscape="true".

       <s:link view="page.xhtml" value="node" >
       <a4j:actionparam noEscape="true" name="param" value="screen.width" />

      Resulting URL:


      The Richfaces documentation states,
      This doesn't work with non-AJAX components.

      Is there any way I can use Richfaces to accomplish this?

      Any help much appreciated!

        • 1. Re: <a4j:actionparam> with Seam's <s:link> ?
          Ingo Jobling Master

          Geez, don't all reply at once :-)

          Anyhow, here is how I managed to include a javascript variable in the url generated for <s:link>, maybe someone else will find this useful ...

          <script type="text/javascript" >
          function interpolateJsVar(target, search, replacement){
           alert('interpolateJsVar called');
           return target.replace('='+search, '='+replacement);
          <rich:jQuery selector=".interpolateSplitterPosition" query="bind('click', function() { this.href=interpolateJsVar( this.href,'splitterPosition',splitterPosition ); });" timing="onload"/>

           <s:link view="/intranet/premises/PremisesIdentification.xhtml" value="Premises: #{premises.number}" styleClass="interpolateSplitterPosition">
           <f:param name="premisesId" value="#{premises.id}" />
           <a4j:actionparam name="splitterPosition" value="splitterPosition" />