When you need to pick a color from a popup you can deal with ADF component called af:InputColor.
Use Case
Need coloring a number values according to specific ranges.
Example:
Numbers between 0 and 50 will be colored with black.
Implementations
Create a table that saves the desired color for each specific range.
Because the InputColor component needs a value of type Color, create a transient attribute with type java.awt.Color , you will change the type at XML level manually:When page loads you will need to get a color object, so convert the color string to object of type color.
When you set color object you will need to convert the chose color object to string and set the color string to be saved in the database after commit.
The result will looks like this:
No comments:
Post a Comment