I'm currently using primefaces 7.0.23 in a project.
I need to make a confirm dialog having a booleancheckbox inside (see example code below).
My Problem is, that the checkbox always returns 'false' to the bean.
I suppose it has something to do with the fact, that the confirmDialog is generated outside the <h:form> element on runtime. If i use the exact same checkbox-code somewhere inside the <h:form> the the select-state is correctly put into the bean.
Does anyone have a clue on how I must define the xhtml-code in order to have the checkbox work correctly inside the dialog?
Code: Select all
<p:confirmDialog widgetVar="confirmToTakeOverStandaloneAnswers" showEffect="fade" id="confirmToTakeOverStandaloneAnswers"
hideEffect="fade" appendTo="@(body)"
header="..."
message="...">
<h:panelGroup>
<h:outputText value="..."></h:outputText>
<p:selectBooleanCheckbox id="takeOverSpecificBox"
value="#{data.reportBean.takeOverSpecificSelect}"
itemLabel="takeover additional info" >
<p:ajax event="change" process="@this"/>
</p:selectBooleanCheckbox>
<BR />
<p:commandButton ...for ok/>
<p:commandButton ...for cancel/>
</h:panelGroup>
</confirmDialog>
Thanks for any help
Alex