[ http://issues.apache.org/jira/browse/TAPESTRY-1091?page=all ]
Jesse Kuhnert updated TAPESTRY-1091:
------------------------------------
Fix Version/s: 4.1.2
> Invalid URL for injected using annotation assets
> ------------------------------------------------
>
> Key: TAPESTRY-1091
> URL: http://issues.apache.org/jira/browse/TAPESTRY-1091
> Project: Tapestry
> Issue Type: Bug
> Components: Core
> Affects Versions: 4.0.2
> Reporter: Alexander Gavrilov
> Fix For: 4.1.2
>
>
> I'm creating component and use new Annotation approach to configure component
> specification. When tapesrty perform enhansements to inject declared assets
> it create instance of org.apache.hivemind.util.ClasspathResource class for
> resolving relative to component class resources. Thih method incorrect
> translate class name to resource path. In current implementation path
> computed as clazz.getName().replace('.', '/')
> But i believe that it cold be prepended by "/". Without this slash all
> components assets pathes resolved without leading slash to, so final assets
> url looked as
> -- in simple case
>
> /test-app/app?digest=0548e5fdfa94cce3bfbe04c23709b124&path=components%2Fpc%2FPeriodChooser.js&service=asset
> -- in case of using friendly urls feature
>
> /test-app/assets/0548e5fdfa94cce3bfbe04c23709b124components/pc/PeriodChooser.js
> in first case AssetsService can load resource for this path. but in case of
> using friendly urls AssetsEncode? cold not decode incorrect url and asset is
> not accessible.
> I think whe cold change method
> org.apache.tapestry.annotations.AnnotationEnhancementWorker.newClassResource(Class
> clazz) form
> private ClasspathResource newClassResource(Class clazz)
> {
> return new ClasspathResource(_classResolver, clazz.getName().replace('.',
> '/'));
> }
> to
> private ClasspathResource newClassResource(Class clazz)
> {
> return new ClasspathResource(_classResolver, '/' +
> clazz.getName().replace('.', '/'));
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]