[ 
https://issues.apache.org/jira/browse/TRINIDAD-1415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12797031#action_12797031
 ] 

Marius Petoi commented on TRINIDAD-1415:
----------------------------------------

Hello,

I added a patch to the task that hopefully solves this issue. In 
SkinStyleSheetParserUtils._createStyleSheetEntry(), when the parsing of each 
selector is done, for each selector that is an alias (ends in ":alias") I keep 
the list of selectors that reference that alias (have a "-tr-rule-ref" to that 
alias). In the end, I add new -tr-properties for all the selectors that 
reference the alias. The added -tr-property has the same name as the property 
in the alias and the value the property in the alias. Then in 
StyleSheetDocument, these properties are resolved, using an algorithm similar 
to the one for StyleNode-s. The method in FileSystemStyleCache that retrieves 
all properties is replaced then with a call to the method in StyleSheetDocument 
that returns all the resolved properties.

Could you please have a look over the patch and see whether it is ok. Thank you!

Marius

> allow :alias support to merge in -tr- custom skin properties as well
> --------------------------------------------------------------------
>
>                 Key: TRINIDAD-1415
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1415
>             Project: MyFaces Trinidad
>          Issue Type: New Feature
>          Components: Skinning
>    Affects Versions:  1.2.11-core
>            Reporter: Jeanne Waldman
>         Attachments: tr_properties_in_alias.patch
>
>
> .AFSomeAlias:alias {-tr-my-property: red}
> af|foo {-tr-rule-ref: selector(".AFSomeAlias:alias")} 
> should resolve into:
> af|foo {-tr-my-property: red}
> so from the renderer you can say, 
> getSkin().getProperty("af|foot-tr-my-property") and it would return red.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to