-
1. Re: Render Modal Panel dynamically
ilya_shaikovsky May 2, 2008 5:09 AM (in response to mvkmahi)Let for example you use some a4j:control to call some action. In some cases after this action you should render the modal.. In this case I think more simple way will be:
1) Create some boolean property in your bean which will indicate if the panel should be called.
2) define this property via data attribute of your a4j action component
3) in oncomplete check the value of the property and call the panel if need. -
2. Re: Render Modal Panel dynamically
mvkmahi May 5, 2008 10:52 AM (in response to mvkmahi)Hi,
The ModalPanel is already rendered when the parent page loads because it is included in the parent page. I want to just show/hide the modalpanel based on some condition from my backing bean.
I am trying to do equivalent of how the two buttons "Test" and "Cancel" work, from my backing bean. Clicking Test shows the modalpanel and clicking Cancel hides it.<a4j:commandButton value="Test" onclick="ajaxBusy();" oncomplete="ajaxIdle();Richfaces.showModalPanel('testPanel')" action="#{backingBean.testAction}" reRender="newContract" /> <a4j:commandButton value="Cancel" onclick="Richfaces.hideModalPanel('testPanel');" /> All I am trying to do is like this in my backing bean. function(){ // The showModalPanel variable is set based on some business logic. if(showModalPanel){ // Here I want to do Something similar to Richfaces.showModalPanel('testPanel') }else{ //Richfaces.hideModalPanel('testPanel') } }
So can you please tell what is the equivalent of Richfaces.showModalPanel('testPanel')/Richfaces.hideModalPanel('testPanel')calling from java code/modalPanel API.
Thanks. -
3. Re: Render Modal Panel dynamically
mvkmahi May 7, 2008 9:36 AM (in response to mvkmahi)Hello,
Anyone has any tips about how to show ModalPanel using some API or setting some property on Modalpanel component similar to invoking Richfaces.showModalPanel on the click of a button from the jsp.
Is there any other way to do this?
Thanks.