On Tue, Sep 4, 2012 at 11:17 PM, Alec Swan <alecs...@gmail.com> wrote: > Well, mountPackage did not work for me either. > > Basically, what I want to do is access ALL resources in > com.myco.app.res package with "global" URL prefix. For example, access > a JavaScript file as global/events.js instead of > ../wicket/resource/com.myco.app.res.GlobalResourceScope/events.js URL. > In 1.4 it was simple with > putClassAlias(com.myco.app.res.GlobalResourceScope, "global"). > > How can I do this with 1.5?
Why #mountResource() didn't work for you ? > > Thanks, > > Alec > > On Tue, Sep 4, 2012 at 10:59 AM, Alec Swan <alecs...@gmail.com> wrote: >> Tom, >> >> I have com.myco.app.res.GlobalResourceScope.class and events.js in the >> same package. So, putClassAlias(GlobalResourceScope.class, "global") >> in 1.4 would allow me to access http://../app/global/events.js in the >> browser. >> >> It seems like in 1.5 this is similar to mountPackage(String, Class<? >> extends Page>) which means I have to change GlobalResourceScope class >> to extend Page, right? Why does it need to be a Page? >> >> Thanks, >> >> Alec >> >> On Tue, Sep 4, 2012 at 9:42 AM, Thomas Götz <t...@decoded.de> wrote: >>> I didn't get your usecase exactly yet, but maybe this will help you: >>> http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/ >>> >>> Cheers, >>> -Tom >>> >>> >>> On 04.09.2012, at 17:33, Alec Swan <alecs...@gmail.com> wrote: >>> >>>> I saw the link explaining how to migrate >>>> "SharedResources#putClassAlias(GlobalResourceScope.class, "global")" >>>> before but was found it confusing because "global" and "images" >>>> aliases 1.4 version were replaced with "imgres" in 1.5 example. >>>> >>>> All I need to do is use "global" in place of GlobalResourceScope.class >>>> in the URLs. How do I do this in 1.5? >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org