JSF Rerender mistake

I had an error, with a4j:support, reRender, when i tried to make a reRender onchange on a suggestion box, or on a combo box. So the thing was that the component i was re rendering had an attribute rendered, which was wrong, because the reRender should be made on a parent of the component which contained the rendered condition, that because the reRender algorithm doesn’t know the component that need’s to be rendered, if it has a rendered attribute. So the explanation is on exadel’s web site live demo:

http://livedemo.exadel.com/richfaces-demo/richfaces/ajaxAttributes.jsf?c=ajaxattributes&tab=usage

And from there we find out the following thing:

Therefore, after the component becomes rendered during the Ajax request, RichFaces delivers the rendered code to the client, but does not update a page, because the place for update is unknown. You need to point to one of the parent components that has no ‘rendered’ attribute. As an alternative, you can wrap the component with a4j:outputPanel layout=”none”.

So we shold have the following code (as an example):

<a4j:outputPanel id=deb_Details”>
<h:panelGroup rendered=”condition”>
<rich:columnGroup>
containings…
</rich:columnGroup>
</h:panelGroup>
</a4j:outputPanel>

si in alta parte:

<a4j:support reRender=”deb_Details”/>

So the thing should be solved now. Thank God !

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s