Book Image

Oracle ADF Faces Cookbook

By : Amr Ismail Gawish
Book Image

Oracle ADF Faces Cookbook

By: Amr Ismail Gawish

Overview of this book

Table of Contents (18 chapters)
Oracle ADF Faces Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Using the inputColor component


The inputColor component allows users to pick a color from a color palette. It presents a text input field for entering a color's hexadecimal code, usually in the format #RRGGBB. The component also displays a button for picking colors from a palette in a pop up.

In this recipe, we will add an inputColor component to the Employees form created in the first recipe to show the Favorite Color attribute.

How to do it...

In order to add inputColor, follow the ensuing steps:

  1. Open the inputComponents.jsf page.

  2. Drag the FavColor attribute under EmployeesView1 in Chapter4AppModuleDataControl from the Data Control pane and drop it inside the panel form layout.

  3. Select Text from the drop-down menu and select ADF Input Text w/Label.

  4. Right-click on the inputText component and go to Convert to… | Input Color.

  5. Change the Compact attribute to true.

  6. Save everything.

  7. Run the inputComponets.jsf page. You should see the page as shown in the following screenshot:

How it works...

The inputColor...