On Wed, 26 Mar 2003, Greg Dunn wrote:
> Date: Wed, 26 Mar 2003 12:37:14 -0600 > From: Greg Dunn <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] > To: Struts Users Mailing List <[EMAIL PROTECTED]> > Subject: RE: Formatting dates in <html:text> > > The JSTL <fmt:formatDate> is great for display only. > > IMHO there should be a way to format a date, or round a float to 2 decimal > places etc. built into the html:form tags to work with the property you've > got. It would defeat i18n but if you need a certain format, you aren't > using it anyhow. It seems there are many people using all sorts of > different workarounds. > What you probably want is a nice GUI component model (which is somewhat more than the Struts HTML tags aspire to be). One avenue to explore would be using JavaServer Faces -- you can get an EA3 release from: http://java.sun.com/j2ee/javaserverfaces/ and there's a Struts-Faces integration library that makes it very easy to use the two technologies together: http://jakarta.apache.org/builds/jakarta-struts/nightly/struts-faces/ For your particular scenario, you'll want to look at things like the <h:input_date> and <h:input_number> tags. Among other things, there are variants that let you specify date and number formats. None of this code is "ready for prime time" yet, but it's definitely the direction I would recommend for the future. > I'm relatively new at this, so I could be way off base. I'd like to know if > I am but try to be kind if I'm being a moron. ;-) > No, it sounds like you've identified a very real issue :-). > > Greg Craig --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

