-
1. Re: Rerender and show a modal panel after an Ajax request co
chawax Dec 6, 2007 4:12 AM (in response to chawax)Sorry, there was a big mistake in my a4j:commandButton : the value for reRender was wrong. It has to be "panelDetailDemandeAbsence", not "detailDemandeAbsence". Anyway, I changed this, but now the oncomplete event is never fired, so the modal panel is never shown ... Can someone tell me what I do wrong ?
-
2. Re: Rerender and show a modal panel after an Ajax request co
fmarwede Dec 6, 2007 4:12 AM (in response to chawax)Perhaps this has something to do with the known bug
http://jira.jboss.org/jira/browse/RF-1487.
Ilya, can you confirm that?
@chawax: If so, please vote for that bug. -
3. Re: Rerender and show a modal panel after an Ajax request co
chawax Dec 6, 2007 4:20 AM (in response to chawax)Yes, you may be right, it's the same kind of problem. Note the oncomplete event was fired when my reRender attribute was wrong, so maybe the problem deals with the reRender feature ?
P.S. : english is not my native language, so why do you mean by "vote for that bug" ? -
4. Re: Rerender and show a modal panel after an Ajax request co
chawax Dec 6, 2007 4:25 AM (in response to chawax)No need to answer, I had not seen the "vote" link in JIRA ;)
-
5. Re: Rerender and show a modal panel after an Ajax request co
mail.micke Dec 6, 2007 5:07 AM (in response to chawax)Hi
There is another JIRA somewhere about adding support for rerendering the entire modalpanels, which doesn't work at the moment.
Instead you can wrap the content of the modalpanel inside a <a4j:outputPanel id="hej" layout="inline/> and rerender that one.
That works for me.
Cheers -
6. Re: Rerender and show a modal panel after an Ajax request co
chawax Dec 6, 2007 7:10 AM (in response to chawax)It works perfect, thanks a lot !
-
7. Re: Rerender and show a modal panel after an Ajax request co
rhasselbaum Jan 31, 2008 1:06 PM (in response to chawax)I'm trying to use this same technique to show a modal dialog after calling an action. It works--but only intermittently. The action gets called consistently when I click the command link, but the modal dialog only shows up about 25% of the time. Has anyone else seen this behavior? I'm using RichFaces 3.1.3 with Seam 2.0.1 CR2.
Is there any other technique for calling an action and then displaying a modal dialog? I'd expect this to be a very typical usage pattern, but it's not discussed in the documentation I've seen. -
8. Re: Rerender and show a modal panel after an Ajax request co
ilya_shaikovsky Feb 1, 2008 5:31 AM (in response to chawax)could you please show your code?
-
9. Re: Rerender and show a modal panel after an Ajax request co
rhasselbaum Feb 2, 2008 12:22 PM (in response to chawax)Here is my code:
<rich:panel> <h:form> ... <a4j:commandLink action="#{orderEntryController.createProperty}" value="Add a property" reRender="propertyDialogPanel" oncomplete="Richfaces.showModalPanel('propertyDialog')"/> ... </h:form> </rich:panel> ... <a4j:outputPanel id="propertyDialogPanel" layout="inline"> <rich:modalPanel id="propertyDialog" width="400" height="400"> <h:form> <f:facet name="header">Edit property</f:facet> <p>Hello world</p> <p><a href="javascript:Richfaces.hideModalPanel('propertyDialog')">Cancel</a></p> </h:form> </rich:modalPanel> </a4j:outputPanel>
Thanks for having a look. -
10. Re: Rerender and show a modal panel after an Ajax request co
sergeysmirnov Feb 2, 2008 4:47 PM (in response to chawax)1. it is against the standard to insert block content inside the inline content. If you use a default RichFaces filter, the TIDY validator closes inline output panel during the first Ajax update. So, during the next update, the modal panel will be out of the update area
2. It is much better to re-render the content of the modal panel then the modal panel itself (or the parent of the modal panel). I.e. put some panel (a4j:outputPanel, h:panelGroup, h:panelGrid) and point to it with reRender. Do not forget about inline-block rule.
3. due to the bug in IE, the DOM element of the modal panel is moved to the top of the DOM tree away from the original container. So, you code have even less chance to work in IE