rich:list/rich:dataTable中的Richfaces: a4j:status在所有行中触发



将richface3迁移到richface4时发生的问题:

我想在这里放置状态指示器(a4j:status)来指示rich:list/rich:dataTable中每一行的变化。但是现在,当其中一行更改(keyup)时,会触发所有行中的a4j:status。

它在richface3之前工作,但不是在richface4谁可以帮助?

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

按名称引用<a4j:status>。因为所有的状态都有相同的名字,所以它们都被调用了。您需要为每个目录指定一个惟一的名称,如:

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

最新更新