display.getList().addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
int selectedPropertyButtonRow = display.getClickedRow(event);
if (selectedPropertyButtonRow >= 0) {
EntitySummary entity = entitySummaries.get(selectedPropertyButtonRow);
if (entity.getClass().equals(CompanySummaryDTO.class)) {
eventBus.fireEvent(new EntityEditEvent(entity, EntityTypes.Company));
} else if (entity.getClass().equals(PublisherSummaryDTO.class)) {
eventBus.fireEvent(new EntityEditEvent(entity, EntityTypes.Publisher));
} else if (entity.getClass().equals(ProductSummaryDTO.class)) {
eventBus.fireEvent(new EntityEditEvent(entity, EntityTypes.Product));
} else if (entity.getClass().equals(SlotSummaryDTO.class)) {
eventBus.fireEvent(new EntityEditEvent(entity, EntityTypes.Slot));
}
} else {
eventBus.fireEvent(new EntityListChangedEvent(entitySummaries));
}