Modal Panel Action problem
bolsover Dec 14, 2009 12:35 PMI have a problem with a <a4j:commandLink > within a modal panel NOT calling the associated action; the cose is as follows:
The modal panel is opened with the following:
{code}<a4j:commandLink oncomplete="#{rich:component('editDocModalPanel')}.show()"
reRender="edocgrid, edocco, edocpr, edocti, edocds, edocnr, edocar, edocdd, edocry, edocrd, edocfn"
action="#{ProductBean.actionEditDocument}" value="Edit" >
<a4j:actionparam name="docid" value="#{document.id}" ></a4j:actionparam>
</a4j:commandLink>{code}
Action method called above pre-populates the relevant fields (referenced in rerender attribute) in the modal dialog and the dialog displays:
The problem is that clicking the save link does NOT call the action:
{code}<rich:modalPanel id="editDocModalPanel" autosized="true" width="400"
moveable="true" resizeable="false" >
<f:facet name="header"><h:outputText value="Edit Document Detail"></h:outputText>
</f:facet>
<f:facet name="controls">
<h:panelGroup>
<h:graphicImage value="/images/modal/close.png" styleClass="hidelink" id="editdochidelink"/>
<rich:componentControl for="editDocModalPanel" attachTo="editdochidelink" operation="hide" event="onclick"/>
</h:panelGroup>
</f:facet>
<h:form id="editform">
<rich:panel>
<h:inputHidden value="#{ProductBean.editDoc.id}" />
<h:inputHidden value="#{ProductBean.editDoc.fdata}" />
<h:inputHidden value="#{ProductBean.editDoc.element}" />
<h:inputHidden value="#{ProductBean.editDoc.mimetype}" />
<h:inputHidden value="#{ProductBean.editDoc.classid}" />
<h:inputHidden value="#{ProductBean.editDoc.status}" />
<h:inputHidden value="#{ProductBean.editDoc.modifier}" />
<h:panelGrid id="edocgrid" columns="2" >
<h:outputText value="Company" /><h:inputText id="edocco" value="#{ProductBean.editDoc.customer_id}" />
<h:outputText value="Document Class" /><h:inputText id="edocpr" value="#{ProductBean.editDoc.product_id}" />
<h:outputText value="Title" /><h:inputText id="edocti" value="#{ProductBean.editDoc.title}" />
<h:outputText value="Description" /><h:inputText id="edocds" value="#{ProductBean.editDoc.description}" />
<h:outputText value="Narrative" /><h:inputText id="edocnr" value="#{ProductBean.editDoc.narr}" />
<h:outputText value="Archive Location" /><h:inputText id="edocar" value="#{ProductBean.editDoc.archived}" />
<h:outputText value="Document Date" /><rich:calendar id="edocdd" value="#{ProductBean.editDoc.ddate}" />
<h:outputText value="Retention Years" /><h:inputText id="edocry" disabled="true" value="#{ProductBean.editDoc.ryears}" />
<h:outputText value="Retention Date" /><rich:calendar id="edocrd" disabled="true" value="#{ProductBean.editDoc.rdate}" />
<h:outputText value="File Name" /><h:inputText id="edocfn" disabled="true" value="#{ProductBean.editDoc.fname}" />
<a4j:commandLink id="saveEditBut" action="#{ProductBean.saveEditDoc}" value="Save" />
</h:panelGrid>
</rich:panel>
</h:form>
</rich:modalPanel>{code}
What do I need to do to get the ProductBean.saveEditDoc action called?