CSVDataExporter uses the Application's converters:
IConverter converter =
Application.get().getConverterLocator().getConverter(c);
So register a suitable converter in your application.
Alternatively create a new Jira issue to allow passing an
IConverterLocator into CSVDataExporter.
Sven
On 07/18/2013 03:29 PM, [email protected] wrote:
Hello,
in my application I have a table which includes a column timestamp. I have
created this column with the help of a Panel which includes a DateLabel.
columns.add(new PropertyColumn<ProtocolRecord, String>(new
ResourceModel("protocolRecord.eventTimestamp").wrapOnAssignment(getPage()),"eventTimestamp","eventTimestamp"){
@Override
public void populateItem(Item<ICellPopulator<ProtocolRecord>> cellItem,
String componentId, IModel<ProtocolRecord> model)
{
cellItem.add(new DatePanel<ProtocolRecord>(componentId,
model,"eventTimestamp"));
}
});
Here is the declaration of the DateLabel:
public class DatePanel<T> extends Panel {
public DatePanel(String id, final IModel<T> model, String column)
{
super(id, model);
DateLabel datelabel = new DateLabel("date",new PropertyModel<Date>(model,
column),new PatternDateConverter("dd.MM.yyyy HH:mm:ss",true));
add(datelabel);
}
}
So the table shows the date like this 18.07.2013 15:23:53. Furthermore the
table has an Exporttoolbar for csv. When I click the link for exporting the
csv, it includes the timestamp like this 2013/07/18. This is wrong. I need the
full timestamp as it would be shown in the table. Could anybody help me please?
Mit freundlichen Grüßen
Christoph Manig
email: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]