Satya
Satya

Reputation: 2124

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?

Upvotes: 1

Views: 4230

Answers (2)

prageeth
prageeth

Reputation: 7415

I assume you are using RichFaces 3.x because you are using jsf-1.2. If so, you can use the component as 'Milo vd Zee' showed but your attribute should be changed as "reRender" instead of "render". For Richfaces 4.2 "render" attribute is ok.

Upvotes: 1

Milo van der Zee
Milo van der Zee

Reputation: 1049

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

Upvotes: 8

Related Questions