4 Replies Latest reply on Mar 12, 2010 1:20 AM by Harut Sargsyan

    How to reRender a component via a Javascript function???

    Peter Len Apprentice

      Hello,

       

      I am wondering if it is possible to reRender a component via a javascript call rather than through the reRender attribute on an a4j component.  As an example, I do something in the client that requires me to use SEAM Remoting.  When my remoting javascript callback function is called, I would like to reRender a rich:tree.  I have gotten this behavior to work currently through the following:

       

      1) Create a hidden a4j commandButton that simply does a reRender of the tree.

      2) When my remoting javascript callback function is called, I use javascript to "click" the hidden commandButton.

       

      This works, at least for now, but this seems to be a kludge and not the proper way of doing it.  Is there is a proper way of doing it or if the SEAM/JSF/RichFaces framework does not have a way to get this behavior?  I am hoping that there is a way to get ahold of the component via javascript and then call something like rerender() on it.

       

      Thanks for any thoughts - Peter