table.cellstylegenerator not invoked on property change

Hello vaadiners

I have seen that similar problem(s) have been mentioned before (for example in this post
but the solutions presented there didn’t worked for me
So I would like to know if is there a more recent/ better/working solution for the problem

I am using vaadin 6.8.5

My use case is:

  • I have table populated with messages ( read and unread)
  • would like to highlight unread messages with bold font
  • when a user selects an unread message it immediately becomes read , so it looses its bold-ness

To achieve this I used a cellstyle generator binded to the message/item unread property

On table’s propertValuechange I set the selected items unread property to false, but nothing happens after, the cellstyle generator is not invoked

I have subclassed table and here is my method which is invoked on tables property value change:

public void setSelectedRead() {
		Object itemId=this.getValue();
		Item item= this.getItem(itemId);
		String isReaded = item.getItemProperty("dpc_isreaded").getValue().toString();
		final boolean isUnread = isReaded.equals("f");
		if (isUnread) {
			Integer messageId=new Integer(item.getItemProperty("message_id").getValue().toString());
			System.out.println("messageID: "+messageId);
			String sql="update dpt_message set dpc_isreaded=? where dpc_id=?";
			try {
				Connection conn=DB.getConnection();
				PreparedStatement pstmt=conn.prepareStatement(sql);
				pstmt.setBoolean(1, true);
				pstmt.setInt(2,messageId );
				System.out.println("isreaded értéke most: "+item.getItemProperty("dpc_isreaded").getValue().toString());
				System.out.println("DB has been updated");
				System.out.println("refreshing cellstyle generator");
//				this.setUnreadCellStyleGenerator();
//				this.refreshRenderedCells();
//				this.refreshRowCache();
			catch (SQLException e) {
				// TODO Auto-generated catch block

As you can see from the code neither of the table’s own refreshing methods have worked so far ( including requestRepaint which is not shown here)

Thanks for your help in advance