首页 > 解决方案 > 为什么updateActionListener在commandButton的actionListener之前执行?

问题描述

我在我的页面上使用命令按钮:

<h:commandButton value="Create" action="#{orderList.getCreateBatchOrderNav}" actionListener="#{orderList.createBatchOrder}" >
    <t:updateActionListener property="#{orderForm.orderId}"
                value="#{orderList.newCreatedBatchOrderId}" />
</h:commandButton>

问题是,那updateActionListener是在 of 之前执行actionListenercommandButton。updateActionListener 使用的值orderList.newCreatedBatchOrderId仅在orderList.createBatchOrder执行时计算。

如何更改执行顺序?

标签: jsf

解决方案


推荐阅读