we used a general converter:
@Override
protected IConverterLocator newConverterLocator() {
ConverterLocator locator = new ConverterLocator();
locator.set(Date.class, new CustomDateConverter());
return locator;
}
public class CustomDateConverter extends DateConverter {
private static final long serialVersionUID = 1L;
@Override
/**
* @see
org.apache.wicket.util.convert.converters.DateConverter#getDateFormat(java.util.Locale)
*/
public DateFormat getDateFormat(Locale locale) {
DateFormat dateFormat = super.getDateFormat(locale);
// fix bug 1366: don't allow negative numbers in dates
dateFormat.setLenient(false);
return dateFormat;
}
}
We also have a CustomeDateTextField .
This component has it's own converter (class member)
The getConverter returns
Eyal Golan
egola...@gmail.com
Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74
P Save a tree. Please don't print this e-mail unless it's really necessary
On Wed, May 27, 2009 at 11:34 AM, srinivas wrote:
> Hi,
>
> How to set the date format at the project level. I have dates displaying at
> no. of locations in my project.
> Currently i have to format the date patter in each and every page as the
> default date patter of wicket is (MM/DD/).
> But i want the date formate to be (DD/MM/). so if any one knows this
> tell me.
> Thanks in advance.
>
> Regards,
> Srinivasa Raju CH.
>
>
>
>
>
> Get your world in your inbox!
>
> Mail, widgets, documents, spreadsheets, organizer and much more with your
> Sifymail WIYI id!
> Log on to http://www.sify.com
>
> ** DISCLAIMER **
> Information contained and transmitted by this E-MAIL is proprietary to Sify
> Limited and is intended for use only by the individual or entity to which it
> is addressed, and may contain information that is privileged, confidential
> or exempt from disclosure under applicable law. If this is a forwarded
> message, the content of this E-MAIL may not have been sent with the
> authority of the Company. If you are not the intended recipient, an agent of
> the intended recipient or a person responsible for delivering the
> information to the named recipient, you are notified that any use,
> distribution, transmission, printing, copying or dissemination of this
> information in any way or in any manner is strictly prohibited. If you have
> received this communication in error, please delete this mail & notify us
> immediately at ad...@sifycorp.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>