弹出 ADF 上的 SetPropertyListener 和 Pageflow Scope

SetPropertyListener and Pageflow Scope on popUp ADF

在任务流程中我有按钮

<af:button id="b2" icon="/images.gif" rendered="#{not isUserReadOnly}">
                  <af:setPropertyListener from="#{row.Id}" to="#{pageFlowScope.Id}" type="action"/>
                  <af:showPopupBehavior popupId=":::pu1" triggerType="click"/>
                </af:button>

最后在同一个jsff上

<af:popup childCreation="deferred" autoCancel="disabled" id="pu1">
  <af:dialog id="d1" title="title" modal="true" stretchChildren="first"
             dialogListener="#{backingBeanScope.SettlementBacking.onOKunsettle}" contentHeight="100"
             contentWidth="220">
    <af:outputText value="#{viewcontrollerBundle.text} (Id: #{pageFlowScope.Id})" id="ot11"/>
  </af:dialog>
</af:popup>

虽然

String Id = AdfUtils.getPageFlowScope("Id").toString();

在我的 java bean 中,检索正确的 ID,无论我 select 不同的行,弹出窗口只显示我的第一选择。

在以下帖子中找到 2 个答案

af:showPopupBehavior会抑制服务器事件,也就是说<af:setPropertyListener from="#{row.Id}" to="#{pageFlowScope.Id}" type="action"/>不会被执行。

https://docs.oracle.com/cd/E28280_01/apirefs.1111/e12419/tagdoc/af_showPopupBehavior.html

-- 取消客户端事件

因此,以编程方式启动弹出窗口而不是使用 af:showPopupBehavior