Is this annotation-based approach really saving that much? It seems to me that a few helper methods would do just as well.
On Wed, Dec 2, 2009 at 1:51 AM, Toscano <koki...@gmail.com> wrote: > > Hi again, > > First of all, thank you for your time and dedication with this project, I > think is really useful and interesting. > > I just can't have it working and I don't know the reason, I would really > appreciate if you can spend a few minutes trying to help me if you don't > mind. > > I'm using Wicket 1.4.3 and the annotations approach. My javascript files are > all in /js not in the java folder. > > So what I do is go the init() of my webapp and write this: > > ResourceMount mount = new ResourceMount(); > ResourceMount.mountAnnotatedPackageResources("/js", > "MyApplication.Page", this, mount); > > Then I go to MyApplication.Page.HomePage and write this annotation: > @JsContribution("jquery.min.js") > > When I try to run the application, I get this error: > failed to mount resource ('/js/all.js') > WicketRuntimeException: js/all.js is already mounted for > SharedResourceEncoder > > I'm sure I'm understanding something wrong... hope you can help me... > > Thank you again, > Oskar > > > > > > > > > > > > > > sfussenegger wrote: >> >> Today, I’m happy to announce the availability of annotation-based >> mounting and merging of resources in wicketstuff-merged-resources >> (version 3.0-SNAPSHOT for Wicket 1.4, version 2.1-SNAPSHOT for Wicket >> 1.3). In order to mount resources, all that’s needed is adding >> annotations to component classes: >> >> @JsContribution >> @CssContribution(media = "print") >> @ResourceContribution(value = "accept.png", path = "/img/accept.png") >> public class PanelOne extends Panel { >> >> public PanelOne(String id) { >> super(id); >> // ... >> } >> } >> >> As an added benefit, you’ll get all the other features of >> wicketstuff-merged-resources: >> >> merging of multiple files into one for less HTTP requests >> adding of versions to resource paths for aggressive caching >> pre-processing of resources (e.g. replacing colors in CSS files) >> optionally uploading them to Amazon Cloudfront (well, at least you can >> expect this feature soon – we are using it already) >> So you will speed up rendering of your pages while simplifying and >> reducing your code (there’s no need to merge, mount or add >> HeaderContributors manually anymore)! >> >> More on our blog ... >> http://techblog.molindo.at/2009/10/wicket-annotation-based-mounting-of-resources.html >> >> ... and Wicket Stuff Wiki: >> http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-merged-resources >> >> Cheers >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >> >> ----- >> Stefan Fussenegger >> >> Wicket: >> wicketstuff-merged-resources >> Wicket on techblog.molindo.at >> > > -- > View this message in context: > http://old.nabble.com/Announcement%3A-Annotation-based-Mounting-of-Resources-tp25886703p26604363.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > 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