I tend to agree with Nathan, in that there does seem to be a lot of
odd parts dotted around... Maybe they all hook together, but I suspect
that only if you know what you need can you pull the right bits
together...
Personally, I'm not familiar with Hibernate, so don't really know what
I'm looking for, although I was able to pull together a
PageableListView app to display a table loaded via Hibernate a while
ago. I'm limited to JDK 1.4, so can't use annotations (and thus the
later cd-app as a template).
I'm still not sure if I'm missing something here, as even that simple
app required wicket-contrib-data, wicket-contrib-data-hibernate-3.0
and wicket-contrib-dataview...
What I'm personally missing is a generic (template) DB web-app, that
would run under JDK 1.4, that would provide CRUD functionality and a
pageable view...
Any thoughts/comments?
/Gwyn
On 04/10/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> What kind of integration do you want with the dataview? The dataview is a
> generic package and all you need to integrate it is to provide a
> dataprovider:
>
> protected static class UsersDataProvider implements IDataProvider {
> private UserDAO getUserDao() {
> return MyApplication.getInstance().getUserDao();
> }
>
> public Iterator iterator(int first, int count) {
> return getUserDao().find(first, count);
> }
>
> public int size() {
> return getUserDao().count();
> }
>
> public IModel model(Object object) {
> return new DetachableUserModel((User)object);
> }
> };
>
> Getting a hold of a sessionfactory is also very easy especially when you are
> dealing with spring
> // create your application subclass inside spring
> Class MyApplication extends WebApplication {
> private SessionFactory sf;
>
> public void setSessionFactory(SessionFactory sf) {
> this.sf=sf;
> }
>
> public SessionFactory getSessionFactory() {
> return sf;
> }
>
> public static MyApplication getInstance() {
> return (MyApplication)Application.get();
> }
> }
>
> Then anywhere in your code:
>
> MyAPplication.getInstance().getSessionFactory();
>
> I personally think these things are pretty trivial and I don't see a need
> for a stand alone project. Maybe an example is all we need.
>
> -Igor
>
>
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of
> > Nathan Hamblen
> > Sent: Tuesday, October 04, 2005 9:49 AM
> > To: [email protected]
> > Subject: [Wicket-user] Standard for database integration? (Please!)
> >
> > One of this project's strengths is its community of
> > contributers. Unlike some other Java web component
> > frameworks, Wicket is not controlled by a founder & dictator.
> > Hooray for that. But in some areas, disorganization is killing us.
> >
> > At present, there is no standard way to access a hibernate
> > session factory. I understand that the lack of such a
> > standard doesn't stop me from accessing one somehow. Wicket's
> > domain is the user interface, and I could integrate with a
> > database however I like. That's not very helpful though, to
> > me and every other web application programmer who absolutely
> > have to integrate with a database before we do anything else.
> > Most of us are on hibernate, often accessed through Spring.
> > We just want one way to hook these things up.
> >
> > In late August there were two (or more) database packages
> > that did things rather differently from each other, then
> > Jonathan Locke announced contrib-database. Apparently he
> > didn't think the existing efforts were clean enough. That's
> > fair, I'll take his word for it. I was ready to switch to
> > that package until I saw that it didn't go beyond loading
> > individual hibernate objects. Loading one object is the easy
> > part. The interesting part, the part that could be done a
> > hundred different ways, is how to load and display many
> > objects using a query. That's handled by the apparently
> > unclean contrib data and dataview packages. Great.
> >
> > I wonder if this is just a problem of communication. Surely
> > dataview, for example, could be adapted to contrib.database's
> > foundation. If those two could be merged, we'd have something
> > deprecation-proof to use right now. The code doesn't have to
> > be perfect, it just needs to give us an overall structure to
> > program around.
> >
> > Are people talking to each other? I'm just asking because,
> > from my perspective, there's a bizarre silence on the
> > subject. An argument would be better than nothing. We NEED
> > database integration. Not just for the "enterprise," but for
> > any web application worth using. Let's get it together.
> >
> > Nathan
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user