سؤال

Issue happening when migrate richface3 to richface4:

here I want to put status indicator(a4j:status) to indicate change of each row inside rich:list/rich:dataTable. but now a4j:status in all row is fired when one of the row change(keyup).

it works before in richface3, but not in richface4 anybody can help?

        <rich:list value="#{identity.user.roleList}" var="_role">
        <a4j:region>
            <h:inputText value="#{bean.text}">
                <a4j:ajax status="y" event="keyup" />
            </h:inputText>
            <a4j:status id="x" name="y">
                <f:facet name="start">
                    <h:graphicImage name="img/load_small.gif" />
                </f:facet>
            </a4j:status>
        </a4j:region>
    </rich:list>
هل كانت مفيدة؟

المحلول

The <a4j:status> is referenced by name. Since all your statuses have the same name all of them are being called. You need to give each one a unique name, like this:

<rich:list value="#{identity.user.roleList}" var="_role" rowKeyVar="rk">
    <a4j:region>
        <h:inputText value="#{bean.text}">
            <a4j:ajax status="y#{rk}" event="keyup" />
        </h:inputText>
        <a4j:status id="x" name="y#{rk}">
            <f:facet name="start">
                <h:graphicImage name="img/load_small.gif" />
            </f:facet>
        </a4j:status>
    </a4j:region>
</rich:list>
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top