10 Replies Latest reply: Sep 17, 2007 9:29 AM by Konstantin V. Grigoriev RSS

rerender modalPanel on showing

Matthias Imhof Newbie

I need to rerender the content of a modalPanel before show it.
But the rerender-attribute does not work or it works in a wrong order.
Is there a possibility to set the order action and rerender are called ?
Or is there a way to rerender the actionContent on showing ?

Open the modalPanel that way:

<rich:menuItem submitMode="none"
 icon="/images/new.gif">
 <a4j:commandLink id="NewAction"
 action="#{resourceController.newAction.activate}"
 reRender="actionDialog"
 oncomplete="javascript:Richfaces.showModalPanel('actionDialog')">
 <h:outputText value="Hinzufügen" />
 </a4j:commandLink>
</rich:menuItem>


The modalPanel look like that:
<rich:modalPanel id="actionDialog" resizeable="false">
 <f:facet name="header">
 <h:outputText id="actionTitle" value="#{actionController.action.title}" />
 </f:facet>
 <f:facet name="controls">
 <h:graphicImage id="actionCloseIcon" value="/images/close.gif"
 onclick="javascript:Richfaces.hideModalPanel('actionDialog')" />
 </f:facet>
 <a4j:form id="modalPanel">
 <h:panelGrid columns="1">
 <h:panelGrid binding="#{actionController.actionContent}" />

 <h:panelGrid columns="2">
 <a4j:commandButton id="actionOk" value="Ok"
 reRender="#{actionController.action.reRender}"
 action="#{lumosController.action.execute}"
 oncomplete="javascript:Richfaces.hideModalPanel('actionDialog')" />
 <a4j:commandButton id="actionCancel" value="Cancel"
 onclick="javascript:Richfaces.hideModalPanel('actionDialog')" />
 </h:panelGrid>
 </h:panelGrid>
 </a4j:form>
</rich:modalPanel>