Ted,

I put the jarred up copy of my RowSet tags with source on my web site
(http://home1.gte.net/pfeiffer/Download.html).  This version is just as I
mentioned before: a reworking of the ResultSet tags from the taglibs Jakarta
project.

Feel free to take what you like from this, but remember it is not geared
toward general distribution (licensing and formatting certainly are not up
to snuff).

I think there is a fit for this somewhere in the DBTags portion of the
taglibs project.  The only DBTags ResultSet tag that really makes a
distinction about the source of the data is the ResultSet tag itself.  This
should be easily modified to accomodate a RowSet derived from an external
source.

The synching of a struts form elements with a given rowset opens a lot of
questions for me.

- How do I map from a html struts form to multiple row RowSet?
- Should struts provide functionality for scrollable RowSet?
- What level of functionality supported by a RowSet can/should I provide in
mapping from a struts form to a RowSet (Insert, Delete, Modify, None of the
above)?
- Where does the line of responsibility for such logic get drawn between a
tag and an action class?

I'm sure there are a hundred more question like this, but its getting past
my bedtime.

Let me know what you think,

Bill Pfeiffer




----- Original Message -----
From: "Ted Husted" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, May 13, 2001 2:39 PM
Subject: Re: Determining odd-even table rows


> That sounds cool, Bill.
>
> I'm making extensive use of RowSets now myself. Right now, I pump the
> RowSet into a bean or collection of beans and pass that to iterate or a
> form. I use a custom constructor for the bean with a parameter for each
> property so that I can pass everything once.
>
> On the 1.1 list now is enhancing iterate to recognize RowSets (and XML)
> so that these can be used in addition to a collection of beans.
>
> In working with RowSets, I keep coming back to the idea that in practice
> my RowSets and my ActionForm beans share same properties. RowSets can
> also set and get any column as a String, which is an essential part of
> being an ActionForm bean. RowSets also have many built-in data
> conversion methods that most applications need. So it just seems to me
> that if we are going to extend iterate to support RowSets, why not
> extend the other custom tags too? Why not an ActionRowSet with a reset
> and validate method for the action to call?
>
> I haven't researched the code yet, but off-hand the real trick would
> seem to be creating a RowSet from scratch, so that it could be populated
> outside of the JDBC command. But since Cached RowSets allow you to
> create and populate columns, we should be able to do that too.
>
> The Sun documentation mentions that RowSets are suppose to be JavaBeans,
> and I did try to feed them to iterate, but it doesn't seem to work.
>
> If you would like to send me the source you have so far, perhaps we can
> work on refactoring it together.
>
> Bill Pfeiffer wrote:
> >
> > Ted,
> >
> > So far, my work with setting up a RowSet rather than a ResultSet
consists of
> > the following:
> >
> > 1. Reworking the DBTags ResultSetTag (and all nested tags) to use
> > javax.sql.RowSet instead of ResultSet.
> >
> > 2. Reworking the ResultSetTag to grab a RowSet object out of a given
context
> > (page, request, session, application), instead of relying on a parent
tag
> > generated Statement.  The idea here is that some other code (servlet,
struts
> > action, etc) will create the result set and shove it into the scoped
> > attribute.
> >
> > This doesn't really constitute much original work on my part.  But it
does
> > allow me to create the RowSet in the EJB layer.  I have created a
session
> > bean that will take a sql string, create the RowSet, and pass it back.
> >
> > I can pass this along, however, I think it would be in the best interest
of
> > the taglibs community to somehow integrate what I have with the current
> > result set implementation.  In all actuality, I don't HAVE to use a
RowSet.
> > Since RowSet implements ResultSet, I could have just modified the
ResultSet
> > tag to somehow 'know' when to use a parent Statement or get an existing
> > result set from the pageContext (which is what I do now).
> >
> > As far as struts is concerned, I would be curious to know how you would
see
> > RowSet tags integrating with it.  Is the idea that you would map or bind
a
> > struts form field to a RowSet column?
> >
> > I'll get started by joining the taglibs-dev mailing list.
> >
> > I can send you my source set for the RowSet stuff I've done, but it is
far
> > from ready for prime time.
> >
> > Let me know,
> >
> > Bill

Reply via email to