Dave Newton wrote:
Néstor Boscán wrote:
Is there a way to use Dates with Dynamic Action Forms using a pattern. We
would like to use all our DTOs with Dynamic Form Beans but we're having
problem with Date and Numbers were we need to apply patterns. Is there a way
to do this?
I'm not sure which use of the word "pattern" you're using; I assume you
mean formatting (like MM-DD-YYYY vs. DD/MM/YY etc.)?
Just use your pattern of choice and a SimpleDateFormat to convert
strings from your FormBean to Date objects. To safely do that it would
be a good idea to use the validator, it's default pattern is MM/dd/yyyy
but you can configure that, check out the struts validator docos.
Manos
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]