6 Replies Latest reply on Jul 11, 2011 12:26 PM by Nick Belaevski

    Not getting <h:inputHidden> value inside an action

    Nikita Sumeiko Newbie

      I have the following code:


           <h:inputHidden id="myHidden" binding="#{myBindingConnector}" />
           <a4j:jsFunction name="callFunction" actionListener="#{...}" />
           <a href="#" onclick="fillFunction(); return false;" value="click this" />
      <script type="text/javascript">
                jQuery("input[id$='myHidden']").val("my new value");
                // $= means id contains
                }, 1000);


      So, when I am clicking on a link, I am passing a new value into myHidden input with jQuery, and after 1 second calling callFunction, which is a connector to BackEnd. Than inside the action I am calling I don't get value of hidden input, which has to come from myBindingConncetor. Do you know why?