【问题标题】:Richfaces: a4j:status inside rich:list/rich:dataTable fires in all rowRichfaces: a4j:status inside rich:list/rich:dataTable 在所有行中触发
【发布时间】:2014-03-17 07:32:04
【问题描述】:

将richface3 迁移到richface4 时出现的问题:

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

它以前在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>

【问题讨论】:

    标签: jsf migration richfaces


    【解决方案1】:

    &lt;a4j:status&gt; 按名称引用。由于您的所有状态都具有相同的名称,因此它们都被调用。你需要给每个人一个唯一的名字,像这样:

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

    【讨论】:

      猜你喜欢
      • 2012-09-22
      • 2017-11-11
      • 2013-10-14
      • 1970-01-01
      • 2019-07-23
      • 1970-01-01
      • 2011-10-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多