Working with dynamicComponent
There are certain cases when you want to render different components on page dynamically based on a changing model (think programmatic view object), and this cannot be determined before runtime. This can generate a huge code to generate components which can be very tedious for the developer.
Oracle ADF Faces provides a solution for the use cases with the af:dynamicComponent
tag. The af:dynamicComponent
tag can determine the component type to display and its value at runtime.
In this recipe, we will create a new page to see how can we display different input components based on of the EmployeeView
attributes using af:dynamicComponent
.
How to do it...
In order to use the dynamicComponent
, follow the ensuing steps:
Open the
adfc-config.xml
file.Drag a view and name it
dynamicComponent
.Double-click on the newly created view and choose the Oracle Three Column Layout template.
Drag
EmployeesView1
underChapter4AppModuleDataControl
from the Data Controls pane and drop it...