Search code examples
jsfrichfacesjsf-1.2

reRender via JS API


I was wondering if there is any JS function in jsf/richfaces which does the same functionality as that of reRendering a component.

Also will the reRender work on any component which has display:none style?


Solution

  • You could use a4j:jsFunction with 'render' set. Then from javascript call the jsFunction and the render will be done. I think that render does not check the display style setting.

    <h:form>
        <a4j:jsFunction name="render" render="componentToRenderId"/>
    </h:form>
    
    <script>
      render();
    </script>
    

    MAG, Milo van der Zee