use of org.activityinfo.ui.client.component.chooseForm.ChooseFormCallback in project activityinfo by bedatadriven.
the class DropPanelDropController method chooseReference.
private void chooseReference(final FieldWidgetContainer container, final FormField formField) {
final ChooseFormDialog dialog = new ChooseFormDialog(this.formDesigner.getResourceLocator());
dialog.choose(new ChooseFormCallback() {
@Override
public void onChosen(CatalogEntry entry) {
ReferenceType type = (ReferenceType) formField.getType();
type.setRange(ResourceId.valueOf(entry.getId()));
formField.setLabel(entry.getLabel());
container.syncWithModel();
}
@Override
public void onCanceled() {
container.removeFromForm();
}
});
}
Aggregations