1 Reply Latest reply on Sep 28, 2007 4:41 AM by knuwu

    How to pass param from inputText to s:link

    jagr

      I want to specify param value on s:link with a h:inputText value.

      <s:link action="#{actions.doSomething}" value="#{messages.actions_doSomething}">
      <f:param name="param1" value="¿?¿?¿?¿"/>
      </s:link>

      <h:inputText id="paramFromUser" />

      I want that the f:param on s:link, takes the value of h:inputText that the user has wrote on field.

      Thanks!

        • 1. Re: How to pass param from inputText to s:link

          Hi jagr

          Try using the rich faces ajax tags included in seam 1.2.1

          in Class SomeBean

          <h:inputText id="paramFromUser" value="#{someBean.paramFromUser}">
           <a4j:support event="onkeyup" ajaxSingle="true" reRender="myLink"/>
          </h:inputText>
          
          <s:link id="myLink" action="#{actions.doSomething}" value="#{messages.actions_doSomething}">
           <f:param name="param1" value="#{someBean.paramFromUser}"/>
          </s:link>
          


          Every time the user is typing a character in the inputfield a ajax request is sended back to the server, the bean value is updated an the link element will be updated with the new bean value as a parameter.

          Give it a try.

          Greetings Ralph