use of org.apache.wicket.markup.html.WebMarkupContainer in project midpoint by Evolveum.
the class SchemaListPanel method initDetailsPanel.
private void initDetailsPanel(WebMarkupContainer parent) {
WebMarkupContainer detailsContainer = new WebMarkupContainer(ID_DETAILS_PANEL);
detailsContainer.setOutputMarkupId(true);
detailsContainer.setOutputMarkupPlaceholderTag(true);
parent.add(detailsContainer);
Label displayName = new Label(ID_DETAILS_DISPLAY_NAME, new PropertyModel<String>(detailsModel, ObjectClassDetailsDto.F_DISPLAY_NAME));
detailsContainer.add(displayName);
Label description = new Label(ID_DETAILS_DESCRIPTION, new PropertyModel<String>(detailsModel, ObjectClassDetailsDto.F_DESCRIPTION));
detailsContainer.add(description);
Label kind = new Label(ID_DETAILS_KIND, new PropertyModel<String>(detailsModel, ObjectClassDetailsDto.F_KIND));
detailsContainer.add(kind);
Label intent = new Label(ID_DETAILS_INTENT, new PropertyModel<String>(detailsModel, ObjectClassDetailsDto.F_INTENT));
detailsContainer.add(intent);
Label nativeObjectClass = new Label(ID_DETAILS_NATIVE_OBJECT_CLASS, new PropertyModel<String>(detailsModel, ObjectClassDetailsDto.F_NATIVE_OBJECT_CLASS));
detailsContainer.add(nativeObjectClass);
CheckBox isDefault = new CheckBox(ID_DETAILS_DEFAULT, new PropertyModel<Boolean>(detailsModel, ObjectClassDetailsDto.F_IS_DEFAULT));
isDefault.setEnabled(false);
detailsContainer.add(isDefault);
Label kindTooltip = new Label(ID_T_KIND);
kindTooltip.add(new InfoTooltipBehavior());
detailsContainer.add(kindTooltip);
Label intentTooltip = new Label(ID_T_INTENT);
intentTooltip.add(new InfoTooltipBehavior());
detailsContainer.add(intentTooltip);
Label nativeObjClassTooltip = new Label(ID_T_NATIVE_OBJECT_CLASS);
nativeObjClassTooltip.add(new InfoTooltipBehavior());
detailsContainer.add(nativeObjClassTooltip);
Label defaultTooltip = new Label(ID_T_DEFAULT);
defaultTooltip.add(new InfoTooltipBehavior());
detailsContainer.add(defaultTooltip);
}
use of org.apache.wicket.markup.html.WebMarkupContainer in project midpoint by Evolveum.
the class SchemaListPanel method initLayout.
protected void initLayout() {
final ObjectClassDataProvider dataProvider = new ObjectClassDataProvider(allClasses);
TextField objectClass = new TextField<>(ID_OBJECT_CLASS, new Model<>());
objectClass.setOutputMarkupId(true);
objectClass.add(new AjaxFormComponentUpdatingBehavior("keyup") {
@Override
protected void onUpdate(AjaxRequestTarget target) {
updateSearchPerformed(target, dataProvider);
}
});
add(objectClass);
AjaxButton clearSearch = new AjaxButton(ID_CLEAR_SEARCH) {
@Override
public void onClick(AjaxRequestTarget target) {
clearSearchPerformed(target, dataProvider);
}
};
add(clearSearch);
WebMarkupContainer tableBody = new WebMarkupContainer(ID_TABLE_BODY);
tableBody.setOutputMarkupId(true);
add(tableBody);
DataView<ObjectClassDto> objectClassDataView = new DataView<ObjectClassDto>(ID_OBJECT_CLASS_LIST, dataProvider, UserProfileStorage.DEFAULT_PAGING_SIZE) {
@Override
protected void populateItem(final Item<ObjectClassDto> item) {
AjaxLink link = new AjaxLink(ID_CLASS_LINK) {
@Override
public void onClick(AjaxRequestTarget target) {
objectClassClickPerformed(target, item.getModelObject());
}
};
item.add(link);
Label label = new Label(ID_LABEL, new PropertyModel<>(item.getModel(), ObjectClassDto.F_DISPLAY_NAME));
link.add(label);
item.add(AttributeModifier.replace("class", new AbstractReadOnlyModel<Object>() {
@Override
public Object getObject() {
return item.getModelObject().isSelected() ? "success" : null;
}
}));
}
};
tableBody.add(objectClassDataView);
NavigatorPanel objectClassNavigator = new NavigatorPanel(ID_NAVIGATOR, objectClassDataView, true);
objectClassNavigator.setOutputMarkupId(true);
objectClassNavigator.setOutputMarkupPlaceholderTag(true);
add(objectClassNavigator);
WebMarkupContainer objectClassInfoContainer = new WebMarkupContainer(ID_OBJECT_CLASS_INFO_CONTAINER);
objectClassInfoContainer.setOutputMarkupId(true);
add(objectClassInfoContainer);
WebMarkupContainer objectClassInfoColumn = new WebMarkupContainer(ID_OBJECT_CLASS_INFO_COLUMN);
objectClassInfoColumn.add(new VisibleEnableBehaviour() {
@Override
public boolean isVisible() {
return getSelectedObjectClass() != null;
}
});
objectClassInfoContainer.add(objectClassInfoColumn);
initDetailsPanel(objectClassInfoColumn);
ListDataProvider<AttributeDto> attributeProvider = new ListDataProvider<>(this, attributeModel, true);
attributeProvider.setSort(AttributeDto.F_DISPLAY_ORDER, SortOrder.ASCENDING);
BoxedTablePanel<AttributeDto> attributeTable = new BoxedTablePanel<>(ID_ATTRIBUTE_TABLE, attributeProvider, initColumns());
attributeTable.setOutputMarkupId(true);
attributeTable.setItemsPerPage(UserProfileStorage.DEFAULT_PAGING_SIZE);
attributeTable.setShowPaging(true);
objectClassInfoColumn.add(attributeTable);
}
use of org.apache.wicket.markup.html.WebMarkupContainer in project midpoint by Evolveum.
the class WizardIssuesPanel method initLayout.
private void initLayout() {
WebMarkupContainer panel = new WebMarkupContainer(ID_PANEL);
panel.add(new VisibleEnableBehaviour() {
@Override
public boolean isVisible() {
return getModelObject().hasIssues();
}
});
panel.add(AttributeAppender.append("class", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
WizardIssuesDto issuesDto = WizardIssuesPanel.this.getModelObject();
WizardIssuesDto.Severity severity = issuesDto.getSeverity();
return severity != null ? "box-" + severity.getColorStyle() : null;
}
}));
add(panel);
Label title = new Label(ID_TITLE, new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
WizardIssuesDto issuesDto = WizardIssuesPanel.this.getModelObject();
WizardIssuesDto.Severity severity = issuesDto.getSeverity();
if (severity == null) {
return "";
} else if (severity == WizardIssuesDto.Severity.INFO) {
return getString("Wizard.Notes");
} else {
return getString("Wizard.Issues");
}
}
});
panel.add(title);
WebMarkupContainer table = new WebMarkupContainer(ID_TABLE);
panel.add(table);
ListView<WizardIssuesDto.Issue> issues = new ListView<WizardIssuesDto.Issue>(ID_ROW, new PropertyModel<List<WizardIssuesDto.Issue>>(getModel(), WizardIssuesDto.F_ISSUES)) {
@Override
protected void populateItem(ListItem<WizardIssuesDto.Issue> item) {
WizardIssuesDto.Issue issue = item.getModelObject();
Label severityLabel = new Label(ID_SEVERITY, "");
severityLabel.add(AttributeAppender.replace("class", issue.getSeverityClass()));
item.add(severityLabel);
item.add(new Label(ID_TEXT, issue.getText()));
}
};
table.add(issues);
}
use of org.apache.wicket.markup.html.WebMarkupContainer in project midpoint by Evolveum.
the class SchemaHandlingStep method credentialsEditPerformed.
private void credentialsEditPerformed(AjaxRequestTarget target) {
WebMarkupContainer newContainer = new ResourceCredentialsEditor(ID_THIRD_ROW_CONTAINER, new PropertyModel<ResourceCredentialsDefinitionType>(schemaHandlingDtoModel, getExpression(ResourceObjectTypeDefinitionType.F_CREDENTIALS)), parentPage);
getThirdRowContainer().replaceWith(newContainer);
resetSelections(target);
target.add(getThirdRowContainer(), get(ID_OBJECT_TYPE_EDITOR), parentPage.getFeedbackPanel());
}
use of org.apache.wicket.markup.html.WebMarkupContainer in project midpoint by Evolveum.
the class SchemaHandlingStep method activationEditPerformed.
private void activationEditPerformed(AjaxRequestTarget target) {
WebMarkupContainer newContainer = new ResourceActivationEditor(ID_THIRD_ROW_CONTAINER, new PropertyModel<ResourceActivationDefinitionType>(schemaHandlingDtoModel, getExpression(ResourceObjectTypeDefinitionType.F_ACTIVATION)), parentPage.getReadOnlyModel());
getThirdRowContainer().replaceWith(newContainer);
resetSelections(target);
target.add(getThirdRowContainer(), get(ID_OBJECT_TYPE_EDITOR), parentPage.getFeedbackPanel());
}
Aggregations