-
1. How to show modalPanel from the backing bean event?
ilya_shaikovsky Feb 24, 2011 7:53 AM (in response to v.bannur)use showWhenRendered attribute pointed to some controller property which will be set to true in action when need. And do not forget to reRender panel.
-
2. How to show modalPanel from the backing bean event?
v.bannur Feb 24, 2011 8:27 AM (in response to ilya_shaikovsky)Thats great. I was using rendered attribute. However how to reRender panel out of two modalPanel.
Is it correct oncomplete="#{rich:component('BackingBean.modalPanelID')}.show()" ?
-
3. How to show modalPanel from the backing bean event?
ilya_shaikovsky Feb 24, 2011 8:31 AM (in response to v.bannur)that's the second way... add conditional oncomplete call. e.g. put some flag to requestMap and show the panel if it's there. Here is analogous example which uses facesContext http://livedemo.exadel.com/richfaces-demo/richfaces/dataTable.jsf?tab=editDataTable&cid=390122. see the closure of the edit panel
-
4. How to show modalPanel from the backing bean event?
v.bannur Feb 24, 2011 8:33 AM (in response to ilya_shaikovsky)Hi ILya,
I have added showWhenRendered attribute.
<a4j:jsFunction name="ajaxSubmit" oncomplete="#{rich:component('panel')}.show()" reRender="editContent" />
<rich:modalPanel id="panel" resizeable="true" showWhenRendered="#{calendarDataModel.value}" >
In backing bean i am setting value is false. Eventhough the popup is showing.
-
5. How to show modalPanel from the backing bean event?
ilya_shaikovsky Feb 24, 2011 8:38 AM (in response to v.bannur)hey you have oncomplete="#{rich:component('panel')}.show()".. so it will be shown every time.
change to:
<a4j:jsFunction name="ajaxSubmit" reRender="panel" />
<rich:modalPanel id="panel" resizeable="true" showWhenRendered="#{calendarDataModel.value}" >
and make it dependent on id only.
-
6. How to show modalPanel from the backing bean event?
ilya_shaikovsky Feb 24, 2011 8:40 AM (in response to ilya_shaikovsky)and make it dependent on id only.
and make it dependent on showWhenRendered only.
-
7. Re: How to show modalPanel from the backing bean event?
v.bannur Feb 24, 2011 9:45 AM (in response to ilya_shaikovsky)Thank you very much. Its very helpful.
However i have two modal panel and on action.
<a4j:jsFunction name="ajaxSubmit" oncomplete="#{calendarDataModel.panel}.show" />
<rich:modalPanel id="panel" resizeable="true" showWhenRendered="#{calendarDataModel.value}" >
<rich:modalPanel id="panel1" resizeable="true" showWhenRendered="#{calendarDataModel.value1}" >
In backing bean i will decides which one to show, panel attribute should be either panel1 or panel and value attribute should be value=true or value1=true.
Is it correct way?
-
8. Re: How to show modalPanel from the backing bean event?
v.bannur Feb 24, 2011 9:53 AM (in response to ilya_shaikovsky)Hey I got it.
I am using conditional on oncomplete.
<a4j:commandButton actionListener="#{calendarBean.callAction}" value="Button" oncomplete="#{calendarBean.value?rich:component('editPanel'):rich:component('editP')}.show()">
</a4j:commandButton >
Thank you very much for your help.