You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Filip S. Adamsen" <fs...@fsadev.com> on 2008/07/01 01:09:34 UTC

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

Hi,

I'm not Howard, but I think I can answer your question regardless.

Howard said the following:

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

As far as I can tell this means that the stylesheets etc. will be 
brought in correctly, as their paths will be taken relative to the 
component on which they are defined.

But of course you could check a snapshot to make sure. :)

-Filip

On 2008-06-30 23:20, Andrew Whang wrote:
> Howard,
> I wanted to echo Fernando's questions regarding this defect:
> 
> 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?
> 
> 
> Thanks,
> Andrew
> 
> 
> 
> ----- Original Message ----
> From: Howard M. Lewis Ship (JIRA) <de...@tapestry.apache.org>
> To: agwhang@yahoo.com
> Sent: Thursday, June 26, 2008 10:23:44 AM
> Subject: [jira] Closed: (TAPESTRY-2481) ClassTransformation acts as if all type-level annotations are inherited; it should filter out non-inherited annotations
> 
> 
>      [ 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. 
> 

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


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

Posted by Howard Lewis Ship <hl...@gmail.com>.
Should be ok.  Tapestry will hook the beginRender() phase to include
the stylesheet, using the base class' resources when evaluating the
@IncludeStylesheet assets.  Subclasses won't see @IncludeStylesheet,
but that's ok, the base class executes first.

Earlier versions of Tapestry probably added the same stylesheet more
than once (if they didn't blow up) but that was filtered out inside
PageRenderSupport.

On Mon, Jun 30, 2008 at 4:09 PM, Filip S. Adamsen <fs...@fsadev.com> wrote:
> Hi,
>
> I'm not Howard, but I think I can answer your question regardless.
>
> Howard said the following:
>
> "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."
>
> As far as I can tell this means that the stylesheets etc. will be brought in
> correctly, as their paths will be taken relative to the component on which
> they are defined.
>
> But of course you could check a snapshot to make sure. :)
>
> -Filip
>
> On 2008-06-30 23:20, Andrew Whang wrote:
>>
>> Howard,
>> I wanted to echo Fernando's questions regarding this defect:
>>
>> 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?
>>
>>
>> Thanks,
>> Andrew
>>
>>
>>
>> ----- Original Message ----
>> From: Howard M. Lewis Ship (JIRA) <de...@tapestry.apache.org>
>> To: agwhang@yahoo.com
>> Sent: Thursday, June 26, 2008 10:23:44 AM
>> Subject: [jira] Closed: (TAPESTRY-2481) ClassTransformation acts as if all
>> type-level annotations are inherited; it should filter out non-inherited
>> annotations
>>
>>
>>     [
>> 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.
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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