Your best bet is to go through and read the souce for inputCalendar
and DateTimeConverter.

On 9/18/06, Sławek Sobótka <[EMAIL PROTECTED]> wrote:
t:inputCalendar works really strange:

when i specify converter than date rendering ignores popupDateFormat
parameter.


i have created my own converter that extends org.apache.myfaces.
custom.convertDateTime.DateTimeConverter.
i have overriden ONLY menthod getAsObject (getAsString remains from
super class).
converter works fine - it "recognizez" my special strings (like t+5)

but

date in component renders in default way (like: Sep 18, 2006)
instead of specified in popupDateFormat parameter format: dd.MM.yyyy




> Yes, if I recall, t:inputCalendar calls some specific methods on the
> date converter.
>
> It would be great if we could have patches to make t:inputCalendar
> work better with the faces-config.xml file changes.
>
> On 9/16/06, Sławek Sobótka <[EMAIL PROTECTED]> wrote:
> > thanks. it works fine for h:inputText but not for t:inputCalendar.
I
> > guess taht inputCalendar has differend model than java.util.Date.
..?
> >
> > >
> > > you can overwrite all entries in your applications faces-config.
xml,
> > > so just insert this
> > >
> > >     <converter>
> > >         <converter-id>javax.faces.DateTime</converter-id>
> > >         <converter-class>[your.converter.class]</converter-
class>
> > >     </converter>
> > >
> > >     <converter>
> > >         <converter-for-class>java.util.Date</converter-for-
class>
> > >         <converter-class>[your.converter.class]</converter-
class>
> > >     </converter>
> > >
> > > to overwrite the default DateTimeConverter.
> > >
> > > Regards
> > >
> > >     volker
> > >
> > > 2006/9/16, Sławek Sobótka <[EMAIL PROTECTED]>:
> > > > i would like to let users input date like this: t+5 (that
means 5
> > days
> > > > from now). i know that i can write ny own converter, register
in i
> > > > faces-config and use it like this: <t:inputCalendar
> > > > converter"Tconverter" ...
> > > >
> > > > but
> > > >
> > > > i dont like it;)
> > > >
> > > > i would like to replace default_jsf_date_converter (or
whatever it
> > > > names) by my own converter. i just dont want to traverse all
my
> > pages
> > > > and paste converter="TConverter" in every input calendar.
> > > >
> > > > how can i do this?
> > > >
> > > > ----------------------------------------------------
> > > > Mega koncert - Duran Duran - Warszawa Służewiec 23 września
> > 2006!
> > > > Zdobądź bilet dla siebie i swoich przyjaciół - Kliknij:
> > > > http://klik.wp.pl/?adr=http%3A%2F%2Fadv.reklama.wp.pl%2Fas%
2Fd2.
> > html&sid=862
> > > >
> > > >
> > > >
> > >
> >
> > ----------------------------------------------------
> > Mega koncert - Duran Duran - Warszawa Służewiec 23 września 2006!
> > Zdobądź bilet dla siebie i swoich przyjaciół - Kliknij:
> > http://klik.wp.pl/?adr=http%3A%2F%2Fadv.reklama.wp.pl%2Fas%2Fd2.
html&sid=862
> >
> >
> >
>

----------------------------------------------------
Mega koncert - Duran Duran - Warszawa Służewiec 23 września 2006!
Zdobądź bilet dla siebie i swoich przyjaciół - Kliknij:
http://klik.wp.pl/?adr=http%3A%2F%2Fadv.reklama.wp.pl%2Fas%2Fd2.html&sid=862



Reply via email to