Hi,
I am developing an application where I am displaying a set of data in a vaadin table, from MySQL database. The problem is that, there are 2 Date fields which are too long in their default formate. They display the date along with the time span. I want to formate them to a simple formate as “dd-mm-yyyy”. But I dont know how to it. I heard that it can be done using Converter. But when I try to use a Converter I found so many other thing like PRESENTATION, MODEL and so on.
In vaadin 6 this could be achieved by simply calling a method as formatPropertyValue(), but its not available in vaadin 7.
final BeanItemContainer cardBeanItemContainer = new BeanItemContainer(Card.class);
cardBeanItemContainer.addAll(cardService.findByMember(member.getId()));
final Table tblCards=new Table();
tblCards.setSelectable(true);
tblCards.setWidth(“95%”);
//Fill the data
tblCards.setContainerDataSource(cardBeanItemContainer);
tblCards.setVisibleColumns(new Object{“cardType”,“issueDate”,“expiryDate”,“status”});
Converter looks too complex, or I didnt understand it properly.
Can anyone write sample code specifically to formate a date value in the data source which is assigned to a table?
Thanks,
Kishor