Reputation: 965
I was wondering if it's possible to create a CellTable with the headers on the side instead of on top. Or what would be a good way to show data in this way?
Example:
------------------------------------------
- Name - My name -
------------------------------------------
- Surname - My surname -
------------------------------------------
- Email - [email protected] -
------------------------------------------
I could do it using simple panels but in this case I don't know how to use a data provider.
Update: SmartGWT provides this functionality with DetailViewer, but I cannot use SmartGWT.
Upvotes: 0
Views: 129
Reputation: 3502
You can extend AbstractCellTableBuilder
MyTableBuilder extends AbstractCellTableBuilder<T>
and override
protected void buildRowImpl()
Then add a style to each first td element so it looks like a header, etc... The buildRowImpl() gives you control about how each row is built. It's going to be a bit tricky to manipulate your model but you should be able to see through it.
Then give the table builder to your cell table as follows and call your data provider to refresh the display.
myCellTable.setTableBuilder(new MyTableBuilder());
Upvotes: 0