This content has been marked as final.
Show 6 replies
-
1. Re: How to reRender a component after close ModalDialog
danielc.roth Sep 29, 2008 11:54 AM (in response to jimmyan)Ask in the richfaces forum. Or read the manual, it's actually in there...
-
2. Re: How to reRender a component after close ModalDialog
dxxvi Sep 29, 2008 12:04 PM (in response to jimmyan)Suppose that Bean is the backing bean of your modal panel.
class Bean {
private String idsToRefreshOnClose;
}
This is the link to open to modal panel
<a4j:commandLink action=#{someOtherBean.action} oncomplete="script to show your modal"/>
class SomeOtherBean {
public void action() {
// get the backing bean Bean --> the easiest way is make the Bean session-scoped
bean.setIdsToRefreshOnClose("yourform:yourId, yourform:yourOtherId");
}
}
This is the link in your modal to close it:
<a4j:commandLink oncomplete="script to hide your modal" reRender="#{bean.idsToRefreshOnClose}"/>
Hope you get the idea. -
3. Re: How to reRender a component after close ModalDialog
danielc.roth Sep 29, 2008 3:37 PM (in response to jimmyan)That seems to be an awfully complicated way to do it. This is better:
<h:panelGrid id="myTableContainer"> <h:dataTable> ...... </h:dataTable> </h:panelGrid> <rich:modalPanel id="panel" width="350" height="100"> <a4j:support event="onhide" reRender="myTableContainer" /> ... </rich:modalPanel>
When the table is hidden, the onhide event occurs (see doc)... with the a4j-support tag, you will observe it and rerender the dataTable container.
-
4. Re: How to reRender a component after close ModalDialog
danielc.roth Sep 29, 2008 3:41 PM (in response to jimmyan)When the modal panel is hidden....
-
5. Re: How to reRender a component after close ModalDialog
dxxvi Sep 29, 2008 5:44 PM (in response to jimmyan)Excellent for the onhide event. Thank you.
-
6. Re: How to reRender a component after close ModalDialog
jimmyan Sep 30, 2008 3:35 AM (in response to jimmyan)Thanks Daniel Roth and Thai Dang Vu,
All solutions you give, is excellent. But I want use modal dialog, popup by js command : window.showmodaldialog or window.open. And can you give me a another solution?
Thank you.
jimmy