use of au.com.vaadinutils.crud.GridHeadingPropertySet in project VaadinUtils by rlsutton1.
the class TwinColumnSelect method createAvailableGrid.
@SuppressWarnings("deprecation")
protected void createAvailableGrid() {
createAvailableContainer();
// TODO: Add proper uniqueId
availableGrid = new SearchableGrid<C, JPAContainer<C>>(this.getClass().getSimpleName(), itemClass) {
private static final long serialVersionUID = 1L;
@Override
public GridHeadingPropertySet<C> getHeadingPropertySet() {
return createAvailableHeadings();
}
@Override
public JPAContainer<C> getContainer() {
return availableContainer;
}
@Override
protected Filter getContainerFilter(String filterString, boolean advancedSearchActive) {
Filter searchFilter = null;
if (filterString != null && filterString.length() > 0) {
searchFilter = getSearchFilter(filterString);
}
return NullFilter.and(baselineFilter, selectedFilter, searchFilter);
}
@Override
protected String getTitle() {
return null;
}
};
// Needs to be here after availableContainer creation,
// otherwise sorting goes away
sortAvailableContainer();
availableGrid.addItemClickListener(new ItemClickListener() {
private static final long serialVersionUID = 1L;
@Override
public void itemClick(ItemClickEvent event) {
if (event.isDoubleClick()) {
addButton.click();
}
}
});
availableGrid.setWidth(DEFAULT_COLUMN_WIDTH, Unit.PIXELS);
availableGrid.setHeight(DEFAULT_COLUMN_HEIGHT, Unit.PIXELS);
}
Aggregations