You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ted Husted <hu...@apache.org> on 2001/06/06 14:09:03 UTC

Scratch RowSets

The documentation for the Early Release of CachedRowSets mentions that 

"Because both a CachedRowSet object and its metadata can be created from
scratch, a component
that acts as a factory for rowsets can use this capability to create a
rowset containing data from
non-SQL data sources."

has anyone here tried this yet?

The idea being I would like to transfer incoming properties from an
ActionForm into a scratch RowSet, and use that as the value object.
(Perhaps within a wrapper or a facade so business logic methods can be
added.)

There will be expanded support for RowSets in 1.1, and I wanted to get
started on some support utilities / design patterns before looking at
what other modifications will be needed. 

I put together a quick Iterate wrapper that works fine with a returned
RowSet, but also need to create a new RowSet from scratch to close the
loop. I guess the thing to try is to create a MetaDataRowSet object and
pass that to a new RowSet (instead of making the SQL call), and then see
if I can insert a row.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/

Re: Scratch RowSets

Posted by Oleg V Alexeev <go...@penza.net>.
Hello Ted,

One question here... For example I want to use rowset in iterate tag -
but database connection must be opened before iterate using and closed
after it in this case. Is it right? If yes, then how it works in MVC
framework? In Action - rows are retrieved from database and as attribute
passed via session or request to the forwarded jsp page - I mainly use
this approach to display data from database. I try to use rowset after
closing of the connection to the database but exception was raised and
I mark this way as error...
What method are you use to work with rowsets in iterate tag? Open
connection, make rowset, iterate, close rowset and connection? Or
another way exists?

Wednesday, June 06, 2001, 4:09:03 PM, you wrote:

TH> The documentation for the Early Release of CachedRowSets mentions that 

TH> "Because both a CachedRowSet object and its metadata can be created from
TH> scratch, a component
TH> that acts as a factory for rowsets can use this capability to create a
TH> rowset containing data from
TH> non-SQL data sources."

TH> has anyone here tried this yet?

TH> The idea being I would like to transfer incoming properties from an
TH> ActionForm into a scratch RowSet, and use that as the value object.
TH> (Perhaps within a wrapper or a facade so business logic methods can be
TH> added.)

TH> There will be expanded support for RowSets in 1.1, and I wanted to get
TH> started on some support utilities / design patterns before looking at
TH> what other modifications will be needed. 

TH> I put together a quick Iterate wrapper that works fine with a returned
TH> RowSet, but also need to create a new RowSet from scratch to close the
TH> loop. I guess the thing to try is to create a MetaDataRowSet object and
TH> pass that to a new RowSet (instead of making the SQL call), and then see
TH> if I can insert a row.

TH> -- Ted Husted, Husted dot Com, Fairport NY USA.
TH> -- Custom Software ~ Technical Services.
TH> -- Tel 716 737-3463.
TH> -- http://www.husted.com/about/struts/



-- 
Best regards,
 Oleg                            mailto:gonza@penza.net