myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Lessard" <simon.lessar...@gmail.com>
Subject Re: f:convertDateTime - CAN you have 2 patterns?
Date Tue, 27 Mar 2007 19:53:44 GMT
Hello,

You can also consider using Trinidad, its date converter supports a primary
and secondary pattern.


Regards,

~ Simon

On 3/27/07, Mike Kienenberger <mkienenb@gmail.com> wrote:
>
> You'd need to write your own converter.
> Subclass the standard JSF date converter, then override getAsObject()
> to also try inputPattern2="yyyy-MM-dd's value if pattern didn't work.
>
>
> On 3/27/07, Charbel Abdul-Massih <cabdulmassih@soundbite.com> wrote:
> >
> >
> >
> >
> > I have the following inputText
> >
> >
> >
> > <h:inputText value="#{someDate}"  id="endDate">
> >
> >       <f:convertDateTime pattern="MM/dd/yyyy" />
> >
> > </h:inputText>
> >
> >
> >
> > However, I want the application to also recognize the pattern
> "MM/dd/yy"…
> >
> > Is it possible to specify two date patterns and have JSF convert them
> both
> > correctly?????
> >
> >
> >
> > Thanks,
> >
> >  Charbel
>

Mime
View raw message