jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glenn Nielsen <gl...@voyager.apg.more.net>
Subject Re: datetime TAGlib -> FormatTag.java
Date Thu, 26 Apr 2001 01:56:52 GMT
Thanks Lee for the good bug report.

I have implemented a fix for the format tag that allows
it to ignore any whitespace in the body of the tag.

After I review the other datetime taglib feature requests,
I'll update the taglib on the jakarta site.

Thanks,

Glenn


Lee Ball wrote:
> 
> Also I have one small bugette to point out with <dt:format> (apologies if
> you've updated it recently).
> 
> If you use <dt:format pattern="MM/dd/yyyy
> hh:mm"><dt:currenttime/></dt:format> like in the docs then
> fine but if you try
> 
> <dt:format pattern="MM/dd/yyyy hh:mm">
>   <dt:currenttime/>
> </dt:format> an exception is thrown because something is coughing out in the
> parse.
> 
> Cheers
> Lee
> 
> -----Original Message-----
> From: Mark Femal [mailto:mark@beantree.com]
> Sent: 23 April 2001 17:15
> To: taglibs-dev@jakarta.apache.org
> Subject: datetime TAGlib -> FormatTag.java
> 
> Hi Glenn (et. al.)
> 
> Started to use the Jakarta datetime lib and wanted to suggest a few
> improvements (nothing earth-shattering here, just some small suggestions):
> 
> 1.  Addition of a "date" and "defaultText" attribute:
>     date = used for formatting (overrides tag body)
>     defaultText = if NumberFormatException when parsing body or date ==
> null this is the text used for defaults
> 
> The above allows you to significantly cut down on the amount of code for
> formatting (i.e. you can do something like this:
>         <td width="50%">Last Unsuccessful Login:</td>
>         <td width="50%">
>         <dt:format pattern="M-d-yyyy 'at' hh:mm:ss zzz"
>                    defaultText="&nbsp;"
>                    date="<%= bean.getLastBadLoginDate() %>" />
>         </td>
> 
> rather than checking to see if lastBadLoginDate == null explicitly and
> also having a default format -- especially useful for table and formatting
> based on data obtained via data sources.
> 
> 2.  Adjustments to tld:  (ADD)
> 
>         <attribute>
>             <name>date</name>
>             <required>false</required>
>             <rtexprvalue>true</rtexprvalue>
>         </attribute>
>         <attribute>
>             <name>defaultText</name>
>             <required>false</required>
>             <rtexprvalue>false</rtexprvalue>
>         </attribute>
> 
> excellent work BTW on the taglib!  I'll have more suggestions maybe
> later...

-- 
----------------------------------------------------------------------
Glenn Nielsen             glenn@more.net | /* Spelin donut madder    |
MOREnet System Programming               |  * if iz ina coment.      |
Missouri Research and Education Network  |  */                       |
----------------------------------------------------------------------

Mime
View raw message