[
https://issues.jboss.org/browse/RF-12011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dupont Dupont updated RF-12011:
-------------------------------
Description:
For the moment, gradients are :
# configured in resource-mappings.properties (i.e.
https://github.com/richfaces/components/blob/develop/input/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties)
{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/resources/META-INF/resources/org.richfaces/Autocomplete.ecss).
{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).
was:
For the moment, gradients are :
# configured in resource-mappings.properties (i.e.
https://github.com/richfaces/components/blob/develop/input/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties)
{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/resources/META-INF/resources/org.richfaces/Autocomplete.ecss).
{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).
> 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
>
> For the moment, gradients are :
> # configured in resource-mappings.properties (i.e.
> https://github.com/richfaces/components/blob/develop/input/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties)
> {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/resources/META-INF/resources/org.richfaces/Autocomplete.ecss).
> {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).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues