*
The moose likes JSF and the fly likes ajax4jsf reRendering outputpanel issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "ajax4jsf reRendering outputpanel issue" Watch "ajax4jsf reRendering outputpanel issue" New topic
Author

ajax4jsf reRendering outputpanel issue

Lucas de Oliveira
Greenhorn

Joined: Mar 18, 2009
Posts: 1
Hi all!
I'm having issues to rerender a panelGrid that is inside a ajax4jsfutputPanel. Basically I have a datatable full of rows, each one with a ajax4jsf:commandButton, where the user clicks and then an ajax4jsfutputPanel (that is inside a rich:modalPanel ) is reRendered. The problem is: the panelGrid inside the outputPanel is not being filled with the data retrieved by the managedBean and the getter method of the binding works only at the first time the page is rendered (not being called again when the output is rerendered).

Check the following xhtml code:

I already tried adding "panelGrid" to the reRender list but I still got the same behaviour (no errors, the panelGrid is simply not rerendered).

Any ideas, suggestions?

thanks in advance!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16022
    
  20

I have no definite answer, since I'm too lazy to RTFM and have mercifully managed to suppress the recurring nightmares I have of similar issues. However, there are 2 things worth investigating:

1. In straight HTML, forms are hermetic, non-nestable objects - what's managed in one form is totally separate from what's managed in another. In RichFaces, I'm not sure that matters, since the JavaScript infrastructure coupled with JSF protocols is capable of looking up the DOM and back down again to access whatever it chooses, but it's possible you've offended it by using 2 separate forms.

2. You're using oncomplete, and this may be suppressing the normal reRender AJAX code. Unfortunately, the RichFaces documentation is rather lacking about such things and not very predictable. I've found that in some cases, the extra JavaScript code being generated has side effects that required me to return a value in my event code or do similar things. Since it wasn't documented, I had to examine the actual generated page code to see why things weren't doing what I though they should.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ajax4jsf reRendering outputpanel issue