Creating declarative ADF Faces component
Declarative components are reusable, composite UI components that are made up of other existing ADF Faces components.
When you have a common component that you want to use multiple times consistently, declarative components can be of great help and can be useful instead of copying and pasting the same components over and over again and risk change management.
In this recipe, we will create two components, namely, a red button and a blue button. You can continue from the last recipe, or you can grab this project's recipe by cloning the CreateDeclarativeComponent
application from the Git repository.
How to do it…
To know how to create declarative ADF Faces component, perform the following steps:
Right-click on the ViewController project, select New by navigating to Gallery | JSF/Facelets | ADF Declarative Component, and click on OK.
Change
Declarative component name
toblueButton
.Change the path of the directory to be placed inside the
components
directory...