It looks to me like if you wanted to use the Spring framework to accomplish what the patch does, you're going to have to use a fair amount of the framework.  This is a lot different form just calling HttpFormUtil.load(request, hibernateObject) with any properly generated hibernate object.

This is not to say that the Spring framework isn't useful, but if all you want to do is load an object from a request it seems like overkill.

I'm going to check it out as a MVC implementation possibility for my projects in the future though.

Matt

Rob Butler wrote:
This kind of thing is handled automatically, and very robustly in the Spring
framework.  The Spring framework also supplies good integration with
Hibernate, and a very cool and innovative configuration system.  You should
check it out.  The next web app I build will use Spring.

www.springframework.org

Later
Rob
----- Original Message -----
From: "Matt Hall" <[EMAIL PROTECTED]>
To: "Hibernate mailingList" <[EMAIL PROTECTED]>
Sent: Tuesday, September 23, 2003 11:58 AM
Subject: [Hibernate] Patch to automatically load hibernate objects from an
HttpRequest submitted


  
I've submitted a patch to JIRA (

    
http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key
=HB-357
  
) to alleviate some of the drudgery of web work with hibernate,
specifically the need to set all of your fields in an object from an
HttpRequest coming back from a form.  I do this all the time in our
projects and it gets really boring, especially with big forms.  Anyway,
with this patch you can just do this in the servlet:

HttpFormUtil.loadObject(request, hibernateObject);

Any fields that are named properly in the request are automatically
loaded into the hibernate object, null values are ignored so you can do
this with forms that only have part of an object's fields.

The patch contains a change to BasicRenderer to make constants in the
generated class files, and the HttpFormUtil mentioned above.

It's a simple improvement, but it's already saved me lots of time, I
hope someone finds it useful.

Matt



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel
    

Reply via email to