[
https://issues.jboss.org/browse/RF-12011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12671592#comment-12671592
]
Dupont Dupont commented on RF-12011:
------------------------------------
Please note if we want to use this feature in RF-11994 (to allow automatic xcss
to ecss migration for custom grandients), we'll need to allow skin parameters
as classname of gradients.
Sample xcss :
{code:xml}
<u:selector name="body .blocAuthentificationInterieure">
<u:style name="background-image">
<f:resource f:key="SampleGradient">
<f:attribute name="gradientHeight" value="100px"/>
<f:attribute name="height" value="150px"/>
<f:attribute name="gradientColor"
skin="blocConnexionInterieureBackgroundColor"/>
</f:resource>
</u:style>
<u:style name="background-repeat" value="repeat"/>
<u:style name="background-position" value="0 50%"/>
</u:selector>
{code}
> 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