You're pretty much stuck convincing yourself that Wicket works well with
persistence, at least for now. (You'll see that it does, though.) The
examples in wicket-stuff do things in several different ways, and many
of them stop short of actually plugging into a database but instead
simulate one. I'd recommend just taking the plunge and coding something
yourself, supplemented by forays into the stuff cvs-browser as required.
If you use Spring, the easiest thing to do is let it manage your
Hibernate transactions. You don't really need contrib-spring, you just
need access to your spring context which is easy to get with
WebApplicationContextUtils. Then you can hook up your models by
extending LoadableDetachableModel with a ridiculously easy load method
like this:
protected Object load() {
// you have to write your own Application subclass, and
// something like "getSpringContext"
SessionFactory sf = (SessionFactory)
((MyApplication)Application.get()).getSpringContext()
.getBean("sessionFactory");
// modelClass and modelId set in constructor
return sf.getCurrentSession().load(modelClass, modelId);
}
That way you don't need to decide between contrib-data,
contrib-database, or any other contributed packages. But if you don't
know Spring, you'll need to use data/database (or imitate them) to open
and close your database transactions with each request cycle. It's not
really that hard and is probably easier than learning Spring and Wicket
at the same time.
Good luck!
Nathan
[EMAIL PROTECTED] wrote:
Hi,
I can't find source for any hibernate example application. Tried to find cdapp
but failed. I checked out wicket and wicket-examples from cvs but
wicket-examples/src/java/wicket/examples/cdapp is empty.
Where can I find cdapp source or any other hibernate-wicket example app ?
I've just started to look at wicket framework, and I would like to see some
more real life example (with persistence) before I start to use it.
Tomek Kaczanowski
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user