【问题标题】:richfaces reRender executed before action listener completion在动作侦听器完成之前执行的richfaces reRender
【发布时间】:2012-05-03 23:49:15
【问题描述】:

我有一个 Richfaces listShuttle 组件,我需要对源值(左侧)进行排序。为此,在组件的值发生变化后,我有一个支持 bean 的方法来对元素进行排序,并且我想重新渲染 listShuttle。

xhtml 代码:

<a4j:region>
    <rich:listShuttle id="#{id}_listShuttle"
        sourceValue="#{bean.displayedItems}"
        targetValue="#{bean.selectedItems}" var="item"
        fastOrderControlsVisible="false" orderControlsVisible="false"
        fastMoveControlsVisible="false"
        style="margin-right:15px;margin-bottom:15px;">

        <f:converter converterId="#{converterId}" />
        <a4j:support event="onlistchanged" action="#{bean.sortList}"
            reRender="#{updateId}, #{id}_listShuttle" />

        <rich:column>
            <h:outputText value="#{item.name}" />
        </rich:column>
    </rich:listShuttle>
</a4j:region>

它是我在更多地方使用的组件,所以我向它传递了一些参数。

问题是动作action="#{bean.sortList}"是在重新渲染阶段之后执行的。我希望在重新渲染阶段之前执行此操作。

动作的顺序是这样的: - 获取显示项目 - setDisplayedItems - 排序列表

知道如何在 sortList 操作之后使 listShuttle 重新呈现吗?

【问题讨论】:

  • 你是怎么解决这个问题的,Alina?

标签: java richfaces jsf-1.2 rerender


【解决方案1】:

将 immediate=true 添加到您的 sortList 可以解决问题吗?

【讨论】:

    猜你喜欢
    • 2016-10-30
    • 2011-11-24
    • 1970-01-01
    • 2014-09-14
    • 1970-01-01
    • 2013-12-25
    • 2022-06-28
    • 2017-06-18
    • 1970-01-01
    相关资源
    最近更新 更多