]
Brian Leathem updated RF-12011:
-------------------------------
Fix Version/s: 4-Tracking
Gradient configuration in ecss
------------------------------
Key: RF-12011
URL:
https://issues.jboss.org/browse/RF-12011
Project: RichFaces
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Reporter: Dupont Dupont
Fix For: 4-Tracking
For the moment, gradients are :
# configured in resource-mappings.properties (i.e.
https://github.com/richfaces/components/blob/develop/input/ui/src/main/re...)
{noformat}
org.richfaces.images\:autocompleteButtonGradient.png=org.richfaces.renderkit.html.images.AutocompleteGradient\
{topColorParam=headerGradientColor ,bottomColorParam=headerBackgroundColor}
{noformat}
# and then used in ecss files (i.e.
https://github.com/richfaces/components/blob/develop/input/ui/src/main/re...).
{noformat}
background-image:
"url(#{resource['org.richfaces.images:autocompleteButtonGradient.png']})";
{noformat}
A simpler solution could be allowing gradient configuration directly in the ecss file,
e.g.
{noformat}
background-image:"url(#{resource['org.richfaces.dynamic:org.richfaces.renderkit.html.images.AutocompleteGradient?topColorParam=headerGradientColor&bottomColorParam=headerBackgroundColor']})";
{noformat}
org.richfaces.dynamic being a special library name telling Richfaces to instantiate
AutocompleteGradient and configure it on the fly.
This would enable to get rid of resource-mappings.properties for simple use cases.
N.B. :
* a control must be implemented to control which classes can be dynamically instantiated
(i.e. only allow classes implementing Java2DUserResource).
* ecss configuration must allow us to configure the gradient (c.f. topColorParam and
bottomColorParam variables in our sample).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: