wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Tilford <...@tilford.info>
Subject Re: instantiate panels in a spring bean
Date Sat, 02 Oct 2010 07:37:51 GMT
This might interest you http://kenai.com/projects/joint/pages/WicketExample

Its using the netbeans lookup api instead of spring to build a menu based on
what components are available on the classpath.
On Oct 2, 2010 12:32 AM, "James Carman" <james@carmanconsulting.com> wrote:
> So, why would you use the initialize method of a prototype bean to
> instantiate components rather than just use whatever method you're
> going to call on that bean to instantiate your components? Also, why
> not just use a regular spring bean and just have some factory method
> that creates components for you (I do this in my application). The
> point is that it's silly to use the init() method to instantiate
> components. If your bean is non-prototype, then you just flat out
> can't do that. Components aren't shareable. If it is prototype,
> there really is no need.
> On Sat, Oct 2, 2010 at 3:12 AM, Arjun Dhar <dhar_ar@yahoo.com> wrote:
>> https://cwiki.apache.org/WICKET/spring.html
>> ..As per my understanding @SpringBean is to inject context services (like
>> DAO's etc ..assumed to be SINGLETON's) and puts them in a ThreadLocal to
>> available to Wicket Components. Its a convenient way to provide Context
>> all Wicket components. The purpose seems clear "Context sharing of
>> services".
>> I'd further assume these services to be stateless and also
>> Since its objects in a ThreadLocal, I guess one can also use it for
>> injecting components in theory. ..I've never tried it that way, if you
>> please let me know.
>> Injecting components on the other hand is about Injecting serialized
>> (which should be replicatable across in a cluster; unlike your DAO's).
>> lets not over complicate it by going that far. But from the problem
>> described it seems he wants to "Inject Components" not "Services". ..and
>> think that is fair.
>> My point is clear, if you want to "inject" components, then those have to
>> in PROTOTYPE scope. "@SpringBean" is just an annotation for convenience
>> all the documentation & examples point to it being convenient to provide
>> "Inject Services" to wicket components not "Injected components".
>> One is Stateless the other Stateful and serializable, I think
>> that is a big difference.
>> --
>> View this message in context:
>> Sent from the Users forum mailing list archive at Nabble.com.
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message