Extend one of the defaultcolumns, like propertycolumn, and override
onpopulateitem.
Something like this:
public void populateItem(Item item, String componentId, IModel model)
{
item.add(new Label(componentId, createLabelModel(model))
{
private static final long serialVersionUID = 1L;
@Override
@SuppressWarnings( {"unused", "unchecked"})
public IConverter getConverter(Class type)
{
return
Application.get().getConverterLocator().getConverter(Time.class);
}
}.setRenderBodyOnly(true));
}
Or if you are using a propertycolumn you could override
createLabelModel to return a custom model that handles the formatting
for you.
Maurice
On Wed, Jul 16, 2008 at 6:51 AM, nanotech <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> How can I change the pattern for a column displaying date from database in
> DataTable.
> In my case it displays the Short date format by default. which is mm/dd/yy
> I want to able to display MM/dd/yyyy.
>
> Thanks,
> RG
> --
> View this message in context:
> http://www.nabble.com/Changing-the-DatePattern-in-DataTable-tp18480202p18480202.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]