Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can't reRender richfaces datatable from modal panel

 
Q Rahman
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18098
50
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Q Rahman
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Q Rahman
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Interestingly it doesn't work for me!
 
Annu Vinayak
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic