简体   繁体   English

在动作侦听器完成之前执行richfaces reRender

[英]richfaces reRender executed before action listener completion

I have a Richfaces listShuttle component that I need to have the source values (left side) sorted. 我有一个Richfaces listShuttle组件,我需要对源值(左侧)进行排序。 For this purpose, after the value of the component has changed, I have a backing bean method to sort the elements, and the I want to rerender the listShuttle. 为此,在组件的值发生变化之后,我有一个支持bean方法来对元素进行排序,我想重新渲染listShuttle。

the xhtml code: 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>

It is a component I use in more places, so I pass some parameters to it. 它是我在更多地方使用的组件,所以我将一些参数传递给它。

The problem is that the action action="#{bean.sortList}" is executed after the rerender phase. 问题是在rerender阶段之后执行action action="#{bean.sortList}" I want this action to be executed before the rerender phase. 我希望在重新渲染阶段之前执行此操作。

The order of the actions is this: - getDisplayedItems - setDisplayedItems - sortList 动作的顺序如下: - getDisplayedItems - setDisplayedItems - sortList

Any idea how to make the listShuttle rerender after the sortList action? 知道如何在sortList操作后使listShuttle重新渲染吗?

将sort = true添加到sortList中可以做到吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM