use of org.apache.wicket.markup.html.WebMarkupContainer in project midpoint by Evolveum.
the class TestConnectionResultPanel method initLayout.
private void initLayout(Page parentPage) {
WebMarkupContainer contentPanel = new WebMarkupContainer(ID_CONTENT_PANEL);
contentPanel.setOutputMarkupId(true);
add(contentPanel);
Label messageLabel = new Label(ID_MESSAGE, ((PageBase) parentPage).createStringResource("TestConnectionResultPanel.message"));
messageLabel.setOutputMarkupId(true);
contentPanel.add(messageLabel);
messageLabel.add(new VisibleEnableBehaviour() {
public boolean isVisible() {
return !isLoaded;
}
});
AjaxLazyLoadPanel resultsPanel = new AjaxLazyLoadPanel(ID_RESULT) {
@Override
public Component getLazyLoadComponent(String id) {
return new TestConnectionMessagesPanel(id, resourceOid, (PageBase) parentPage);
}
@Override
protected void onComponentLoaded(Component component, AjaxRequestTarget target) {
isLoaded = true;
target.add(component);
target.add(messageLabel);
}
};
contentPanel.add(resultsPanel);
AjaxButton ok = new AjaxButton(ID_OK) {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
getPageBase().hideMainPopup(target);
okPerformed(target);
}
};
contentPanel.add(ok);
}
use of org.apache.wicket.markup.html.WebMarkupContainer in project midpoint by Evolveum.
the class PageAccount method initLayout.
private void initLayout() {
Form mainForm = new Form("mainForm");
mainForm.setMultiPart(true);
add(mainForm);
WebMarkupContainer protectedMessage = new WebMarkupContainer(ID_PROTECTED_MESSAGE);
protectedMessage.add(new VisibleEnableBehaviour() {
@Override
public boolean isVisible() {
ObjectWrapper wrapper = accountModel.getObject();
return wrapper.isProtectedAccount();
}
});
mainForm.add(protectedMessage);
PrismObjectPanel<ShadowType> userForm = new PrismObjectPanel<ShadowType>("account", accountModel, new PackageResourceReference(ImgResources.class, ImgResources.HDD_PRISM), mainForm, this);
mainForm.add(userForm);
initButtons(mainForm);
}
use of org.apache.wicket.markup.html.WebMarkupContainer in project midpoint by Evolveum.
the class AssignmentEditorPanel method showEmptyPerformed.
private void showEmptyPerformed(AjaxRequestTarget target) {
AssignmentEditorDto dto = AssignmentEditorPanel.this.getModel().getObject();
dto.setShowEmpty(!dto.isShowEmpty());
WebMarkupContainer parent = (WebMarkupContainer) get(createComponentPath(ID_BODY, ID_CONSTRUCTION_CONTAINER));
target.add(parent.get(ID_ATTRIBUTES), parent.get(createComponentPath(ID_SHOW_EMPTY, ID_SHOW_EMPTY_LABEL)), getPageBase().getFeedbackPanel());
}
use of org.apache.wicket.markup.html.WebMarkupContainer in project midpoint by Evolveum.
the class LockoutStatusPanel method initLayout.
private void initLayout(final IModel<LockoutStatusType> model) {
WebMarkupContainer container = new WebMarkupContainer(ID_CONTAINER);
add(container);
Label label = new Label(ID_LABEL, new IModel<String>() {
@Override
public String getObject() {
LockoutStatusType object = model != null ? model.getObject() : null;
String labelValue = object == null ? ((PageBase) getPage()).createStringResource("LockoutStatusType.UNDEFINED").getString() : WebComponentUtil.createLocalizedModelForEnum(object, getLabel()).getObject();
if (!isInitialState) {
labelValue += " " + ((PageBase) getPage()).createStringResource("LockoutStatusPanel.changesSaving").getString();
}
return labelValue;
}
@Override
public void setObject(String s) {
}
@Override
public void detach() {
}
});
label.setOutputMarkupId(true);
container.add(label);
AjaxButton button = new AjaxButton(ID_BUTTON, getButtonModel()) {
@Override
public void onClick(AjaxRequestTarget ajaxRequestTarget) {
PrismPropertyValue oldValue = (PrismPropertyValue) valueWrapper.getOldValue();
if (!isInitialState) {
model.setObject(initialValue);
oldValue.setValue(initialValue);
valueWrapper.setStatus(ValueStatus.NOT_CHANGED);
} else {
model.setObject(LockoutStatusType.NORMAL);
if (oldValue.getValue() != null) {
oldValue.setValue(null);
}
}
isInitialState = !isInitialState;
ajaxRequestTarget.add(getButton());
ajaxRequestTarget.add(getLabel());
}
};
button.add(new VisibleEnableBehaviour() {
@Override
public boolean isVisible() {
return true;
}
});
button.setOutputMarkupId(true);
container.add(button);
}
use of org.apache.wicket.markup.html.WebMarkupContainer in project midpoint by Evolveum.
the class AssignmentCatalogPanel method initLayout.
private void initLayout() {
initModels();
initProvider();
setOutputMarkupId(true);
initHeaderPanel();
WebMarkupContainer panelContainer = new WebMarkupContainer(ID_CATALOG_ITEMS_PANEL_CONTAINER);
panelContainer.setOutputMarkupId(true);
add(panelContainer);
addOrReplaceLayout(null, panelContainer);
}
Aggregations