It worked out.
My solution is:
private static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss"; private static final SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);

...
@Override
protected IModel createLabelModel(IModel rowModel) {
return new Model<String>(sdf.format(new PropertyModel<Date>(rowModel, getPropertyExpression()).getObject()));
       }

Thank you for help.

Regards,
Wojtek

Ernesto Reinaldo Barreiro pisze:
Are you using PropertyColumn? If yes... Why not override

protected IModel<?> createLabelModel(IModel<T> rowModel)
{
return new PropertyModel(rowModel, propertyExpression);
}


and return a model that formats the date as you need?

Best,

Ernesto

2009/10/30 zabian <zabia...@gmail.com>

Hi there,
i would like to find out if the date format for java.util.Date property is
customizable in DataTable.
Could anyone point me how to set it?

Regards,
Wojtek

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to