-
1. Re: reRender blocks oncomplete call with Modalpanel (bug?)
stevoffm Feb 22, 2008 9:02 AM (in response to stevoffm)Hm, I really would like to know if this is a bug or a technical restriction?
Hey developers, a short statement would be enough! I really tried this out a whole day, and an answer would be really nice!
I claim that what ilya_shaikovsky said in thread:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=117790
does not work...
Meaning that reRendering a modal panel or a component that contains the modal panel and showing it afterwards via oncomplete in the same action won't work. Is that true?
[/url] -
2. Re: reRender blocks oncomplete call with Modalpanel (bug?)
fmarwede Feb 22, 2008 10:32 AM (in response to stevoffm)Try to reRender not the modal panel itself but the content of the modalPanel.
-
3. Re: reRender blocks oncomplete call with Modalpanel (bug?)
mail.micke Feb 22, 2008 10:33 AM (in response to stevoffm)Hi
You shouldn't reRender the actual modal panel, instead you should reRende its content.
Try wrapping the content in a a4j:outputPanel and re render that, it works for me.
Can't comment on rerendeing a component which wrapps the entire panel, haven't tried that.
Cheers -
4. Re: reRender blocks oncomplete call with Modalpanel (bug?)
stevoffm Feb 23, 2008 7:14 AM (in response to stevoffm)Hi,
at first I want to thank you for the replies. Rerendering the content of the modal panel is a possible solution. But it only makes sense when you create the modal panel via a tag on the page. What I tried was to dynamically create it. ThereforeI need to rerender the whole panel or the parent element, that contains it. It is like the example that ilya posted.
It looks like it does not work this way, so what I do right now is to dynamically create the a4j:panel inside the panel and have the modal panel itself rendered via the page tag. I'm not satisfied with this solution because I cant change the header dynamically for example.
If sw. has to meet the same requirement to create and show a panel completely dynamically I would appretiate any coments on how this can be done...
Cheers -
5. Re: reRender blocks oncomplete call with Modalpanel (bug?)
mail.micke Feb 23, 2008 8:18 AM (in response to stevoffm)I see, you are using a binding for your modal panel.
When I get back to work on Monday I'll see if I can't try to reRender a component which wraps a modal panel. To see if it works when not using a binding.
When dynamically creating the modal panel; can't you create the a4j:outputPanel dynamically as the modal panel content and assign it an id that you use when rerendering.
Same goes for the header .
Then use those two ids when rerendering. Not a pretty solution I know but it might work ;)
Cheers -
6. Re: reRender blocks oncomplete call with Modalpanel (bug?)
stevoffm Feb 25, 2008 2:42 AM (in response to stevoffm)Hi,
in fact I do create a dynamic a4j:outputPanel, but I directly bind it to the component on the page:<rich:modalPanel id="mp" height="200" width="400" zindex="2000" resizeable="false" moveable="false"> <f:facet name="header"> <h:outputText value="Modal Panel Title" /> </f:facet> <f:facet name="controls"> <h:graphicImage value="/img/close.gif" style="cursor:pointer" onclick="Richfaces.hideModalPanel('mp')" /> </f:facet> <a4j:outputPanel binding="#{eventBean.mpContent}" id="mp_content" /> </rich:modalPanel>
This way I am not able to dynamically change the header. I could also bind the facets but as you said it's not that straight ;-)
I already tried both: creating a modal panel dynamically and creating it via the page tag (like this first example I posted in this thread) and both did not work as soon as I reRender the panel itself or the parent component. You could try the code snippet in my first post here and tell me if you got it running if you have time :)
Cheers and thanks -
7. Re: reRender blocks oncomplete call with Modalpanel (bug?)
mail.micke Feb 25, 2008 4:00 AM (in response to stevoffm)Hi
I just tested adding a<a4j:outputPanel id="mpWrapper">
around a modal panel, and it worked for me.
Try adding a a4j:log to your page and see what happens with the request.
Good luck,
Micke