Bug 982 - Dynamic specification on Format pattern
Summary: Dynamic specification on Format pattern
Status: CLOSED FIXED
Alias: None
Product: Taglibs
Classification: Unclassified
Component: DateTime Taglib (show other bugs)
Version: unspecified
Hardware: Other All
: P3 blocker (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-03-15 02:03 UTC by Stephen Williams
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Williams 2001-03-15 02:03:22 UTC
I would like to be able to dynamicaly specify the format pattern for the format 
tag. This would mean that I could store the pattern and asociate it with a user 
and display the dates allways in the way they specify. This is something I 
would like to include in internationalising my system.

eg...

<dt:format pattern="<%= FormatPattern %>"><dt:currenttime/></dt:format>
Comment 1 Stephen Williams 2001-03-15 02:42:11 UTC
I just tried this syntax with one of the example tags and it works fine. It is 
just this tag it doesn't seem to work with.


<tlt:parameter name="body" value="<%=Page%>" direct="false"/> Works but not 
<dt:format pattern="<%=Pattern%>"><dt:currenttime/></dt:format>

This would be really great if I could do this.

I look forward to your responce,

Stephen Williams


Comment 2 Glenn Nielsen 2001-07-11 04:57:11 UTC
For now, this can be done if you edit the datetime.tld and set the element
<rtexprvalue>true</rtexprvalue> for the format pattern attribute to
true.

I will look into dynamically setting the pattern for both the parse and
format tags.
Comment 3 Glenn Nielsen 2001-07-13 08:07:12 UTC
I have implemented an attribute called patternId which can be used with
the format and parse tags to dynamically set the pattern to use.
This will be available in the nightly build of the datetime taglib
tomorrow.

Thanks for the suggestion.

Glenn