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
be
>> available to Wicket Components. Its a convenient way to provide Context
to
>> all Wicket components. The purpose seems clear "Context sharing of
>> services".
>> I'd further assume these services to be stateless and also
Non-Serializable.
>> 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
have
>> please let me know.
>>
>> Injecting components on the other hand is about Injecting serialized
objects
>> (which should be replicatable across in a cluster; unlike your DAO's).
..ok,
>> lets not over complicate it by going that far. But from the problem
>> described it seems he wants to "Inject Components" not "Services". ..and
I
>> think that is fair.
>>
>> My point is clear, if you want to "inject" components, then those have to
be
>> in PROTOTYPE scope. "@SpringBean" is just an annotation for convenience
but
>> 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
conceptually
>> that is a big difference.
>> --
>> View this message in context:
http://apache-wicket.1842946.n4.nabble.com/instantiate-panels-in-a-spring-bean-tp2946859p2952221.html
>> 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
>

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