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.
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.
Declarative component nameto
Change the path of the directory to be placed inside the