use of org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow in project midpoint by Evolveum.
the class AssociationValueChoicePanel method initGenericDialog.
// for ModalWindow treatment see comments in ChooseTypePanel
private void initGenericDialog(final Class<C> type, final List<PrismPropertyValue> values) {
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 Collection<SelectorOptions<GetOperationOptions>> getDataProviderOptions() {
return getAssociationsSearchOptions();
}
@Override
public ObjectQuery getDataProviderQuery() {
return query;
}
@Override
public boolean isSearchEnabled() {
//TODO don't commit
return false;
}
@Override
public Class<? extends ObjectType> getObjectTypeClass() {
return type;
}
};
ObjectSelectionPage.prepareDialog(dialog, context, this, "chooseTypeDialog.title", ID_TEXT_WRAPPER);
add(dialog);
}
use of org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow in project midpoint by Evolveum.
the class AssociationValueChoicePanel method editValuePerformed.
public void editValuePerformed(AjaxRequestTarget target) {
ModalWindow window = (ModalWindow) get(MODAL_ID_OBJECT_SELECTION_POPUP);
window.show(target);
}
use of org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow in project midpoint by Evolveum.
the class SynchronizationReactionEditor method initModals.
private void initModals() {
ModalWindow actionEditor = new SynchronizationActionEditorDialog(ID_ACTION_MODAL, null) {
@Override
public void updateComponents(AjaxRequestTarget target) {
target.add(SynchronizationReactionEditor.this.get(ID_ACTION), parentStep.getReactionList());
}
};
add(actionEditor);
}
use of org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow in project midpoint by Evolveum.
the class ResourceCredentialsEditor method initModals.
private void initModals(NonEmptyModel<Boolean> readOnlyModel) {
ModalWindow inboundEditor = new MappingEditorDialog(ID_MODAL_INBOUND, null, readOnlyModel) {
@Override
public void updateComponents(AjaxRequestTarget target) {
target.add(ResourceCredentialsEditor.this.get(ID_INBOUND));
}
};
add(inboundEditor);
ModalWindow outboundEditor = new MappingEditorDialog(ID_MODAL_OUTBOUND, null, readOnlyModel) {
@Override
public void updateComponents(AjaxRequestTarget target) {
target.add(ResourceCredentialsEditor.this.get(ID_OUTBOUND_LABEL), ResourceCredentialsEditor.this.get(ID_OUTBOUND_BUTTON));
}
};
add(outboundEditor);
}
use of org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow in project midpoint by Evolveum.
the class ResourceAssociationEditor method initModals.
private void initModals(NonEmptyModel<Boolean> readOnlyModel) {
ModalWindow limitationsEditor = new LimitationsEditorDialog(ID_MODAL_LIMITATIONS, new PropertyModel<List<PropertyLimitationsType>>(getModel(), "limitations"), readOnlyModel);
add(limitationsEditor);
ModalWindow inboundEditor = new MappingEditorDialog(ID_MODAL_INBOUND, null, readOnlyModel) {
@Override
public void updateComponents(AjaxRequestTarget target) {
target.add(ResourceAssociationEditor.this.get(ID_INBOUND), parentStep.getAssociationList());
}
};
add(inboundEditor);
ModalWindow outboundEditor = new MappingEditorDialog(ID_MODAL_OUTBOUND, null, readOnlyModel) {
@Override
public void updateComponents(AjaxRequestTarget target) {
target.add(ResourceAssociationEditor.this.get(ID_OUTBOUND_LABEL), ResourceAssociationEditor.this.get(ID_BUTTON_OUTBOUND), parentStep.getAssociationList());
}
};
add(outboundEditor);
}
Aggregations