Show Calendar Attribute in Table

Hi everybody,

i´m using a table to show some items.
this item contains an attribute of the type “java.util.Calendar”. when i try to show this item attribute in the table, it looks like this: java.util.GregorianCalendar[time=1420736297330,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=“Europe/Berlin”,offset=3600000,dstSavings=3600000,useDaylight=true,transitions=143,lastRule=java.util.SimpleTimeZone[id=Europe/Berlin,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]

Is there a way to show a correct date and time string?! like 2015-07-10 11:44:14

Here´s some code:

public class MyItem{
    private Calendar date;

    public Calendar getDate() {
        return date;

public class MyView extends View{
       private Table table;
       private BeanItemContainer<MyItem> myContainer;

private Table buildTable() {
        table = new Table();
        myContainer= new BeanItemContainer<MyItem>(MyItem.class);


A couple of ways; the easiest would probably be to extend your table and override the FormatPropertyValue mathod. In the method, you can check if the property is of type Calendar, and return the representation that you want. Another way is to add a GeneratedColumn with the same property id as the field in your container (in this case it would be ‘date’). The generated column will effectively override the one from the container, but will require you to use a Component in the cell, slowing the table down.