1

this is my 1st question here :)

My code is as follows:

<?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>

I get the same error as some others before me here @stackoverflow - but none of the suggested solutions worked for me.:

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

Before my switch from <p:selectManyCheckbox to <h:selectManyCheckbox the code was working fine.

We need to change to <h:selectedManyCheckbox, because the PrimeFaces variant is not selectable for a non-JavaScript user. I need the form <h:form id="filterForm"> to be re-rendered as a consequence of my AJaX request via the <f:ajax> element.

Beside the initial <f:ajax render="@form" /> I unsuccessfully tried to reference the <h:form id="filterForm"> element with the following variants:

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

I also tried some more stupid ones.

Any hint, anybody!? :)

4

0 回答 0