if this button is clicked then the dialog is closed as required BUT if I then click the commandButton id="continueButton" the action in backing bean is not called and the page re-displays with the second panel hidden (ie as if you've just entered the page initially.)
I know that description is a little difficult to follow so have included the code. Any help appreciated as I have this issue on more than one page which makes me think I am missing something in my understanding of the page layout
Code: Select all
<h:form>
<p:panel header="#{pageText.page_cancel_title}">
<p:dataTable var="schemeUnit" value="#{currentSchemeUnits}" paginator="true" paginatorPosition="bottom">
<f:facet name="header" >
<h:outputText value="#{pageText.page_cancel_units_header}"></h:outputText>
</f:facet>
<p:column >
<f:facet name="header">
<h:outputText value="#{pageText.page_customerdetails_existing_colheader_poltype}"></h:outputText>
</f:facet>
<h:outputText value="#{schemeUnit.policy.polDesc}"></h:outputText>
</p:column>
</p:dataTable>
<br/>
<p:outputPanel>
<h:panelGrid columns="2">
<h:panelGroup>
<h:outputText value="#{pageText.page_cancel_required_cancel_date}"></h:outputText>
<p:spacer width="4"></p:spacer>
<p:calendar mode="popup" readOnlyInputText="true" pattern="dd/MM/yyyy"
valueChangeListener="#{cancelBean.hidePremiumListenerOnChange}"
onSelectUpdate="confirmDetails refundCalcButton" selectListener="#{cancelBean.hidePremiumListener}"
value="#{cancelBean.cancelDate}"
mindate="#{cancelBean.earliestCancelDate}"
maxdate="#{cancelBean.latestCancelDate}"
>
</p:calendar>
</h:panelGroup>
<h:panelGroup id="refundCalcButton">
<h:panelGroup rendered="#{!cancelBean.refundDisplay}">
<p:commandButton value="#{pageText.page_cancel_button_calculate_refund}"
action="#{cancelBean.doCalcRefund}" update="confirmDetails refundCalcButton" ajax="true"></p:commandButton>
</h:panelGroup>
</h:panelGroup>
</h:panelGrid>
</p:outputPanel>
<p:outputPanel id="confirmDetails">
<p:outputPanel rendered="#{cancelBean.refundDisplay}">
<h:panelGrid columns="2">
<h:outputText value="#{pageText.page_cancel_premium_refund}" style="font-weight: bold; font-size: 1.2em;"> </h:outputText>
<h:panelGroup>
<p:commandButton value="#{pageText.page_cancel_return_title}"
onclick="cancelDialog.show()"></p:commandButton>
<p:commandButton value="#{pageText.page_cancel_confirm_title}" id="continueButton"
action="#{cancelBean.doCancelContinue}" ajax="false"></p:commandButton>
</h:panelGroup>
</h:panelGrid>
</p:outputPanel>
</p:outputPanel>
</p:panel>
</h:form>
<p:confirmDialog message="#{pageText.page_cancel_button_label_stop_confirm_detail}"
header="#{pageText.page_cancel_button_label_stop_confirm_header}" severity="alert"
widgetVar="cancelDialog">
<h:form>
<p:commandButton value="#{pageText.page_cancel_button_label_stop_confirm_yes}"
action="#{cancelBean.doCancel}" ajax="false" immediate="true"
oncomplete="cancelDialog.hide()"/>
<p:commandButton value="#{pageText.page_cancel_button_label_stop_confirm_no}" onclick="cancelDialog.hide();"
type="button" id="cancelButton"/>
</h:form>
</p:confirmDialog>