TableFieldFactory being set, but NOT being called...

I have created a Table and a BeanItemContainer to hold the data for the table.

The POJO in the container has four String attributes and one Boolean attribute.

I want to have only the Boolean attribute be editable.

I have setEditable(true) on the table and I have created my own TableFieldFactory extends DefaultFieldFactory class and set the table to use that class.

So I have met the requirements for using my field factory as the table is editable (setEditable() is called before setTableFieldFactory()).

I can see the TableFieldFactory being created in the setTableFieldFactory call, but the createField method in the factory is NEVER called. It is in the createField method where I call setReadOnly on all the non-Boolean fields as they are created.

What am I doing wrong or have I found a bug in Vaadin?

I’m using version 6.6.

Thank you in advance,
Chuck

Also, while on the subject, it would be nice if fields marked as Read Only (setReadOnly(true)) were rendered as Label widgets instead of as TextField widgets that you can’t edit.

This should hold true for forms and tables.

right now the only work-around I see is to manually create the table columns and populate them myself instead of using a data binding.

Chuck

Ok, the read-only issue is resolved as I over rode the wrong createField method. Now my field factory is being used, but I want the fields to be labels, not text fields.

Is there any way to accomplish this with a data binding that uses BeanItemContainer?

Thanks,
Chuck

Ok, I wrote my own LabelField widget.

If you want a copy, I’ll sanitize it and send it along!

Chuck