Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ajax4jsf reRendering outputpanel issue

 
Lucas de Oliveira
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic