public ValidationsEffectView() {
validationListPanel.onAdd(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
FBValidationItem validation = validationListPanel.getValidationSelection();
if (validation != null) {
validationEditionPanel.setCurrentValidation(validation);
validationEditionPanel.setVisible(true);
}
}
});
validationEditionPanel.onCommitEdition(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
FBValidationItem validation = validationEditionPanel.getCurrentValidation();
validationTablePanel.addValidation(validation);
}
});
validationTablePanel.addSelectionHandler(new SelectionHandler<FBValidationItem>() {
@Override
public void onSelection(SelectionEvent<FBValidationItem> event) {
FBValidationItem item = event.getSelectedItem();
validationEditionPanel.setCurrentValidation(item);
}
});
add(validationListPanel);
add(validationEditionPanel);