What do you mean by "directly"? Do you want to inject the panels rather than
the factories? You could probably try to write your own annotation and use a
custom org.apache.wicket.injection.IFieldValueFactory



Ned Collyer wrote:
> 
> 
> Stefan Fußenegger wrote:
>> 
>> Hi Tom,
>> 
>> I'd suggest not to use Spring to manage panels. You should rather create
>> a new panel for every page and request. You should use Spring to manage
>> your services and inject those into your panels.
>> 
>> Best regards, Stefan
>> 
> 
> Hi Stephan :) (I work with Tom)
> 
> We have a work around for this specific problem, and it still involves
> spring, but not using panels directly.
> 
> Basically the situation is as follows.
> 
> We have a main wicket project which is published as a jar.
> 
> There are also other modules also published as "plugin" jars.
> 
> We launch these with an embedded jetty instance.
> 
> The problem is the Main project contains the page instances, and the other
> jars contain the panels.
> 
> The Main project has no idea about which panels are available, as these
> will be determined at run time by whatever has been configured (thru
> spring).  The main jar has no knowledge of which panel classes exist - so
> we cannot really instantiate new ones using plain old java.
> 
> There are a few ways to approach this, ie, having some class loader which
> resolves given string "class references", and those strings are wired in
> through spring.  This works - but feels a bit hacky.
> 
> Our workaround is .. somewhat similar - we basically have a panel factory
> in the plugin that instantiate a panel and return it.  We can then wire
> these panel factories thru spring to a given page.
> 
> This turns out to be quite elegant - however it would be nice if we had
> the ability to wire "plugin" panels to the main jar directly without this
> factory.
> 
> Rgds
> 
> Ned
> 


-----
-------
Stefan Fußenegger
http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
-- 
View this message in context: 
http://www.nabble.com/Accessing-prototype-scoped-panel-beans-using-%40SpringBean-annotation-tp15627974p15632905.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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

Reply via email to