Hi.
I have generated a column in my table and it works fine, but when i try to select a row I cannot select it if the cursor is
inside that column. Any other column is fine.
The generate component is a CustomComponent having a HorizontalLayout as its compositionroot.
The component code looks like this:
public class JobStatusLabel extends CustomComponent {
private final Label label = new Label();
private final ProgressIndicator progressIndicator = new ProgressIndicator();
private final Button buttonStop = new Button("Stop");
private final HorizontalLayout layout = new HorizontalLayout();
public JobStatusLabel() {
progressIndicator.setVisible(false);
progressIndicator.setWidth(100, UNITS_PIXELS);
buttonStop.setVisible(false);
buttonStop.setStyleName(Reindeer.BUTTON_LINK);
label.setSizeUndefined();
layout.addComponent(label);
layout.addComponent(progressIndicator);
layout.addComponent(buttonStop);
layout.setComponentAlignment(progressIndicator, Alignment.MIDDLE_LEFT);
layout.setSpacing(true);
setCompositionRoot(layout);
}
public Label getLabel() {
return label;
}
public ProgressIndicator getProgressIndicator() {
return progressIndicator;
}
public Button getButtonStop() {
return buttonStop;
}
}
The generator code is like this:
private class StatusColumnGenerator implements Table.ColumnGenerator {
public Component generateCell(Table source, Object itemId, Object columnId) {
Item item = source.getItem(itemId);
JobStatusLabel statusLabel = new JobStatusLabel();
updateStatusLabel(item, statusLabel);
return statusLabel;
}
}
Any idea why the click event is not propogated to the table?