struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorbjørn Ravn Andersen <...@biobase.dk>
Subject Struts + Hibernate: A few newbie questions about how to get this right?
Date Thu, 24 Jul 2003 13:12:29 GMT
I have spent quite some time working with creating a new web interface 
on top of an existing database.  As we want to eventually change the 
schema we have decided to put an abstraction layer on top of it, which I 
am in the process of modelling as Hibernate beans, where Ihave just 
started dealing with the process of updating information in these 
persisted beans (previously was read-only), and presenting them with 
bean:* and the display taglib.

I have previously written a search interface accessing the database 
directly (due to some very complicated where-clauses) using Struts in 
order to gather the user preferences for refining the search, which has 
worked well for quite a while.  So I am familiar with the basic concept 
of using a form bean to store the information, and Struts taglibs for 
creating web-forms to alter this information.

Now I want to edit my persistent beans (containing multi-level 
master-detail information) with a Struts-based interface, and in order 
to avoid spending time reinventing the wheel, I would like to ask the 
community first:

* Can I use a persistant bean as my FormBean (or would that be asking 
for inconsistencies), or should I work with a DynaBean and then copy the 
result to the persistant bean in the end?  I will probably need some 
validation.

* If not, is there an easy way to populate such a DynaBean from my 
persistant bean and vice versa?  I would rather not have to write a lot 
of setXX( getXX()) statements.

* I have understood from the struts-hibernate example by Ted Husted that 
Struts can utilize Hibernate as a plugin, but I did not understand what 
this implies.  Is there a ressource that explains this?  Is there any 
benefit from just using the two packages directly?

Any insight would be appreciated :)  Thanks in advance.


-- 
  Thorbjoern Ravn Andersen     Scandiatransplant
                               Skejby Sygehus, indgang 3
  +45 89 49 53 01              DK-8200 AArhus N
  http://biobase.dk/~tra         



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message