我有一个对话框,其中包含两个列表框,一个复选框和一个按钮。我尝试将这些组件的值传递到支持bean。
<p:dialog header="Add" widgetVar="dlgAdd" resizable="false"
id="dlgAddId" showEffect="fade" modal="true">
<h:form id="dlgAddForm">
<p:panelGrid columns="2">
<p:outputLabel>Name*</p:outputLabel>
<p:selectOneMenu id="addname" value="#{notificationsSettingManagedBean.customerUserEmailSetting.userNameSurname}" effect="fold">
<f:selectItems value="#{notificationsSettingManagedBean.customerUserNameSurnameList}" />
</p:selectOneMenu>
<p:outputLabel>Email-ID*</p:outputLabel>
<p:selectOneMenu id="addsurname" value="" effect="fold">
<f:selectItems value="#{notificationsSettingManagedBean.customerUserEmailsList}" />
</p:selectOneMenu>
</p:panelGrid>
<p:panel>
<div align="center">
<p:outputLabel>Email Notifications</p:outputLabel>
</div>
</p:panel>
<p:panelGrid columns="2" style="width: 100%;text-align: center;">
<p:outputLabel>Order Submitted</p:outputLabel>
<p:selectBooleanCheckbox value="#{notificationsSettingManagedBean.customerUserEmailSetting.orderSubmit}"/>
</p:panelGrid>
<div align="center">
<p:commandButton
actionListener="#{notificationsSettingManagedBean.saveCustomerEmailSettings}"
immediate="true" value="Save" ajax="true"
oncomplete="dlgAddId.hide();" />
</div>
</h:form>
</p:dialog>
在notificationsSettingManagedBean上,我创建了customerUserUserEmailSetting对象,该对象包含userNameSurname,customerUserEmailsList和ordersubmit的获取和设置方法。
问题是当尝试在支持bean的saveCustomerEmailSettings方法上获取此数据时,我看到这些数据为null。如何将它们传递给后备豆?