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>
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
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.
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