Using a ResultSet directly is generally seen as bad practice.
At a minimum you should probably use the ResultSetDynaClass then next in
line would be a RowSetDynaClass, then JavaBeans. As for the JavaBean
properties question, it would be easier to return a Collection of
JavaBeans where each
Both solution 1 and 2 are far better than using a ResultSet in a jsp. I
usually use a Collection of JavaBeans.
David
From: Guido [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Data driven struts application
From: Robert McIntosh [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: Data driven struts application
Date: Fri, 14 Mar 2003 09:38:50 -0600
Using a ResultSet directly is generally seen as bad practice
Yep, I agree with David. Your code will invariably be more usable and
be more presentation layer friendly if you always return a Collection
of some type. The Collection would contain beans of the object type
you're working with. Further if you're using for example an ArrayList
to populate a
On Fri, 14 Mar 2003, Robert McIntosh wrote:
Date: Fri, 14 Mar 2003 09:38:50 -0600
From: Robert McIntosh [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: Data driven struts application
Using a ResultSet
I agree, but I am in doubt:
1. How to transform a ResultSet into a JavaBean (I think bean accesors
don't have to be named as database columns...) without reinvent the wheel?
2. If I don't know how many columns the query returns (i.e. if the query
is 'select * from ORACLE_VIEW') I supose I can
On Fri, 14 Mar 2003, Pat Quinn wrote:
Date: Fri, 14 Mar 2003 16:05:34 +
From: Pat Quinn [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: Data driven struts application
I spent some time thinking over this very topic. I finally
List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: Data driven struts application
Date: Fri, 14 Mar 2003 08:24:58 -0800 (PST)
On Fri, 14 Mar 2003, Pat Quinn wrote:
Date: Fri, 14 Mar 2003 16:05:34 +
From: Pat Quinn [EMAIL PROTECTED]
Reply-To: Struts Users
I apologize if this has already been beaten to death, but I am still
struggling with the implications of dyna-stuff on traditional OOD in
struts applications. See interspersed.
Craig R. McClanahan wrote:
This is pretty much what RowSetDynaClass does for you, without the need to
create
:16
To: Struts Users Mailing List
Subject: Re: Data driven struts application
On Fri, 14 Mar 2003, Robert McIntosh wrote:
Date: Fri, 14 Mar 2003 09:38:50 -0600
From: Robert McIntosh [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL
I agree with those that say Dynabeans are not a good practice.
It's hard to unit test, or reuse, for example in JSTL or Model 1.
It has a CVS hot spot. etc. etc.
Best stick with unit tested POJO (and a bean that has a DAO helper, as
in my other posts).
.V
Phil Steitz wrote:
I apologize if this
On Fri, 14 Mar 2003, Phil Steitz wrote:
Date: Fri, 14 Mar 2003 10:17:59 -0700
From: Phil Steitz [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: Data driven struts application
I apologize if this has
On Fri, 14 Mar 2003, Paul Pattison wrote:
Date: Fri, 14 Mar 2003 12:28:04 -0500
From: Paul Pattison [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: RE: Data driven struts application
An approach that I've
Thanks, Craig.
I understand a lot better now, but I am still struggling a bit.
What you seem to be saying is that for read-only access we can safely
skip the value/business object encapsulation; but for updates, we
should use real BOs. This asymmetry troubles me; though I see the
appeal in
On Fri, 14 Mar 2003, Phil Steitz wrote:
Date: Fri, 14 Mar 2003 14:17:38 -0700
From: Phil Steitz [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: Data driven struts application
Thanks, Craig.
I
15 matches
Mail list logo