In my previous project, I've used BeanItemContainer and a Table with GeneratedColumns to simply display a custom component that displays a search result, like google. Title, date, content in a vertical fashion. As horrible as it was (table) it worked.
Now I want to utilize Grid component for a new project, with the same objective. The column will be generated and contain a custom component.
Will this work with Grid? is there something better, like a list or repeater component available? Any example of a single column with custom component?
It seems like Vaadin frowns on anything other than simple data or Button renderers.
Update
It looks like adding components don't work out of the box with Grid 7.5+
Also, Grid cells like to be only be fixed hight
ComponentRederer Add-on support cell components, however fix height is still an issue.
Sample code:
public class Result {
String title;
Date date;
URL url;
String description;
List<String> tags;
public Result (){}
}
BeanItemContainer<Result> resultContainer = fetchResults(searchTerm);
I also use a Lazy Container too, beanitem used for simplicity.
I then have a RecordResultComponent that constructs the layout of a single record result in the follow layout:
Title(link with Url)
Date
Description
tag1 tag2 tag3 ...
FieldGroup
binding to some extent in order to achieve a similar effect, however it is difficult to imagine what exactly you're trying to do without seeing some code. Any chance you could share a sscce? – Caracara