wood burning stoves
The moose likes JSF and the fly likes Can't reRender richfaces datatable from modal panel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Can Watch "Can New topic

Can't reRender richfaces datatable from modal panel

Q Rahman

Joined: Jul 09, 2009
Posts: 5
I am trying to automatically reRender a datatable when user click on Ok button on a modal panel. For whatever reason it isn't refreshing. What am I doing wrong here? Any help will be greatly appreciated.

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17149

I'm not surprised. Despite being on the same view definition, I'd expect the modal panel to pretty much behave like an independent view.

Since the modal panel blocks the background view (that is, after the definition of a modal dialog), you should expect that the background view is going to remain static.

The solution to that is probably going to be that you trigger the background reRender events as part of the ModalPanel's dismissal operation. Roughly speaking, that means an "onclose rerender" operation.

An IDE is no substitute for an Intelligent Developer.
Q Rahman

Joined: Jul 09, 2009
Posts: 5
Would you have any code example how to accomplish what you suggested? I tried the following, but am pretty sure this is not what you suggested.

<a4j:support event="oncomplete" reRender="promoList"/>

Jason Irwin
Ranch Hand

Joined: Jun 09, 2009
Posts: 327
The RichFaces documentation states that the modalPanel has an "onhide" event.

You should hook that.
I just tested with a modalPanel an alert statement, seems to work.

Q Rahman

Joined: Jul 09, 2009
Posts: 5
Interestingly it doesn't work for me!
Annu Vinayak

Joined: Jul 17, 2009
Posts: 19
Well.. I had faced the same problem too. Then I tried rerendering the form in which the datatable was contained and it worked. You can try that too.
Ali Irawan

Joined: Oct 27, 2009
Posts: 1
Check this out


find this text: Details of Usage
I agree. Here's the link: http://aspose.com/file-tools
subject: Can't reRender richfaces datatable from modal panel
It's not a secret anymore!