rich:suggestion box scrambled when reRender

I had a situation once, when i made a reRender on input, on a rich:suggestionbox, so when the reRender was made, the box was showing on the top of the web page, and i couldn’t make any selection. So the problem was because the suggestion box was rerendering itself. I removed the suggestion box from the rerender, and all worked fine.

 

Advertisements

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 !