jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morgan Delagrange <mdela...@yahoo.com>
Subject Re: release JDBC tag library
Date Tue, 06 Feb 2001 00:33:39 GMT
Hi Marius,

Since their syntax is so different, I'm thinking about
creating separate getDate, getTime and getTimestamp
tags.  I like the idea of distinct functionality
having a distinct tag, and it would also remove the
need for passing in the field name of the JDBC type. 
What do you think?

- Morgan

--- Marius Scurtescu <marius@multiactive.com> wrote:
> Hi,
> 
> I started using the new version and it works fine.
> 
> It was a good idea to consolidate all the setter and
> getter methods, but this came with a minor drawback:
> since everything is treated as a String no specific 
> formatting can be used.
> 
> In order to deal with the formatting I added a few
> more attributes to the getColumn tag. These
> attributes
> are:
> - type, a JDBC type
> - format, a formatting pattern or style
> - locale, the locale
> 
> If you use the "type" attribute only it will affect
> the DATE, TIME and TIMESTAMP columns. The three 
> corresponding Java classes have different "toString"
> methods and you can control what will be displayed.
> 
> The "format" will take a value dependent on the
> type.
> For numeric types it can be either a pattern as
> accepted by the DecimalFormat constructor or
> a style: "CURRENCY", "PERCENT" or "NUMBER".
> For date types it can be either a pattern as
> accepted by SimpleDateFormat or a style: "FULL",
> "LONG", "MEDIUM" or "SHORT". For TIMESTAMP it
> also can be a comma separated list of two styles,
> one for date and one for time.
> 
> The locale can have one to three components as
> accepted by the Locale constructor: language,
> country and variant. They are separated by "_".
> 
> Examaples:
> <jdbc:getColumn name="Start" type="DATE"
> format="FULL"/>
> <jdbc:getColumn name="End" type="TIME"/>
> <jdbc:getColumn name="Next" type="TIMESTAMP"
> format="SHORT,MEDIUM" locale="ro_RO"/>
> <jdbc:getColumn name="Now" type="TIMESTAMP"
> format="LONG"/>
> <jdbc:getColumn name="Amount" type="CURRENCY"
> locale="de_DE"/>
> 
> Since I have no commit rights I will email the
> changes I made to Morgan. I tested them today
> and so far they are OK.
> 
> Cheers,
> Marius
> 
> 
> Morgan Delagrange wrote:
> > 
> > --- Marius Scurtescu <marius@multiactive.com>
> wrote:
> > > Hi Morgan,
> > >
> > > I will try the new version either today or
> tomorrow.
> > > The original version did not work out of the box
> > > for me and I had to make a few, small,
> modifications
> > > and recompile.
> > >
> > > From the top of my head, the changes I made
> were:
> > > - added a String version to a setter method to
> make
> > > it work with JRun (this was confirmed to be a
> JRun
> > > problem but the fix is so simple that it is
> worth
> > > doing)
> > 
> > Sure, I didn't get a chance to create String
> setter
> > methods for all the tags.  If you want to fix it,
> feel
> > free!
> > 
> > > - added a "name" attribute to the getter methods
> so
> > > you can retrieve fields by name as well
> > > - added validation code to the getter TEI class
> to
> > > check that
> > > only one of "position" or "name" attributes is
> used
> > 
> > Yeah, I changed my mind about that; it sounds like
> a
> > good idea now.  If you want to tackle it, please
> do.
> > 
> > Thanks, Marius!
> > 
> > - Morgan
> > 
> > P.S. WTF is up with all these "Undelivered Mail
> > Returned to Sender" emails we've been getting from
> the
> > list this week?  Who is this?
> > 
> > <joeo@localhost.suninternet.com>: Name service
> error
> > for domain
> >     localhost.suninternet.com: Host not found
> > 
> > =====
> > Morgan Delagrange
> > Britannica.com
> > 
> > __________________________________________________
> > Get personalized email addresses from Yahoo! Mail
> - only $35
> > a year!  http://personal.mail.yahoo.com/
> 
> -- 
> ------------------
> Marius Scurtescu, Software Engineer
> Tel: (604) 899-2835 Fax: (604) 899-2899
> mailto:marius@multiactive.com
> Multiactive Software Inc. http://www.multiactive.com
> ------------------
> Attract and retain customers with Multiactive
> Software --
> proud winners of PC WEEK's "Best of COMDEX" award.
> ------------------


=====
Morgan Delagrange
Britannica.com

__________________________________________________
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

Mime
View raw message