use of org.apache.wicket.markup.html.list.ListItem in project midpoint by Evolveum.
the class MainMenuPanel method initLayout.
private void initLayout() {
WebMarkupContainer item = new WebMarkupContainer(ID_ITEM);
item.setOutputMarkupId(true);
item.add(AttributeModifier.append("class", new IModel<String>() {
private static final long serialVersionUID = 1L;
@Override
public String getObject() {
MainMenuItem mainMenuItem = getModelObject();
if (mainMenuItem.isMenuActive(getPageBase())) {
return "active";
}
if (mainMenuItem.hasActiveSubmenu(getPageBase())) {
return "active menu-open";
}
return null;
}
}));
add(item);
item.add(AttributeModifier.append("style", new ReadOnlyModel<>(() -> isMenuExpanded() ? "" : "display: none;")));
WebMarkupContainer link = new AjaxLink<Void>(ID_LINK) {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
mainMenuPerformed();
}
};
item.add(link);
WebMarkupContainer icon = new WebMarkupContainer(ID_ICON);
icon.add(AttributeModifier.replace("class", new PropertyModel<>(getModel(), MainMenuItem.F_ICON_CLASS)));
link.add(icon);
Label label = new Label(ID_LABEL, new StringResourceModel("${nameModel}", getModel()).setDefaultValue(new PropertyModel<>(getModel(), "nameModel")));
link.add(label);
final PropertyModel<String> bubbleModel = new PropertyModel<>(getModel(), MainMenuItem.F_BUBBLE_LABEL);
Label bubble = new Label(ID_BUBBLE, bubbleModel);
bubble.add(new VisibleEnableBehaviour() {
private static final long serialVersionUID = 1L;
@Override
public boolean isVisible() {
return bubbleModel.getObject() != null;
}
});
link.add(bubble);
WebMarkupContainer arrow = new WebMarkupContainer(ID_ARROW);
arrow.add(new VisibleEnableBehaviour() {
private static final long serialVersionUID = 1L;
@Override
public boolean isVisible() {
return getModelObject().containsSubMenu() && bubbleModel.getObject() == null;
}
});
link.add(arrow);
WebMarkupContainer submenu = new WebMarkupContainer(ID_SUBMENU);
item.add(submenu);
ListView<MenuItem> subItem = new ListView<MenuItem>(ID_SUB_ITEM, new PropertyModel<>(getModel(), MainMenuItem.F_ITEMS)) {
@Override
protected void populateItem(ListItem<MenuItem> listItem) {
createSubmenu(listItem);
}
};
submenu.add(subItem);
}
use of org.apache.wicket.markup.html.list.ListItem in project midpoint by Evolveum.
the class MultiValueTextEditPanel method initLayout.
private void initLayout(final boolean inputEnabled, final boolean showPlaceholder, final NonEmptyModel<Boolean> readOnlyModel) {
WebMarkupContainer placeholderContainer = new WebMarkupContainer(ID_PLACEHOLDER_CONTAINER);
placeholderContainer.setOutputMarkupPlaceholderTag(true);
placeholderContainer.setOutputMarkupPlaceholderTag(true);
placeholderContainer.add(new VisibleEnableBehaviour() {
@Override
public boolean isVisible() {
return showPlaceholder && (getModel().getObject() == null || getModel().getObject().isEmpty());
}
});
add(placeholderContainer);
AjaxLink<Void> placeholderAdd = new AjaxLink<Void>(ID_PLACEHOLDER_ADD) {
@Override
public void onClick(AjaxRequestTarget target) {
addValuePerformed(target);
}
};
placeholderAdd.add(new AttributeAppender("class", new IModel<String>() {
@Override
public String getObject() {
if (buttonsDisabled()) {
return " " + CSS_DISABLED;
}
return "";
}
}));
placeholderAdd.add(WebComponentUtil.visibleIfFalse(readOnlyModel));
placeholderAdd.setOutputMarkupId(true);
placeholderAdd.setOutputMarkupPlaceholderTag(true);
placeholderContainer.add(placeholderAdd);
ListView repeater = new ListView<T>(ID_REPEATER, getModel()) {
@Override
protected void populateItem(final ListItem<T> item) {
TextField text = new TextField<>(ID_TEXT, createTextModel(item.getModel()));
text.add(new EmptyOnBlurAjaxFormUpdatingBehaviour());
text.add(AttributeAppender.replace("placeholder", createEmptyItemPlaceholder()));
if (selectedModel != null && item.getModelObject() == selectedModel.getObject()) {
// TODO color constant
text.add(AttributeAppender.append("style", "background-color: #FFFFD0;"));
}
if (!inputEnabled) {
text.add(new AttributeModifier("disabled", "disabled"));
}
item.add(text);
WebMarkupContainer buttonGroup = new WebMarkupContainer(ID_BUTTON_GROUP);
item.add(buttonGroup);
initButtons(buttonGroup, item, readOnlyModel);
}
};
repeater.setOutputMarkupId(true);
repeater.setOutputMarkupPlaceholderTag(true);
repeater.add(new VisibleEnableBehaviour() {
@Override
public boolean isVisible() {
return getModel().getObject() != null && !getModel().getObject().isEmpty();
}
});
add(repeater);
}
use of org.apache.wicket.markup.html.list.ListItem in project midpoint by Evolveum.
the class SynchronizationStep method initObjectSyncEditor.
private void initObjectSyncEditor(WebMarkupContainer editor) {
Label editorLabel = new Label(ID_EDITOR_LABEL, new IModel<String>() {
@Override
public String getObject() {
if (!isAnySelected()) {
// shouldn't occur
return null;
}
String name = syncDtoModel.getObject().getSelected().getName() != null ? syncDtoModel.getObject().getSelected().getName() : "";
return getString("SynchronizationStep.label.editSyncObject", name);
}
});
editorLabel.setOutputMarkupId(true);
editor.add(editorLabel);
TextField editorName = new TextField<>(ID_EDITOR_NAME, new PropertyModel<String>(syncDtoModel, ResourceSynchronizationDto.F_SELECTED + ".name"));
editorName.add(new UpdateNamesBehaviour());
parentPage.addEditingEnabledBehavior(editorName);
editor.add(editorName);
TextArea editorDescription = new TextArea<>(ID_EDITOR_DESCRIPTION, new PropertyModel<String>(syncDtoModel, ResourceSynchronizationDto.F_SELECTED + ".description"));
parentPage.addEditingEnabledBehavior(editorDescription);
editor.add(editorDescription);
DropDownChoice editorKind = new DropDownChoice<>(ID_EDITOR_KIND, new PropertyModel<>(syncDtoModel, ResourceSynchronizationDto.F_SELECTED + ".kind"), WebComponentUtil.createReadonlyModelFromEnum(ShadowKindType.class), new EnumChoiceRenderer<>());
editorKind.setNullValid(true);
editorKind.add(new UpdateNamesBehaviour());
parentPage.addEditingEnabledBehavior(editorKind);
editor.add(editorKind);
TextField editorIntent = new TextField<>(ID_EDITOR_INTENT, new PropertyModel<String>(syncDtoModel, ResourceSynchronizationDto.F_SELECTED + ".intent"));
editorIntent.add(new UpdateNamesBehaviour());
parentPage.addEditingEnabledBehavior(editorIntent);
editor.add(editorIntent);
MultiValueAutoCompleteTextPanel<QName> editorObjectClass = new MultiValueAutoCompleteTextPanel<QName>(ID_EDITOR_OBJECT_CLASS, new PropertyModel<>(syncDtoModel, ResourceSynchronizationDto.F_SELECTED + ".objectClass"), true, parentPage.getReadOnlyModel()) {
@Override
protected IModel<String> createTextModel(final IModel<QName> model) {
return new PropertyModel<>(model, "localPart");
}
@Override
protected QName createNewEmptyItem() {
return new QName("");
}
@Override
protected boolean buttonsDisabled() {
return !isAnySelected();
}
@Override
protected List<QName> createObjectList() {
return syncDtoModel.getObject().getObjectClassList();
}
@Override
protected String createAutoCompleteObjectLabel(QName object) {
return object.getLocalPart();
}
@Override
protected IValidator<String> createAutoCompleteValidator() {
return createObjectClassValidator(new IModel<List<QName>>() {
@Override
public List<QName> getObject() {
return syncDtoModel.getObject().getObjectClassList();
}
});
}
};
parentPage.addEditingEnabledBehavior(editorObjectClass);
editor.add(editorObjectClass);
// TODO: switch to ObjectTypeSelectPanel
DropDownChoice editorFocus = new DropDownChoice<>(ID_EDITOR_FOCUS, new PropertyModel<>(syncDtoModel, ResourceSynchronizationDto.F_SELECTED + ".focusType"), (IModel<List<QName>>) () -> WebComponentUtil.createFocusTypeList(), new QNameChoiceRenderer());
editorFocus.setNullValid(true);
editorFocus.add(new UpdateNamesBehaviour());
parentPage.addEditingEnabledBehavior(editorFocus);
editor.add(editorFocus);
CheckBox editorEnabled = new CheckBox(ID_EDITOR_ENABLED, new PropertyModel<>(syncDtoModel, ResourceSynchronizationDto.F_SELECTED + ".enabled"));
parentPage.addEditingEnabledBehavior(editorEnabled);
editor.add(editorEnabled);
AjaxSubmitLink editorCondition = new AjaxSubmitLink(ID_EDITOR_BUTTON_CONDITION) {
@Override
protected void onSubmit(AjaxRequestTarget target) {
conditionEditPerformed(target);
}
};
addDisableClassModifier(editorCondition);
editor.add(editorCondition);
AjaxSubmitLink editorConfirmation = new AjaxSubmitLink(ID_EDITOR_BUTTON_CONFIRMATION) {
@Override
protected void onSubmit(AjaxRequestTarget target) {
confirmationEditPerformed(target);
}
};
addDisableClassModifier(editorConfirmation);
editor.add(editorConfirmation);
DropDownChoice editorObjectTemplate = new DropDownChoice<>(ID_EDITOR_OBJECT_TEMPLATE, new PropertyModel<>(syncDtoModel, ResourceSynchronizationDto.F_SELECTED + ".objectTemplateRef"), new IModel<List<ObjectReferenceType>>() {
@Override
public List<ObjectReferenceType> getObject() {
return WebModelServiceUtils.createObjectReferenceList(ObjectTemplateType.class, getPageBase(), syncDtoModel.getObject().getObjectTemplateMap());
}
}, new ObjectReferenceChoiceRenderer(syncDtoModel.getObject().getObjectTemplateMap()));
editorObjectTemplate.setNullValid(true);
parentPage.addEditingEnabledBehavior(editorObjectTemplate);
editor.add(editorObjectTemplate);
CheckBox editorReconcile = new CheckBox(ID_EDITOR_RECONCILE, new PropertyModel<>(syncDtoModel, ResourceSynchronizationDto.F_SELECTED + ".reconcile"));
parentPage.addEditingEnabledBehavior(editorReconcile);
editor.add(editorReconcile);
TriStateComboPanel opportunistic = new TriStateComboPanel(ID_EDITOR_OPPORTUNISTIC, new PropertyModel<>(syncDtoModel, ResourceSynchronizationDto.F_SELECTED + ".opportunistic"));
parentPage.addEditingEnabledBehavior(opportunistic);
editor.add(opportunistic);
MultiValueTextEditPanel editorCorrelation = new MultiValueTextEditPanel<ConditionalSearchFilterType>(ID_EDITOR_EDITOR_CORRELATION, new PropertyModel<>(syncDtoModel, ResourceSynchronizationDto.F_SELECTED + ".correlation"), new PropertyModel<>(syncDtoModel, ResourceSynchronizationDto.F_SELECTED_CORRELATION), false, true, parentPage.getReadOnlyModel()) {
@Override
protected IModel<String> createTextModel(final IModel<ConditionalSearchFilterType> model) {
return new Model<String>() {
@Override
public String getObject() {
StringBuilder sb = new StringBuilder();
ConditionalSearchFilterType searchFilter = model.getObject();
if (searchFilter != null && searchFilter.getDescription() != null) {
sb.append(searchFilter.getDescription());
}
if (sb.toString().isEmpty()) {
sb.append(getString("SynchronizationStep.label.notSpecified"));
}
return sb.toString();
}
};
}
@Override
protected ConditionalSearchFilterType createNewEmptyItem() {
return new ConditionalSearchFilterType();
}
@Override
protected void editPerformed(AjaxRequestTarget target, ConditionalSearchFilterType object) {
correlationEditPerformed(target, object);
}
@Override
protected void performAddValueHook(AjaxRequestTarget target, ConditionalSearchFilterType added) {
parentPage.refreshIssues(target);
}
@Override
protected void performRemoveValueHook(AjaxRequestTarget target, ListItem<ConditionalSearchFilterType> item) {
parentPage.refreshIssues(target);
}
@Override
protected boolean buttonsDisabled() {
return !isAnySelected();
}
};
editor.add(editorCorrelation);
MultiValueTextEditPanel editorReaction = new MultiValueTextEditPanel<SynchronizationReactionType>(ID_EDITOR_REACTION, new PropertyModel<>(syncDtoModel, ResourceSynchronizationDto.F_SELECTED + ".reaction"), new PropertyModel<>(syncDtoModel, ResourceSynchronizationDto.F_SELECTED_REACTION), false, true, parentPage.getReadOnlyModel()) {
@Override
protected IModel<String> createTextModel(final IModel<SynchronizationReactionType> model) {
return new Model<String>() {
@Override
public String getObject() {
SynchronizationReactionType reaction = model.getObject();
if (reaction == null) {
return "";
}
StringBuilder sb = new StringBuilder();
sb.append(reaction.getName() != null ? reaction.getName() + " " : "");
sb.append("(");
if (reaction.getSituation() != null) {
sb.append(reaction.getSituation());
}
if (Boolean.TRUE.equals(reaction.isSynchronize()) || !reaction.getAction().isEmpty()) {
sb.append(" -> ");
if (!reaction.getAction().isEmpty()) {
boolean first = true;
for (SynchronizationActionType action : reaction.getAction()) {
if (first) {
first = false;
} else {
sb.append(", ");
}
sb.append(StringUtils.substringAfter(action.getHandlerUri(), "#"));
}
} else {
sb.append(getString("SynchronizationStep.label.editorReaction"));
}
}
sb.append(")");
return sb.toString();
}
};
}
@Override
protected SynchronizationReactionType createNewEmptyItem() {
return new SynchronizationReactionType();
}
@Override
protected void editPerformed(AjaxRequestTarget target, SynchronizationReactionType object) {
reactionEditPerformed(target, object);
}
@Override
protected void performAddValueHook(AjaxRequestTarget target, SynchronizationReactionType added) {
parentPage.refreshIssues(target);
}
@Override
protected void performRemoveValueHook(AjaxRequestTarget target, ListItem<SynchronizationReactionType> item) {
parentPage.refreshIssues(target);
}
@Override
protected boolean buttonsDisabled() {
return !isAnySelected();
}
};
editorReaction.setOutputMarkupId(true);
editor.add(editorReaction);
Label kindTooltip = new Label(ID_T_KIND);
kindTooltip.add(new InfoTooltipBehavior());
editor.add(kindTooltip);
Label intentTooltip = new Label(ID_T_INTENT);
intentTooltip.add(new InfoTooltipBehavior());
editor.add(intentTooltip);
Label objClassTooltip = new Label(ID_T_OBJ_CLASS);
objClassTooltip.add(new InfoTooltipBehavior());
editor.add(objClassTooltip);
Label focusTooltip = new Label(ID_T_FOCUS);
focusTooltip.add(new InfoTooltipBehavior());
editor.add(focusTooltip);
Label enabledTooltip = new Label(ID_T_ENABLED);
enabledTooltip.add(new InfoTooltipBehavior());
editor.add(enabledTooltip);
Label conditionTooltip = new Label(ID_T_CONDITION);
conditionTooltip.add(new InfoTooltipBehavior());
editor.add(conditionTooltip);
Label confirmationTooltip = new Label(ID_T_CONFIRMATION);
confirmationTooltip.add(new InfoTooltipBehavior());
editor.add(confirmationTooltip);
Label objTemplateTooltip = new Label(ID_T_OBJ_TEMPLATE);
objTemplateTooltip.add(new InfoTooltipBehavior());
editor.add(objTemplateTooltip);
Label reconcileTooltip = new Label(ID_T_RECONCILE);
reconcileTooltip.add(new InfoTooltipBehavior());
editor.add(reconcileTooltip);
Label opportunisticTooltip = new Label(ID_T_OPPORTUNISTIC);
opportunisticTooltip.add(new InfoTooltipBehavior());
editor.add(opportunisticTooltip);
Label correlationTooltip = new Label(ID_T_CORRELATION);
correlationTooltip.add(new InfoTooltipBehavior());
editor.add(correlationTooltip);
Label reactionTooltip = new Label(ID_T_REACTION);
reactionTooltip.add(new InfoTooltipBehavior());
editor.add(reactionTooltip);
}
use of org.apache.wicket.markup.html.list.ListItem in project midpoint by Evolveum.
the class ResourceDependencyEditor method initLayout.
protected void initLayout(final PageResourceWizard parentPage) {
WebMarkupContainer container = new WebMarkupContainer(ID_CONTAINER);
container.setOutputMarkupId(true);
add(container);
ListView repeater = new ListView<ResourceObjectTypeDependencyType>(ID_REPEATER, getModel()) {
@Override
protected void populateItem(final ListItem<ResourceObjectTypeDependencyType> item) {
WebMarkupContainer linkContainer = new WebMarkupContainer(ID_DEPENDENCY_LINK);
linkContainer.setOutputMarkupId(true);
linkContainer.add(new AttributeModifier("href", createCollapseItemId(item, true)));
item.add(linkContainer);
Label linkLabel = new Label(ID_DEPENDENCY_LINK_NAME, createDependencyLabelModel(item));
linkContainer.add(linkLabel);
AjaxLink<Void> delete = new AjaxLink<Void>(ID_DELETE_BUTTON) {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
deleteDependencyPerformed(target, item);
}
};
parentPage.addEditingVisibleBehavior(delete);
linkContainer.add(delete);
WebMarkupContainer dependencyBody = new WebMarkupContainer(ID_DEPENDENCY_BODY);
dependencyBody.setOutputMarkupId(true);
dependencyBody.setMarkupId(createCollapseItemId(item, false).getObject());
if (changeState != ChangeState.SKIP) {
dependencyBody.add(new AttributeModifier("class", new IModel<String>() {
@Override
public String getObject() {
if (changeState == ChangeState.FIRST && item.getIndex() == 0) {
return "panel-collapse collapse in";
} else if (changeState == ChangeState.LAST && item.getIndex() == (getModelObject().size() - 1)) {
return "panel-collapse collapse in";
} else {
return "panel-collapse collapse";
}
}
}));
}
item.add(dependencyBody);
TextField order = new TextField<>(ID_ORDER, new PropertyModel<Integer>(item.getModelObject(), "order"));
order.add(prepareAjaxOnComponentTagUpdateBehavior());
parentPage.addEditingEnabledBehavior(order);
dependencyBody.add(order);
DropDownChoice strictness = new DropDownChoice<>(ID_STRICTNESS, new PropertyModel<>(item.getModelObject(), "strictness"), WebComponentUtil.createReadonlyModelFromEnum(ResourceObjectTypeDependencyStrictnessType.class), new EnumChoiceRenderer<>(this));
strictness.add(prepareAjaxOnComponentTagUpdateBehavior());
parentPage.addEditingEnabledBehavior(strictness);
dependencyBody.add(strictness);
DropDownChoice kind = new DropDownChoice<>(ID_KIND, new PropertyModel<>(item.getModelObject(), "kind"), WebComponentUtil.createReadonlyModelFromEnum(ShadowKindType.class), new EnumChoiceRenderer<>(this));
kind.add(prepareAjaxOnComponentTagUpdateBehavior());
parentPage.addEditingEnabledBehavior(kind);
dependencyBody.add(kind);
TextField intent = new TextField<>(ID_INTENT, new PropertyModel<String>(item.getModelObject(), "intent"));
intent.add(prepareAjaxOnComponentTagUpdateBehavior());
parentPage.addEditingEnabledBehavior(intent);
dependencyBody.add(intent);
DropDownChoice resource = new DropDownChoice<>(ID_REF, new PropertyModel<>(item.getModelObject(), "resourceRef"), new IModel<List<ObjectReferenceType>>() {
@Override
public List<ObjectReferenceType> getObject() {
return WebModelServiceUtils.createObjectReferenceList(ResourceType.class, getPageBase(), resourceMap);
}
}, new ObjectReferenceChoiceRenderer(resourceMap));
resource.add(prepareAjaxOnComponentTagUpdateBehavior());
parentPage.addEditingEnabledBehavior(resource);
dependencyBody.add(resource);
Label orderTooltip = new Label(ID_T_ORDER);
orderTooltip.add(new InfoTooltipBehavior());
dependencyBody.add(orderTooltip);
Label strictnessTooltip = new Label(ID_T_STRICTNESS);
strictnessTooltip.add(new InfoTooltipBehavior());
dependencyBody.add(strictnessTooltip);
Label kindTooltip = new Label(ID_T_KIND);
kindTooltip.add(new InfoTooltipBehavior());
dependencyBody.add(kindTooltip);
Label intentTooltip = new Label(ID_T_INTENT);
intentTooltip.add(new InfoTooltipBehavior());
dependencyBody.add(intentTooltip);
Label resourceRefTooltip = new Label(ID_T_RESOURCE_REF);
resourceRefTooltip.add(new InfoTooltipBehavior());
dependencyBody.add(resourceRefTooltip);
}
};
repeater.setOutputMarkupId(true);
container.add(repeater);
AjaxLink<Void> add = new AjaxLink<Void>(ID_ADD_BUTTON) {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
addDependencyPerformed(target);
}
};
parentPage.addEditingVisibleBehavior(add);
add(add);
}
use of org.apache.wicket.markup.html.list.ListItem in project midpoint by Evolveum.
the class ResourceProtectedEditor method initLayout.
protected void initLayout(final PageResourceWizard parentPage) {
WebMarkupContainer container = new WebMarkupContainer(ID_CONTAINER);
container.setOutputMarkupId(true);
add(container);
ListView repeater = new ListView<ResourceObjectPatternType>(ID_REPEATER, getModel()) {
@Override
protected void populateItem(final ListItem<ResourceObjectPatternType> item) {
WebMarkupContainer linkCont = new WebMarkupContainer(ID_ACCOUNT_LINK);
linkCont.setOutputMarkupId(true);
linkCont.add(new AttributeModifier("href", createCollapseItemId(item, true)));
item.add(linkCont);
Label accountLabel = new Label(ID_ACCOUNT_NAME, new IModel<String>() {
@Override
public String getObject() {
StringBuilder sb = new StringBuilder();
ResourceObjectPatternType account = item.getModelObject();
sb.append("#").append(item.getIndex() + 1).append(" - ");
return sb.toString();
}
});
linkCont.add(accountLabel);
AjaxLink<Void> delete = new AjaxLink<Void>(ID_BUTTON_DELETE) {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
deleteProtectedAccountPerformed(target, item);
}
};
parentPage.addEditingVisibleBehavior(delete);
linkCont.add(delete);
WebMarkupContainer accountBody = new WebMarkupContainer(ID_ACCOUNT_BODY);
accountBody.setOutputMarkupId(true);
accountBody.setMarkupId(createCollapseItemId(item, false).getObject());
if (changeState != ChangeState.SKIP) {
accountBody.add(new AttributeModifier("class", new IModel<String>() {
@Override
public String getObject() {
if (changeState == ChangeState.FIRST && item.getIndex() == 0) {
return "panel-collapse collapse in";
} else if (changeState == ChangeState.LAST && item.getIndex() == (getModelObject().size() - 1)) {
return "panel-collapse collapse in";
} else {
return "panel-collapse collapse";
}
}
}));
}
item.add(accountBody);
// TODO - maybe add some validator and auto-complete functionality?
TextField name = new TextField<>(ID_NAME, new PropertyModel<String>(item.getModel(), "name"));
name.add(new EmptyOnBlurAjaxFormUpdatingBehaviour());
parentPage.addEditingEnabledBehavior(name);
accountBody.add(name);
// TODO - maybe add some validator and auto-complete functionality?
TextField uid = new TextField<>(ID_UID, new PropertyModel<String>(item.getModel(), "uid"));
uid.add(new EmptyOnBlurAjaxFormUpdatingBehaviour());
parentPage.addEditingEnabledBehavior(uid);
accountBody.add(uid);
SearchFilterPanel searchFilterPanel = new SearchFilterPanel<>(ID_FILTER_EDITOR, new NonEmptyPropertyModel<>(item.getModel(), "filter"), parentPage.getReadOnlyModel());
accountBody.add(searchFilterPanel);
Label nameTooltip = new Label(ID_T_NAME);
nameTooltip.add(new InfoTooltipBehavior());
accountBody.add(nameTooltip);
Label uidTooltip = new Label(ID_T_UID);
uidTooltip.add(new InfoTooltipBehavior());
accountBody.add(uidTooltip);
Label filterTooltip = new Label(ID_T_FILTER);
filterTooltip.add(new InfoTooltipBehavior());
accountBody.add(filterTooltip);
}
};
repeater.setOutputMarkupId(true);
container.add(repeater);
AjaxLink<Void> add = new AjaxLink<Void>(ID_BUTTON_ADD) {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
addProtectedAccountPerformed(target);
}
};
parentPage.addEditingVisibleBehavior(add);
add(add);
}
Aggregations