You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Andrew (JIRA)" <de...@tapestry.apache.org> on 2008/06/25 21:08:45 UTC

[jira] Created: (TAPESTRY-2481) Superclass that includes a stylesheet via IncludeStylesheet annotation breaks any subclass not in the same package as the stylesheet.

Superclass that includes a stylesheet via IncludeStylesheet annotation breaks any subclass not in the same package as the stylesheet.
-------------------------------------------------------------------------------------------------------------------------------------

                 Key: TAPESTRY-2481
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2481
             Project: Tapestry
          Issue Type: Bug
          Components: Annotations
    Affects Versions: 5.0.11
         Environment: Linux, JDK 1.5, Jetty 6.1.9
            Reporter: Andrew


I have a class that includes a stylesheet via IncludeStylesheet annotation. 

The problem occurs when I subclass this class from a different package than the stylesheet's package. The annotation is inherited, but the subclass can't locate the relative path to the CSS. 


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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-2481) Superclass that includes a stylesheet via IncludeStylesheet annotation breaks any subclass not in the same package as the stylesheet.

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-2481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608482#action_12608482 ] 

Howard M. Lewis Ship commented on TAPESTRY-2481:
------------------------------------------------

This raises another issue; if the "asset:" binding prefix is used in a super-class template, it should be relative to the super-class, not the extending class.

> Superclass that includes a stylesheet via IncludeStylesheet annotation breaks any subclass not in the same package as the stylesheet.
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-2481
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2481
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Annotations
>    Affects Versions: 5.0.11
>         Environment: Linux, JDK 1.5, Jetty 6.1.9
>            Reporter: Andrew
>
> I have a class that includes a stylesheet via IncludeStylesheet annotation. 
> The problem occurs when I subclass this class from a different package than the stylesheet's package. The annotation is inherited, but the subclass can't locate the relative path to the CSS. 

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Closed: (TAPESTRY-2481) ClassTransformation acts as if all type-level annotations are inherited; it should filter out non-inherited annotations

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-2481?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAPESTRY-2481.
------------------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0.14

> ClassTransformation acts as if all type-level annotations are inherited; it should filter out non-inherited annotations
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-2481
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2481
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Annotations
>    Affects Versions: 5.0.13
>         Environment: Linux, JDK 1.5, Jetty 6.1.9
>            Reporter: Andrew
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.14
>
>
> I have a class that includes a stylesheet via IncludeStylesheet annotation. 
> The problem occurs when I subclass this class from a different package than the stylesheet's package. The annotation is inherited, but the subclass can't locate the relative path to the CSS. 

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-2481) Superclass that includes a stylesheet via IncludeStylesheet annotation breaks any subclass not in the same package as the stylesheet.

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-2481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608496#action_12608496 ] 

Howard M. Lewis Ship commented on TAPESTRY-2481:
------------------------------------------------

Checking the code for AssetInjectionProvider and IncludeStylesheetWorker I can see that the code is doing the correct thing; the code is smart enough to use the resources of the component with the annotation (i.e., the base class's Resource, from it's ComponentModel) rather than the sub-class' Resource.

I built at quick test case (using @Inject for an asset, since that's easier to test).

@InjectStylesheet is not inherited by base classes ... oh wait, logic inside ClassTransformation is making all annotations effectively inherited.  I wonder why?

> Superclass that includes a stylesheet via IncludeStylesheet annotation breaks any subclass not in the same package as the stylesheet.
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-2481
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2481
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Annotations
>    Affects Versions: 5.0.11
>         Environment: Linux, JDK 1.5, Jetty 6.1.9
>            Reporter: Andrew
>            Assignee: Howard M. Lewis Ship
>
> I have a class that includes a stylesheet via IncludeStylesheet annotation. 
> The problem occurs when I subclass this class from a different package than the stylesheet's package. The annotation is inherited, but the subclass can't locate the relative path to the CSS. 

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-2481) ClassTransformation acts as if all type-level annotations are inherited; it should filter out non-inherited annotations

Posted by "Fernando (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-2481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608532#action_12608532 ] 

Fernando commented on TAPESTRY-2481:
------------------------------------

wait. So what's the expected behavior now.  Will my expectations still work:

I write a component using the InjectStylesheet annotation.
I extend that component and expect the previous stylesheets to still be brought in.
  - or do i have to figure out all previous stylesheets some how and maintain them still?

> ClassTransformation acts as if all type-level annotations are inherited; it should filter out non-inherited annotations
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-2481
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2481
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Annotations
>    Affects Versions: 5.0.13
>         Environment: Linux, JDK 1.5, Jetty 6.1.9
>            Reporter: Andrew
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.14
>
>
> I have a class that includes a stylesheet via IncludeStylesheet annotation. 
> The problem occurs when I subclass this class from a different package than the stylesheet's package. The annotation is inherited, but the subclass can't locate the relative path to the CSS. 

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Assigned: (TAPESTRY-2481) Superclass that includes a stylesheet via IncludeStylesheet annotation breaks any subclass not in the same package as the stylesheet.

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-2481?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship reassigned TAPESTRY-2481:
----------------------------------------------

    Assignee: Howard M. Lewis Ship

> Superclass that includes a stylesheet via IncludeStylesheet annotation breaks any subclass not in the same package as the stylesheet.
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-2481
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2481
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Annotations
>    Affects Versions: 5.0.11
>         Environment: Linux, JDK 1.5, Jetty 6.1.9
>            Reporter: Andrew
>            Assignee: Howard M. Lewis Ship
>
> I have a class that includes a stylesheet via IncludeStylesheet annotation. 
> The problem occurs when I subclass this class from a different package than the stylesheet's package. The annotation is inherited, but the subclass can't locate the relative path to the CSS. 

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Updated: (TAPESTRY-2481) ClassTransformation acts as if all type-level annotations are inherited; it should filter out non-inherited annotations

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-2481?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAPESTRY-2481:
-------------------------------------------

    Affects Version/s:     (was: 5.0.11)
                       5.0.13
              Summary: ClassTransformation acts as if all type-level annotations are inherited; it should filter out non-inherited annotations  (was: Superclass that includes a stylesheet via IncludeStylesheet annotation breaks any subclass not in the same package as the stylesheet.)

The code inside ClassTransformation.getAnnotation() collects together all annotations from the current class, plus all annotations on base classes, whether or not they have the @Inherit annotation.

> ClassTransformation acts as if all type-level annotations are inherited; it should filter out non-inherited annotations
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-2481
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2481
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Annotations
>    Affects Versions: 5.0.13
>         Environment: Linux, JDK 1.5, Jetty 6.1.9
>            Reporter: Andrew
>            Assignee: Howard M. Lewis Ship
>
> I have a class that includes a stylesheet via IncludeStylesheet annotation. 
> The problem occurs when I subclass this class from a different package than the stylesheet's package. The annotation is inherited, but the subclass can't locate the relative path to the CSS. 

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org