use of com.evolveum.midpoint.web.component.MultiCompositedButtonPanel in project midpoint by Evolveum.
the class AssignmentPopup method onInitialize.
@Override
protected void onInitialize() {
super.onInitialize();
Form form = new Form(ID_FORM);
form.setOutputMarkupId(true);
add(form);
MultiCompositedButtonPanel newObjectIcon = new MultiCompositedButtonPanel(ID_COMPOSITED_BUTTONS, createNewButtonDescriptionModel()) {
@Override
protected void buttonClickPerformed(AjaxRequestTarget target, AssignmentObjectRelation relationSpec, CompiledObjectCollectionView collectionViews, Class<? extends WebPage> page) {
Form form = (Form) AssignmentPopup.this.get(ID_FORM);
AssignmentPopup.this.getModelObject().setSelectionVisible(false);
addOrReplaceTabPanels(form, relationSpec);
target.add(form);
}
};
form.add(newObjectIcon);
newObjectIcon.add(new VisibleBehaviour(() -> getModelObject() != null && getModelObject().isSelectionVisible()));
addOrReplaceTabPanels(form, null);
MessagePanel warningMessage = new MessagePanel(ID_WARNING_MESSAGE, MessagePanel.MessagePanelType.WARN, getWarningMessageModel());
warningMessage.setOutputMarkupId(true);
warningMessage.add(new VisibleBehaviour(() -> getWarningMessageModel() != null));
add(warningMessage);
form.add(createCancelButton());
form.add(createAddButton());
form.add(createBackButton());
}
use of com.evolveum.midpoint.web.component.MultiCompositedButtonPanel in project midpoint by Evolveum.
the class NewObjectCreationPopup method initLayout.
private void initLayout() {
MultiCompositedButtonPanel buttonPanel = new MultiCompositedButtonPanel(ID_NEW_OBJECT_SELECTION_BUTTON_PANEL, getModel()) {
private static final long serialVersionUID = 1L;
@Override
protected void buttonClickPerformed(AjaxRequestTarget target, AssignmentObjectRelation relationSpec, CompiledObjectCollectionView collectionViews, Class<? extends WebPage> page) {
NewObjectCreationPopup.this.buttonClickPerformed(target, relationSpec, collectionViews, page);
}
};
buttonPanel.setOutputMarkupId(true);
add(buttonPanel);
AjaxButton cancel = new AjaxButton(ID_BUTTON_CANCEL, createStringResource("PageBase.button.cancel")) {
@Override
public void onClick(AjaxRequestTarget target) {
cancelPerformed(target);
}
};
add(cancel);
}
use of com.evolveum.midpoint.web.component.MultiCompositedButtonPanel in project midpoint by Evolveum.
the class PageCreateFromTemplate method initLayout.
private void initLayout() {
MultiCompositedButtonPanel buttonsPanel = new MultiCompositedButtonPanel(ID_TEMPLATE, new PropertyModel<>(loadButtonDescriptions(), MultiFunctinalButtonDto.F_ADDITIONAL_BUTTONS)) {
private static final long serialVersionUID = 1L;
@Override
protected void buttonClickPerformed(AjaxRequestTarget target, AssignmentObjectRelation relationSpec, CompiledObjectCollectionView collectionViews, Class<? extends WebPage> page) {
List<ObjectReferenceType> archetypeRef = ObjectCollectionViewUtil.getArchetypeReferencesList(collectionViews);
try {
WebComponentUtil.initNewObjectWithReference(getPageBase(), getType(), archetypeRef);
} catch (SchemaException ex) {
getPageBase().getFeedbackMessages().error(PageCreateFromTemplate.this, ex.getUserFriendlyMessage());
target.add(getPageBase().getFeedbackPanel());
}
}
};
add(buttonsPanel);
}
use of com.evolveum.midpoint.web.component.MultiCompositedButtonPanel in project midpoint by Evolveum.
the class CreateTemplatePanel method initLayout.
private void initLayout() {
MultiCompositedButtonPanel buttonsPanel = new MultiCompositedButtonPanel(ID_TEMPLATE, new PropertyModel<>(loadButtonDescriptions(), MultiFunctinalButtonDto.F_ADDITIONAL_BUTTONS)) {
private static final long serialVersionUID = 1L;
@Override
protected void buttonClickPerformed(AjaxRequestTarget target, AssignmentObjectRelation relationSpec, CompiledObjectCollectionView collectionViews, Class<? extends WebPage> page) {
onTemplateChosePerformed(collectionViews, target);
}
};
add(buttonsPanel);
}
use of com.evolveum.midpoint.web.component.MultiCompositedButtonPanel in project midpoint by Evolveum.
the class PageSystemConfiguration method initLayout.
private void initLayout() {
IModel<List<CompositedIconButtonDto>> model = Model.ofList(Arrays.asList(createCompositedButton("fa fa-wrench", PageSystemBasic.class), createCompositedButton("fa fa-camera", PageSystemPolicies.class), createCompositedButton("fa fa-envelope", PageSystemNotification.class), createCompositedButton("fa fa-file-text", PageSystemLogging.class), createCompositedButton("fa fa-camera", PageProfiling.class), createCompositedButton("fa fa-camera", PageSystemAdminGui.class), createCompositedButton("fa fa-camera", PageSystemWorkflow.class), createCompositedButton("fa fa-camera", PageRoleManagement.class), createCompositedButton("fa fa-camera", PageSystemInternals.class), createCompositedButton("fa fa-camera", PageAccessCertification.class)));
MultiCompositedButtonPanel panel = new MultiCompositedButtonPanel(ID_CONTAINER, model) {
@Override
protected void buttonClickPerformed(AjaxRequestTarget target, AssignmentObjectRelation relationSpec, CompiledObjectCollectionView collectionViews, Class<? extends WebPage> page) {
navigateToNext(page);
}
};
panel.add(AttributeModifier.append("class", " row"));
add(panel);
}
Aggregations