Maybe this can be of help:
http://www.mail-archive.com/wicket-user@lists.sourceforge.net/msg01584.html

Igor
 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Nick Heudecker
> Sent: Friday, July 22, 2005 2:28 PM
> To: wicket-user@lists.sourceforge.net
> Subject: Re: [Wicket-user] Converters
> 
> That's what I looked at and added this to my application class: 
> 
>     public IConverterFactory getConverterFactory() {
>         return new IConverterFactory() {
>             public IConverter newConverter(Locale locale) {
>                 SimpleDateFormat format = new 
> SimpleDateFormat("yyyy-MM-dd");
> 
>                 Converter converter = new Converter(locale);
>                 DateConverter dc = new DateConverter();
>                 dc.setDateFormat(locale, format);
>                 DateToStringConverter dtsc = new 
> DateToStringConverter();
>                 dtsc.setDateFormat(locale, format);
> 
>                 StringConverter sc = new StringConverter();
>                 sc.set(Date.class, dtsc);
>                 converter.set(String.class, sc);
>                 converter.set(Date.class, dc);
> 
>                 converter.set(BigDecimal.class, new 
> BigDecimalConverter());
>                 return converter;
>             }
>         };
>     }
> 
> The BigDecimalConverter is mine and seems to be working fine. 
>  I can input dates as YYYY-MM-DD, but they're still presented 
> as DD/MM/YY in non-form pages.
> 
> 
> On 7/22/05, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> > Does this:
> > 
> http://wicket.sourceforge.net/wiki/index.php/Using_custom_conv
> erters help?
> > 
> > Eelco
> > 
> > Nick Heudecker wrote:
> > 
> > >Hi,
> > >
> > >I'd like to have dates in my application formatted as YYYY-MM-DD.
> > >I've been able to get it working for submitted dates, but 
> displayed 
> > >dates are still being returned as DD/MM/YY.  How do I 
> properly setup 
> > >the converter for this?
> > >
> > >Also, I'm having a problem with BigDecimals and OGNL.  If 
> the field 
> > >that contains the BigDecimal is null, OGNL is still trying 
> to convert 
> > >it and throwing a java.lang.NumberFormatException.  How can I tell 
> > >OGNL to ignore the value if it's blank?
> > >
> > >Thanks.
> > >
> > >
> > >-------------------------------------------------------
> > >SF.Net email is sponsored by: Discover Easy Linux Migration 
> > >Strategies from IBM. Find simple to follow Roadmaps, 
> straightforward 
> > >articles, informative Webcasts and more! Get everything 
> you need to 
> > >get up to speed, fast. 
> > >http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
> > >_______________________________________________
> > >Wicket-user mailing list
> > >Wicket-user@lists.sourceforge.net
> > >https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> > >
> > 
> > 
> > 
> > -------------------------------------------------------
> > SF.Net email is sponsored by: Discover Easy Linux Migration 
> Strategies 
> > from IBM. Find simple to follow Roadmaps, straightforward articles, 
> > informative Webcasts and more! Get everything you need to get up to 
> > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> > _______________________________________________
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> 
> 
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration 
> Strategies from IBM. Find simple to follow Roadmaps, 
> straightforward articles, informative Webcasts and more! Get 
> everything you need to get up to speed, fast. 
> http://ads.osdn.com/?ad_idt77&alloc_id492&op=ick
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 
> 




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to