Conditionally disabling af:showPopupBehavior

The JDeveloper 12.1.2.0.0 release has a new attribute for af:showPopupBehavior tag. This new attribute can be EL wired to disable the display of a af:popup conditionally. Tag doc for disabled property says:
The disabled property for  af:showPopupBehavior determines whether the client behavior should be disabled. Use this attribute to conditionally disable showing the target popup identified by popupId.

Download

You can download the sample workspace from here.
[Runs with Oracle JDeveloper  12C 12.1.2.0.0 ]

How to run this sample?

Run the popup.jsf. You may see 2 button in this page, each button on click displays a popup. The disable attribute for af:showPopupBehavior tag is EL wired for both the buttons in order to disable the display of target popup if the popup from the other button is already displayed.



Note: 
The EL expression set  for disabled property for  a af:showPopupBehaviour tag  is evaluated only once by default. So you may need to refresh the parent component (by adding it as partial target)  holding af:showPopupBehaviour tag in order to re-evaluate the EL whenever the condition changes. The above example adds buttons holding af:showPopupBehaviour as partial target from the managed bean code as appropiate.

Comments

  1. nice article. very useful.

    ReplyDelete
  2. Hi, can you please tell me how to change default 'Loading..' animation in adf? or mail me sharma9533@gmail.com

    ReplyDelete

Post a Comment