Figured out my problem here - the leading forward slash before the com
package on the line
configuration.add("my.js.path", "/com/myco/myapp");
was tripping me up.

On Fri, Oct 24, 2008 at 5:24 PM, Denis McCarthy
<[EMAIL PROTECTED]> wrote:
> Oops. just sent this but managed to bork the subject line! Sorry...
> Hi,
> I'm trying to implement version-specific paths for my javascript files
> (so I can have the expires header for these files in the far future).
> Looking at Tapestry's code, the appropriate way to do this is to use
> the contributeClasspathAssetAliasManager method in AppModule to give a
> version-specific alias for the javascript file in question (as long as
> the file is on the classpath, which ours is). Unfortunately for the
> life of me I can't get this to work. The code seems fairly simple: In
> AppModule.java:
>
>   public static void
> contributeFactoryDefaults(MappedConfiguration<String, String>
> configuration) {
>       configuration.add("my.version", "1.0.3");
>       configuration.add("my.js", "classpath:${my.js.path}");
>       configuration.add("my.js.path", "/com/myco/myapp");
>   }
>
>
>   public static void
> contributeClasspathAssetAliasManager(MappedConfiguration<String,
> String> configuration,
>
> @Symbol("my.version") String myJsVersion,
>
> @Symbol("my.js.path") String myJsPath) {
>       configuration.add(myJsVersion + "/myjs", myJsPath);
>   }
>
> Then in my DefaultLayout class, I have
> @IncludeJavaScriptLibrary("${my.js}/javascripts.js")
>
> Now, in my case, when this is rendered the javascript path is the
> assets/com/myco/myapp/javascripts.js, with not a version in sight in
> the path. I must be missing something simple here, although I've gone
> through the TapestryModule code from tapestry svn and I nothing jumps
> out at me. Any pointers would be greatly appreciated.
> Thanks
> Denis
>



-- 
Annadale Technologies Limited

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to