use of com.evolveum.midpoint.web.component.menu.cog.InlineMenuItem in project midpoint by Evolveum.
the class PageTasks method initNodeColumns.
private List<IColumn<NodeDto, String>> initNodeColumns() {
List<IColumn<NodeDto, String>> columns = new ArrayList<>();
IColumn column = new CheckBoxHeaderColumn<>();
columns.add(column);
column = new PropertyColumn<>(createStringResource("pageTasks.node.name"), "name", "name");
columns.add(column);
columns.add(new EnumPropertyColumn<NodeDto>(createStringResource("pageTasks.node.executionStatus"), "executionStatus") {
@Override
protected String translate(Enum en) {
return createStringResource(en).getString();
}
});
columns.add(new PropertyColumn(createStringResource("pageTasks.node.managementPort"), "managementPort"));
columns.add(new AbstractColumn<NodeDto, String>(createStringResource("pageTasks.node.lastCheckInTime")) {
@Override
public void populateItem(Item<ICellPopulator<NodeDto>> item, String componentId, final IModel<NodeDto> rowModel) {
item.add(new Label(componentId, new AbstractReadOnlyModel<Object>() {
@Override
public Object getObject() {
return createLastCheckInTime(rowModel);
}
}));
}
});
CheckBoxColumn check = new CheckBoxColumn(createStringResource("pageTasks.node.clustered"), "clustered");
check.setEnabled(false);
columns.add(check);
columns.add(new PropertyColumn(createStringResource("pageTasks.node.statusMessage"), "statusMessage"));
IColumn<NodeDto, String> menuColumn = new InlineMenuButtonColumn<NodeDto>(createNodesInlineMenu(false), 2, PageTasks.this) {
@Override
protected int getHeaderNumberOfButtons() {
return 2;
}
@Override
protected List<InlineMenuItem> getHeaderMenuItems() {
return createNodesInlineMenu(true);
}
};
columns.add(menuColumn);
return columns;
}
use of com.evolveum.midpoint.web.component.menu.cog.InlineMenuItem in project midpoint by Evolveum.
the class RoleGovernanceRelationsPanel method createNewMemberInlineMenuItems.
@Override
protected List<InlineMenuItem> createNewMemberInlineMenuItems() {
List<InlineMenuItem> newMemberMenuItems = new ArrayList<>();
newMemberMenuItems.add(new InlineMenuItem(createStringResource("roleMemberPanel.menu.createApprover"), false, new HeaderMenuAction(this) {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
createFocusMemberPerformed(RelationTypes.APPROVER.getRelation(), target);
}
}));
newMemberMenuItems.add(new InlineMenuItem(createStringResource("roleMemberPanel.menu.assignApprovers"), false, new HeaderMenuAction(this) {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
addMembers(RelationTypes.APPROVER.getRelation(), target);
}
}));
newMemberMenuItems.add(new InlineMenuItem(createStringResource("roleMemberPanel.menu.createOwner"), false, new HeaderMenuAction(this) {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
createFocusMemberPerformed(RelationTypes.OWNER.getRelation(), target);
}
}));
newMemberMenuItems.add(new InlineMenuItem(createStringResource("roleMemberPanel.menu.assignOwners"), false, new HeaderMenuAction(this) {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
addMembers(RelationTypes.OWNER.getRelation(), target);
}
}));
newMemberMenuItems.add(new InlineMenuItem(createStringResource("TreeTablePanel.menu.createManager"), false, new HeaderMenuAction(this) {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
createFocusMemberPerformed(RelationTypes.MANAGER.getRelation(), target);
}
}));
newMemberMenuItems.add(new InlineMenuItem(createStringResource("TreeTablePanel.menu.addManagers"), false, new HeaderMenuAction(this) {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
addMembers(RelationTypes.MANAGER.getRelation(), target);
}
}));
return newMemberMenuItems;
}
use of com.evolveum.midpoint.web.component.menu.cog.InlineMenuItem in project midpoint by Evolveum.
the class OrgTreePanel method createTreeMenuInternal.
private List<InlineMenuItem> createTreeMenuInternal() {
List<InlineMenuItem> items = new ArrayList<>();
InlineMenuItem item = new InlineMenuItem(createStringResource("TreeTablePanel.collapseAll"), new InlineMenuItemAction() {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
collapseAllPerformed(target);
}
});
items.add(item);
item = new InlineMenuItem(createStringResource("TreeTablePanel.expandAll"), new InlineMenuItemAction() {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
expandAllPerformed(target);
}
});
items.add(item);
List<InlineMenuItem> additionalActions = createTreeMenu();
if (additionalActions != null) {
items.addAll(additionalActions);
}
return items;
}
use of com.evolveum.midpoint.web.component.menu.cog.InlineMenuItem in project midpoint by Evolveum.
the class PageCreatedReports method initInlineMenu.
private List<InlineMenuItem> initInlineMenu() {
List<InlineMenuItem> headerMenuItems = new ArrayList<>();
headerMenuItems.add(new InlineMenuItem(createStringResource("pageCreatedReports.inlineMenu.deleteAll"), true, new HeaderMenuAction(this) {
@Override
public void onSubmit(AjaxRequestTarget target, Form<?> form) {
deleteAllPerformed(target, ReportDeleteDialogDto.Operation.DELETE_ALL);
}
}));
headerMenuItems.add(new InlineMenuItem(createStringResource("pageCreatedReports.inlineMenu.deleteSelected"), true, new HeaderMenuAction(this) {
@Override
public void onSubmit(AjaxRequestTarget target, Form<?> form) {
deleteSelectedPerformed(target, ReportDeleteDialogDto.Operation.DELETE_SELECTED, null);
}
}));
return headerMenuItems;
}
use of com.evolveum.midpoint.web.component.menu.cog.InlineMenuItem in project midpoint by Evolveum.
the class AbstractRoleMemberPanel method createMemberRecomputeInlineMenuItems.
protected List<InlineMenuItem> createMemberRecomputeInlineMenuItems() {
List<InlineMenuItem> recomputeMenuItems = new ArrayList<>();
recomputeMenuItems.add(new InlineMenuItem(createStringResource("TreeTablePanel.menu.recomputeMembersSelected"), false, new HeaderMenuAction(this) {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
recomputeMembersPerformed(QueryScope.SELECTED, target);
}
}));
recomputeMenuItems.add(new InlineMenuItem(createStringResource("TreeTablePanel.menu.recomputeMembersAllDirect"), false, new HeaderMenuAction(this) {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
recomputeMembersPerformed(QueryScope.ALL_DIRECT, target);
}
}));
recomputeMenuItems.add(new InlineMenuItem(createStringResource("TreeTablePanel.menu.recomputeMembersAll"), false, new HeaderMenuAction(this) {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
recomputeMembersPerformed(QueryScope.ALL, target);
}
}));
return recomputeMenuItems;
}
Aggregations