You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jeanne Waldman (JIRA)" <de...@myfaces.apache.org> on 2010/02/18 20:52:27 UTC

[jira] Commented: (TRINIDAD-1415) allow :alias support to merge in -tr- custom skin properties as well

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

Jeanne Waldman commented on TRINIDAD-1415:
------------------------------------------

I reformatted your patch because the formatting was all off, and I uploaded it so you can use this.
I added a test case to purple css file 

/* Test that aliases that have skinning properties get resolved */
.AFAliasWithSkinProperty:alias {-tr-some-skin-property: true}
af|someComponent {-tr-rule-ref:selector(".AFAliasWithSkinProperty:alias");}

af|anotherComponent {-tr-rule-ref:selector("af|someComponent");}

I ran it and this does not work.
I stopped at this code in the debugger, and the SkinPropertyNode it was creating had incorrect values.
The key was ok (af|someComponent-tr-some-skin-property), but the value was .AFAliasWithSkinProperty-tr-some-skin-property instead of 'true'.


      // add all alias properties as properties for the referencing
      // selectors.
      List<SkinPropertyNode> addedTrProperties =
        new ArrayList<SkinPropertyNode>();
      for (String alias: aliases.keySet())
      {
        List<String> selectors = aliases.get(alias);
        for (SkinPropertyNode property: trSkinPropertyNodeList)
        {
          String propertyName = property.getKey().toString();
          if (propertyName.startsWith(alias))
          {
            String trProperty = propertyName.substring(alias.length());
            for (String selectorName: selectors)
            {
              addedTrProperties.add(_createSkinPropertyNode(selectorName,
                                                            trProperty,
                                                            propertyName));
            }
          }
        }
        trSkinPropertyNodeList.addAll(addedTrProperties);
      }

> 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.