In Initializer implementation I do something like: PackageResourceReference logoReference = new PackageResourceReference( MyInitializer.class, "img/custom_header_logo.png" ); WebApplication.get().getSharedResources().add( "img/custom_header_logo.png", logoReference.getResource() ); WebApplication.get().mountResource( "img/custom_header_logo.png", logoReference );
It makes for every mounted image new request mapper. Won't it be a problem for a lot of custom images? Best regards, Michal Wegrzyn > -----Original Message----- > From: Martin Grigorov [mailto:mgrigo...@apache.org] > Sent: Thursday, October 18, 2012 16:24 > To: users@wicket.apache.org > Subject: Re: Wicket plugin architecture > > On Thu, Oct 18, 2012 at 4:21 PM, Michal Wegrzyn > <michal.wegr...@onior.com> wrote: > > Thank you all for suggestions. > > > > Finally I have used Wicket's org.apache.wicket.IInitializer (as > pointed Martin) together with > org.apache.wicket.Application.setMetaData(MetaDataKey<T> key, Object > object) for configuration. > > > > Implementing more complex solution is not necessary unless you need > advanced runtime plugin mechanism. > > For custom plugin CSS/JS I use metadata and render all extra resource > references on pages. > > > > Images are mounted as shared resources. It works, but for large > amount of images it will not be efficient. > > > > > > Question: do you know a better Wicket-way to handle custom images? > > Please explain how you use the shared resources and what will be not > optimal with them. Then we can try to find a better solution. > > > > > Best regards, > > Michal Wegrzyn > > > >> -----Original Message----- > >> From: Martin Grigorov [mailto:mgrigo...@apache.org] > >> Sent: Tuesday, September 25, 2012 10:48 > >> To: users@wicket.apache.org > >> Subject: Re: Wicket plugin architecture > >> > >> Hi, > >> > >> The simplest way is to use Wicket's org.apache.wicket.IInitializer > >> class. > >> Just create a Jar (the plugin) that contains the plugin classes and > >> wicket.properties in the root package and a line inside: > >> initializer=com.example.MyInitializer > >> > >> MyInitializer#init(Application) will be called just before > >> MyApp#init(). In this method you can add whatever your plugin > >> provides to the global configuration > >> > >> On Tue, Sep 25, 2012 at 11:35 AM, Michal Wegrzyn > >> <michal.wegr...@onior.com> wrote: > >> > Dear developers, > >> > > >> > I need to prepare plugin architecture for a Wicket based project. > >> > I've found that open source Hippo CMS ( > >> > http://svn.onehippo.org/repos/hippo/ ) does it, but I am curious > if > >> there are any other projects that do such a thing? > >> > > >> > Do you maybe know this kind of projects or frameworks? > >> > > >> > Are there any important in-depth aspects of Wicket of which should > >> > I > >> be aware of for creating plugin architecture? > >> > > >> > Best regards, > >> > Michal Wegrzyn > >> > >> > >> > >> -- > >> 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 > > > > > > -- > 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 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org