我想在ADF中设置Master打开和关闭ShortDesc通知

时间:2015-04-07 11:37:41

标签: oracle-adf jdeveloper

我想在ADF中设置Master Turn-on和Turn-off ShortDesc Notification。对于Ex。如果单击字段如果字段有短描述,它将显示为通知,如果我想看到ShortDesc通知,我可以打开,如果我不需要,关闭。有没有办法做到这一点。?

请帮帮我。?

1 个答案:

答案 0 :(得分:0)

让我们假设您正在从数据库表中读取NOTIF_ON值 - 用户首选项。您可以实施' ShortDesc Notification'作为ADF弹出窗口,如下所示:

<af:document id="d1" title="Report">

     <af:resource type="javascript">
            function openPopup() {
             var notifOn = evt.getSource().getProperty("NOTIF_ON");
             if(notifOn) {
               var popup = AdfPage.PAGE.findComponentByAbsoluteId('p1');
               popup.show();
              }
            }
     </af:resource>

     <af:form id="f1">
       <af:outputText value="#{bindings.Field.inputValue}">
          <af:clientListener type="click" method="openPopup"/>
          <af:clientAttribute name="NOTIF_ON"
                               value="#{bindings.NotifOn.inputValue}"/>

       </af:outputText>
       <af:popup id="p1" contentDelivery="immediate">
        <af:dialog id="d2" type="none" title="ShortDesc Notification">
           <af:outputText value=#{bindings.ShortDesc.inputValue}" id="ot11"/>
        </af:dialog>
       </af:popup>
    </af:form>

  </af:document>

此外,切换NOTIF ON和OFF是将布尔值保存到表中的问题,因此很简单。