Re: Managing database connection?

2008-08-03 Thread Martijn Dashorst
Most folks use open session in view filter from Spring (in combination with Hibernate). I think they have a similar filter for JDBC template (which is highly recommended for normal JDBC actions IMO). Martijn On Sun, Aug 3, 2008 at 12:45 PM, Martin Makundi [EMAIL PROTECTED] wrote: Hi! What is

Managing database connection?

2008-08-03 Thread Martin Makundi
Hi! What is the best place to open/close a data connection in Wicket? I prefer lazy open, but where is the best place to perform the connection/entitymanager.close? Override servlet request? Filter? ** Martin - To unsubscribe,

Problem on external LoadableDetachableModel class

2008-08-03 Thread alex2008
@SpringBean private ProductManager productManager; //@Autowired public void setProductManager(ProductManager productManager) { this.productManager = productManager; } . LoadableDetachableModel personListModel = new LoadableDetachableModel() {

Re: Managing database connection?

2008-08-03 Thread Martin Makundi
I am using Hibernate/JPA without Spring. Is there a suitable interceptor class in Wicket that could be used? ** Martin 2008/8/3 Martijn Dashorst [EMAIL PROTECTED]: Most folks use open session in view filter from Spring (in combination with Hibernate). I think they have a similar filter for

Re: Problem on external LoadableDetachableModel class

2008-08-03 Thread Martijn Dashorst
http://cwiki.apache.org/WICKET/[EMAIL PROTECTED] On Sun, Aug 3, 2008 at 11:07 AM, alex2008 [EMAIL PROTECTED] wrote: @SpringBean private ProductManager productManager; //@Autowired public void setProductManager(ProductManager productManager) { this.productManager =

Re: Managing database connection?

2008-08-03 Thread Martijn Dashorst
Create a custom request cycle that opens a Session in onBeginRequest and closes it in onEndRequest. Perhaps DataBinder.net has one readily available. Martijn On Sun, Aug 3, 2008 at 1:11 PM, Martin Makundi [EMAIL PROTECTED] wrote: I am using Hibernate/JPA without Spring. Is there a suitable

Re: Managing database connection?

2008-08-03 Thread Martin Makundi
Anything lighter? Basically I just need to hook the onEndRequest() event. I assume it would be bad practice to extend the wicket servlet, though .. ** Martin 2008/8/3 Martijn Dashorst [EMAIL PROTECTED]: Create a custom request cycle that opens a Session in onBeginRequest and closes it in

Re: Managing database connection?

2008-08-03 Thread Martijn Dashorst
how is a custom request cycle heavy weight? It isn't–it's a common practise. Martijn On Sun, Aug 3, 2008 at 2:28 PM, Martin Makundi [EMAIL PROTECTED] wrote: Anything lighter? Basically I just need to hook the onEndRequest() event. I assume it would be bad practice to extend the wicket servlet,

Re: Managing database connection?

2008-08-03 Thread Martin Makundi
how is a custom request cycle heavy weight? It isn't–it's a common practise. Ok :) I just had a look at DataBinder.net, that was more heavy-weght. Is there any short introduction available on how to implement onEndRequest() -hook, or is the best reference to just have a look at the respective

Re: Problem on external LoadableDetachableModel class

2008-08-03 Thread alex2008
Thanks for the link. I read the article but i don't understand how i can resolve the problem. -- View this message in context: http://www.nabble.com/Problem-on-external-LoadableDetachableModel-class-tp18797009p18798487.html Sent from the Wicket - User mailing list archive at Nabble.com.

Re: Problem on external LoadableDetachableModel class

2008-08-03 Thread Martijn Dashorst
Odd, I thought it would contain instructions on how to inject non-component classes using: Add this to the constructor of your non-component class (i.e. your model): InjectorHolder.getInjector().inject(this); See also [1] Martijn [1]

Re: Problem on external LoadableDetachableModel class

2008-08-03 Thread alex2008
Thanks a lot Martin, your help was precious. =) Martijn Dashorst wrote: Odd, I thought it would contain instructions on how to inject non-component classes using: Add this to the constructor of your non-component class (i.e. your model): InjectorHolder.getInjector().inject(this);

Hook for hiding columns of DataTable?

2008-08-03 Thread Jeremy Thomerson
I've perused the source and can't find an easy way to do this. I'm hoping that maybe someone else has done it. In an app for one customer, I have a table that lists parts that could be purchased. It is a subclass of DefaultDataTable. I pass it in a custom sortable data provider that wraps a

Clear all sessions?

2008-08-03 Thread Ryan McKinley
Hello! Is there any way to clear all the session/state data for all users ? I have tried implementing an ISessionStore (SecondLevelCacheSessionStore) that hangs on to (wicket) Sessions between onBind and onUnbind. When I want to clear then, I call invalidate() on all sessions. This

Re: users, please give us your opinion: what is your take on generics with Wicket

2008-08-03 Thread John Patterson
Just started using the half-way approach and I really miss the type safety of generified Component. 1) Generifying* Wicket [X] Can best be done like currently in the 1.4 branch, where models and components are both generified. I care most about the improved static type checking generified