-
1. Re: Dynamically include modalPanel (on-demand)?
radhesh May 8, 2009 3:16 AM (in response to tw)You may create the ModalPanel programatically (Application.createComponent) in response to any action / value change listener. Once created, add the panel to the JSF component tree. Remember, you might require a seperate form for each of the modalpanel (due to an IE bug). Then, use setShowWhenRendered(true) so that the ModalPanel is displayed.
-
2. Re: Dynamically include modalPanel (on-demand)?
ipraveenjain May 8, 2009 4:52 AM (in response to tw)please give some java statement to create the modelpanel on demand
and how can i visible it in my current page?
as i also need this. -
3. Re: Dynamically include modalPanel (on-demand)?
ilya_shaikovsky May 8, 2009 7:54 AM (in response to tw)How about using rendered attribute? But b.t.w. having one modal panel but with manageable include inside seems a good solution.
-
4. Re: Dynamically include modalPanel (on-demand)?
tw May 8, 2009 11:15 AM (in response to tw)Ilya, I tried to use the rendered attribute on the modalPanel tag, too. That did not work, the panel never showed up after rendered evaluates as true. Do you have a working example for this?
-
5. Re: Dynamically include modalPanel (on-demand)?
ilya_shaikovsky May 8, 2009 11:23 AM (in response to tw)do not forget that you should not reRender conditionally rendered elements. And reRender some parent components which is always rendered instead.
-
6. Re: Dynamically include modalPanel (on-demand)?
tw May 13, 2009 1:52 PM (in response to tw)I found that reRender of a conditional include does the trick:
<a:include id="modalPanelInclude" viewId="#{modalPanelModel.isVisible() ? 'modalPanel.xhtml' : 'empty.xhtml'}"/>