0

まず、JSF 1.2 / Richfaces 3.3 /Tomahawk1.1.9で作業しています。

私はこのコードを1つのJSFページ内に持っています(簡略化):

<h:form id="mainForm">
(...)
<h:panelGroup id="grupSelMalaltia">
    <rich:panel header="Panel Name">
        <t:subform id="selMalaltiesForm">

            <rich:dataTable align="center" id="dataSelMalalties" value="#{TaulaMalalties.listMalalties}" var="cMal">

                (some <rich:column>)

                <rich:column>
                    <t:commandLink actionFor="selMalaltiesForm" action="select_malaltia">
                        <f:param name="has_selection" value="true">
                        <h:graphicImage url="/Icons/select.png" />
                    </t:commandLink>
                </rich:column>
            </rich:dataTable>

        </t:subform>
    </rich:panel>
</h:panelGroup>
<h:form>

このエラーが発生します:

INFO: Unable to find component 'selMalaltiaForm' (calling findComponent on component 'mainForm:selMalaltiesForm:dataSelMalalties:0:j_id_jsp_2136723630_43'). We'll try to return a guessed client-id anyways - this will be a problem if you put the referenced component onto a different naming-contaier. If this is the case you can always use the full client-id.

ボタンが押されたら、このサブフォームを送信したいだけです(同様のコードで問題なく実行される他のJSFページがあります)。現時点では、この問題のため、この結果は得られません。

この誤動作をどのように解決できますか?前もって感謝します。

4

1 に答える 1

0

を使用し、処理する/処理する必要のあるコンポーネントのIDを使用してタグ属性を<a4j:commandLink>設定することをお勧めします。process

提案されたJSFコードに基づいて、次のように実行できます。

<rich:panel header="Panel Name">
    <rich:dataTable align="center" id="dataUnselMalalties"
        value="#{TaulaMalalties.listMalalties}" var="cMal">
        <!-- richfaces columns with info -->
        <rich:column>
            <!-- processing the datatable only -->
            <a4j:commandLink action="#{TaulaMalalties.select_malaltia}"
                process="dataUnselMalalties" limitToList="true">
                <f:param name="has_selection" value="true">
                <h:graphicImage url="/Icons/select.png" />
            </a4j:commandLink>
        </rich:column>
    </rich:dataTable>
</rich:panel>

これについての詳細:

于 2012-11-09T15:02:40.093 に答える