Update: This bug is fixed in upcoming JDev release.
If you develop advanced ADF declarative components, I'm sure sooner or later you would face requirement to implement custom reusable popup. Ideally we would like to invoke custom reusable popup directly from button declared in the fragment or page. This works well on runtime, but JDeveloper 11g R2 IDE generates internal NullPointerException at ScopeIdAnalyzer - I will show how to workaround it.
Sample application provides declarative ADF component with basic popup - CustomPopUp:
Once we drag and drop such component into fragment or page, we can reference ADF popup from inside of declarative component by expanding customPopUp and selecting popup ID. This ID can be mapped with showPopUpBehavior tag to display popup on button click:
This works on runtime, by on design time generates IDE error - once you press OK button to confirm popup ID:
In source mode we can see error description - seems like, JDeveloper is not able to resolve popup ID from declarative component dependency (even it is visible from the wizard):
It works on runtime, but is quite annoying to get NullPointer exception each time when working with page/fragment in IDE. Workaround: invoke popup from declarative component programmatically.
Create binding mapping for custom popup declarative component and action listener mapped with opening button:
From action listener, get instance of declarative component binding, get collection of children and retrieve oracle.adf.Popup family component - show popup:
Popup from declarative component is opened programmatically:
Download sample application (JDeveloper 11g R2) - DeclarativePopUpApp.zip.
If you develop advanced ADF declarative components, I'm sure sooner or later you would face requirement to implement custom reusable popup. Ideally we would like to invoke custom reusable popup directly from button declared in the fragment or page. This works well on runtime, but JDeveloper 11g R2 IDE generates internal NullPointerException at ScopeIdAnalyzer - I will show how to workaround it.
Sample application provides declarative ADF component with basic popup - CustomPopUp:
Once we drag and drop such component into fragment or page, we can reference ADF popup from inside of declarative component by expanding customPopUp and selecting popup ID. This ID can be mapped with showPopUpBehavior tag to display popup on button click:
This works on runtime, by on design time generates IDE error - once you press OK button to confirm popup ID:
In source mode we can see error description - seems like, JDeveloper is not able to resolve popup ID from declarative component dependency (even it is visible from the wizard):
It works on runtime, but is quite annoying to get NullPointer exception each time when working with page/fragment in IDE. Workaround: invoke popup from declarative component programmatically.
Create binding mapping for custom popup declarative component and action listener mapped with opening button:
From action listener, get instance of declarative component binding, get collection of children and retrieve oracle.adf.Popup family component - show popup:
Popup from declarative component is opened programmatically:
Download sample application (JDeveloper 11g R2) - DeclarativePopUpApp.zip.