• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Can't reRender richfaces datatable from modal panel

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Saloon Keeper
Posts: 28125
198
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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"/>

 
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Interestingly it doesn't work for me!
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 1
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Warning! Way too comfortable! Do not sit! Try reading this tiny ad instead:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic