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,无论我选择不同的行,弹出窗口都只显示我的首选。

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

  • 不处理子项创建延迟

  • 与 for 按钮操作一起使用时失败

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 .

最新更新