wood burning stoves 2.0*
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


JavaRanch » Java Forums » Java » JSF
Bookmark "Can Watch "Can New topic
Author

Can't reRender richfaces datatable from modal panel

Q Rahman
Greenhorn

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: 16092
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Q Rahman
Greenhorn

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.
http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/docs/devguide/en/html/rich_modalPanel.html

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


SCJP6
Q Rahman
Greenhorn

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

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
Greenhorn

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

http://docs.jboss.org/richfaces/latest_3_3_X/en/devguide/html/rich_modalPanel.html

find this text: 6.10.1.3. Details of Usage
 
Consider Paul's rocket mass heater.
 
subject: Can't reRender richfaces datatable from modal panel