DateLabel has various static #forXyz() factory methods.
Use any of them.

On Thu, Jun 13, 2013 at 12:58 PM, <christoph.ma...@t-systems.com> wrote:

> Hello,
>
> thank you for your help. But this wouldn#t work because the return type of
> getFormat in my example is DateTimeFormatter from joda. Is there another
> example? Why I have to override this method?
>
>
> Mit freundlichen Grüßen
> Christoph Manig
> Systems Engineer
>
> T-Systems International GmbH
> Systems Integration - SC Travel, Transport & Logistics
> Hoyerswerdaer Str. 18
> 01099 Dresden
> tel.:   +49 (0) 351 / 8152 - 188
> fax:    +49 (0) 351 / 8152 – 209
> email:  christoph.ma...@t-systems.com
>
> -----Ursprüngliche Nachricht-----
> Von: Martin Grigorov [mailto:mgrigo...@apache.org]
> Gesendet: Donnerstag, 13. Juni 2013 11:41
> An: users@wicket.apache.org
> Betreff: Re: DateConverter getFormat
>
> Hi,
>
> Here is one example:
>
> https://github.com/apache/wicket/blob/master/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/DateTextField.java?source=cc#L128
>
>
> On Thu, Jun 13, 2013 at 12:28 PM, <christoph.ma...@t-systems.com> wrote:
>
> > Hello,
> >
> > In my application the server's timezone could be different to the
> > client's timezone. So in my BasicPage I get the client's timezone with
> this call:
> > ((WebClientInfo)getSession().getClientInfo()).getProperties().getTimeZ
> > one();
> >
> > So every DateTextField and DateLabel should convert the date between
> > client and server right? Now I want to add a DateLabel. The
> > constructor wants a Converter so I add this:
> >
> > DateLabel datelabel = new DateLabel("date",new
> > PropertyModel<Date>(model,"eventTimestamp"),new DateConverter(true) {
> >                 @Override
> >                 public String getDatePattern(Locale locale) {
> >                     return "dd.MM.yyyy HH:mm:ss";
> >                 }
> >
> >                 @Override
> >                 protected DateTimeFormatter getFormat(Locale locale) {
> >                     return null;  //To change body of implemented
> > methods use File | Settings | File Templates.
> >                 }
> >
> >             });
> > I don't now how to override the getFormat-method. Can you help me please?
> >
> > Thanks
> >
> > Mit freundlichen Grüßen
> > Christoph Manig
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to