0
<ui:define name="content">
    <h:panelGroup id="acinfo">
        <fieldset>
            <legend>#{masterdata['bank.account.info']}</legend>

            <table width="100%">
                <tr>
                    <td width="20%">#{masterdata['bank.account.name']}</td>
                    <td width="30%"><h:inputText
                            value="#{bankAccountBean.accountBank.name}" style="width:98%"
                            class="validate[required] text-input" tabindex="1" /></td>
                    <td width="20%">#{masterdata['bank.account.branch.name']}</td>
                    <td width="30%"><h:inputText
                            value="#{bankAccountBean.accountBank.namech}" style="width:98%"
                            class="validate[required] text-input" tabindex="6" /></td>
                </tr>
                ...............
            </table>
        </fieldset>
    </h:panelGroup>
    <fieldset>
        <legend> #{masterdata['bank.branch.list']} </legend>
        <p:dataTable id="account" value="#{bankAccountBean.listbankAccount}"
            var="baccount" selection="#{bankAccountBean.accountBank}"
            selectionMode="single" rowKey="#{baccount.makhtaikhoan}"
            scrollable="true" scrollWidth="1088" scrollHeight="250"
            style="text-align: left;">
            <p:ajax event="rowSelect" update="acinfo" />
            <p:column headerText="#{masterdata['bank.branch.name']}">
                <h:outputText value="#{baccount.name}" />
            </p:column>
            <p:column headerText="#{masterdata['bank.account.branch.name']}">
                <h:outputText value="#{baccount.namech}" />
            </p:column>
            <p:column headerText="#{masterdata['bank.account.code']}">
                <h:outputText value="#{baccount.makhtaikhoan}" />
            </p:column>
            <p:column headerText="#{masterdata['bank.account.number']}">
                <h:outputText value="#{baccount.mataikhoan}" />
            </p:column>
        ...........

        </p:dataTable>
    </fieldset>
</ui:define>

メイン テンプレート

<h:form id="formbutton" prependId="false">

    <div id="cont" class="contentform" style="padding-top: 16px;">
        <div style="text-align: left; height: 18px; margin-top: 10px;">
            <p:messages id="messages" autoUpdate="true" />

        </div>
        <div>
            <ui:insert name="content">Content Form</ui:insert>


        </div>
    </div>
    <div id="jSplash"></div>
</h:form>

エラー

[javax.enterprise.resource.webcontainer.jsf.application] (http-localhost-127.0.0.1-8080-6) Error Rendering View[/masterdata/CM_Bank_Account.xhtml]: javax.faces.FacesException: Cannot find component with identifier "acinfo" referenced from "account".
4

1 に答える 1

1

まず、その前にコロンを追加して、それがupdate=":acinfo"機能するかどうかを確認してください。

そうでない場合、更新を取り出して (ページが読み込まれるように)、ページ上で acinfo panelGroup を見つけた場合、その ID はまだ acinfo ですか? prependIdメイン テンプレートで false に設定されているようですが、再確認することをお勧めします。異なる場合は、代わりにそのように設定してみてください (または、その前にコロンを付けてください)。

これらの両方が失敗した場合は、prependIdフォームボタンを true に設定してみてくださいupdate=":formbutton:acinfo"

于 2012-10-19T20:58:34.983 に答える