use of com.evolveum.midpoint.web.page.admin.configuration.component.ObjectSelectionPanel in project midpoint by Evolveum.
the class AssociationValueChoicePanel method initUserOrgDialog.
private void initUserOrgDialog() {
final ModalWindow dialog = new ModalWindow(MODAL_ID_OBJECT_SELECTION_POPUP);
ObjectSelectionPanel.Context context = new ObjectSelectionPanel.Context(this) {
private static final long serialVersionUID = 1L;
// See analogous discussion in ChooseTypePanel
public AssociationValueChoicePanel getRealParent() {
return WebComponentUtil.theSameForPage(AssociationValueChoicePanel.this, getCallingPageReference());
}
@Override
public void chooseOperationPerformed(AjaxRequestTarget target, ObjectType object) {
getRealParent().choosePerformed(target, object);
}
@Override
public boolean isSearchEnabled() {
return true;
}
@Override
public Class<? extends ObjectType> getObjectTypeClass() {
return UserType.class;
}
@Override
protected WebMarkupContainer createExtraContentContainer(String extraContentId, final ObjectSelectionPanel objectSelectionPanel) {
return new UserOrgReferenceChoosePanel(extraContentId, Boolean.FALSE) {
@Override
protected void onReferenceTypeChangePerformed(AjaxRequestTarget target, Boolean newValue) {
objectSelectionPanel.updateTableByTypePerformed(target, Boolean.FALSE.equals(newValue) ? UserType.class : OrgType.class);
}
};
}
};
ObjectSelectionPage.prepareDialog(dialog, context, this, "chooseTypeDialog.title", ID_TEXT_WRAPPER);
add(dialog);
}
Aggregations