所选行对象在JSF中的托管bean中变为null

时间:2015-04-20 10:26:49

标签: jsf primefaces

<p:dialog widgetVar="newDialog" id="glrfDlg"
          header="Renewal Form" hideEffect="slide"
          maximizable="true" resizable="true"
          draggable="true" modal="true"
          width = "520" height = "270"
          style="font-weight:bold">

    <p:dataTable id="loanTable" var="loanDetail"
                 value="#{ManMBean.loanAccountModel}"
                 rendered="true"
                 style="width:100%; position:center;"
                 selection="#{ManMBean.selectedAccount}"
                 rowKey ="#{loanDetail.accNumber}">

        <p:column selectionMode="single" style="width:25px;text-align:center"/>

        <p:column style="text-align: center;">
            <f:facet name="header">
                <h:outputText value=" No" />
            </f:facet>
            <h:outputText value="#{loanDetail.accNumber}" />
        </p:column>

        <p:column style="text-align: center;">
            <f:facet name="header">
                <h:outputText value="Account Opening Date" />
            </f:facet>
            <h:outputText value="#{loanDetail.dateOfOpening}" />
        </p:column>
    </p:dataTable>

    <p:panel>
        <p:commandButton value="Submit"
                         action="#{ManMBean.populate}"
                         ajax="false"
                         update=":formcnt:pnlContent"/>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    </p:panel>
</p:dialog>

<h:html>代码

中包含的代码

当我选择行并提交"selectedAccount"时,null正在获取。

0 个答案:

没有答案