1

これは私の最初の質問です:)

私のコードは次のとおりです。

<?xml version="1.0"?>

<f:view xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:p="http://primefaces.org/ui"
    >

    <h:head />

    <h:body>
        <h:form id="filterForm">
            <h:outputStylesheet library="css" name="main.css" />
            <div id="filterPane">
                <h:panelGroup rendered="#{not empty filters.categories}">
                    <div class="filter">
                        <div class="filterCategories" style="width: 100%;">
                            <h4>Kategorien</h4>
                            <p />
                            <h:selectManyCheckbox layout="pageDirection"
                                value="#{filters.selectedCategories}"
                                valueChangeListener="#{filters.categoryValueChanged}">
                                <f:selectItems value="#{filters.categories}" var="category"
                                    itemLabel="#{category.displayName} (#{category.count})"
                                    itemValue="#{category.name}" />
                                <f:ajax render="@form" />
                            </h:selectManyCheckbox>
                        </div>
                    </div>
                </h:panelGroup>
            </div>
        </h:form>
    </h:body>

</f:view>

ここで@stackoverflowの前に他のいくつかと同じエラーが発生します-しかし、提案された解決策はどれもうまくいきませんでした.:

<f:ajax> contains an unknown id 'A5539:filterForm:j_idt9' - cannot locate it in the context of the component j_idt9

コード<p:selectManyCheckboxへの切り替え前は正常に機能していました。<h:selectManyCheckbox

<h:selectedManyCheckbox非 JavaScript ユーザーは PrimeFaces バリアントを選択できないため、に変更する必要があります。<h:form id="filterForm">要素を介した AJaX リクエストの結果として、フォームを再レンダリングする必要があり<f:ajax>ます。

イニシャルのほかに、次のバリアントで要素<f:ajax render="@form" />を参照しようとして失敗しました:<h:form id="filterForm">

<f:ajax render=":filterForm" />
<f:ajax render=":#{component.parent.parent}" />

私はまた、いくつかのより愚かなものを試しました.

何かヒント、誰か!? :)

4

0 に答える 0