0 Replies Latest reply on Aug 1, 2007 5:37 AM by Michal Glowacki

    Update h:inputHidden value

    Michal Glowacki Novice

      hi

      I'm fighting with this for few hours and have no more ideas how to solve it...

      I have a page with h:inputHidden component which holds value of currently displayed item. I have also a4j:commandLinks which switch between items. The problem is I cannot update value of hidden field using reRender. It's big problem to me, because I also have some custom ajax code, which in given intervals takes value of this field and sends request to servlet. Unfortunaly the value is the same as set when page was loaded.

      What I do wrong that I cannot update hidden field value?


      <a4j:commandLink action="#{pageBean.updateItemId}" immediate="true" reRender="panel" value="Another item"/>
      <a4j:outputPanel id="panel">
       <h:inputHidden binding="#{pageBean.itemIdHidden}" id="itemIdHidden" value="#{pageBean.itemId}"/>
      </a4j:outputPanel>
      


      I also reRender other components using this commandLink, and it works. Only this field is updated. Also method "pageBean.itemId" is never invoked after clicking on the link...

      Thanks for any help
      Michal