You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Felix Gonschorek (JIRA)" <ji...@apache.org> on 2013/05/03 13:22:16 UTC

[jira] [Commented] (TAP5-2083) Failing to load asset / stylesheet with @Import annotation in subclassed component

    [ https://issues.apache.org/jira/browse/TAP5-2083?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13648334#comment-13648334 ] 

Felix Gonschorek commented on TAP5-2083:
----------------------------------------

I had a closer look at this issue since our upgrade to 5.4 is blocked by this issue.

It looks like the line 148 in AssetSourceImpl causes this issue (tapestry-5.4-alpha3):

String metaRoot = "META-INF/assets/" + toPathPrefix(resources.getComponentModel().getLibraryName());

the method call "toPathPrefix(libraryName)" resolves the path relative to the component model, which in turn does not take into consideration, that the component may be subclassed.

I tried to find a intermediate solution with "javaScriptSupport(asset)" in the parent class, but this does'nt work either.

Some of my subclassed components are not in the same library, so that should also be checked when searching for a solution. i would contribute a solution on my own, but i can't think of a possible solution that is easy to implement - i think that someone with more insight into the new tapestry internals has to take care here.

In the current state it's defineately not possible to subclass components which reside in different packages or libraries.
                
> Failing to load asset / stylesheet with @Import annotation in subclassed component
> ----------------------------------------------------------------------------------
>
>                 Key: TAP5-2083
>                 URL: https://issues.apache.org/jira/browse/TAP5-2083
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.4
>            Reporter: Felix Gonschorek
>              Labels: tapestry-core, tapestry5
>         Attachments: tapestry-test-2013-03-08.zip
>
>
> Importing a stylesheet with the "@Import" annotation fails, when subclassing a component which is in a different folder: tapestry tries to load the asset in the folder of the subclassed component instead of the folder, where the class resides where the "@Import" annotation is put on.
> Going to attach a test

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira