use of com.evolveum.midpoint.web.component.util.SelectableBeanImpl in project midpoint by Evolveum.
the class UserPersonasPanel method initLayout.
protected void initLayout() {
MainObjectListPanel<UserType> userListPanel = new MainObjectListPanel<UserType>(ID_PERSONAS_TABLE, UserType.class, null) {
private static final long serialVersionUID = 1L;
@Override
protected IColumn<SelectableBean<UserType>, String> createCheckboxColumn() {
return null;
}
@Override
protected List<InlineMenuItem> createInlineMenu() {
List<InlineMenuItem> menuItems = new ArrayList<>();
menuItems.add(new ButtonInlineMenuItem(createStringResource("AssignmentPanel.viewTargetObject")) {
private static final long serialVersionUID = 1L;
@Override
public CompositedIconBuilder getIconCompositedBuilder() {
return getDefaultCompositedIconBuilder(GuiStyleConstants.CLASS_NAVIGATE_ARROW);
}
@Override
public InlineMenuItemAction initAction() {
return new ColumnMenuAction<SelectableBeanImpl<UserType>>() {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
SelectableBean<UserType> personaRefSelectableBean = getRowModel().getObject();
UserType personaRefObj = personaRefSelectableBean.getValue();
ObjectReferenceType ort = new ObjectReferenceType();
ort.setOid(personaRefObj.getOid());
ort.setType(WebComponentUtil.classToQName(UserPersonasPanel.this.getPrismContext(), personaRefObj.getClass()));
WebComponentUtil.dispatchToObjectDetailsPage(ort, UserPersonasPanel.this, false);
}
};
}
@Override
public boolean isHeaderMenuItem() {
return false;
}
});
return menuItems;
}
@Override
protected void objectDetailsPerformed(AjaxRequestTarget target, UserType object) {
}
@Override
protected boolean isCreateNewObjectEnabled() {
return false;
}
@Override
protected ISelectableDataProvider<UserType, SelectableBean<UserType>> createProvider() {
return createSelectableBeanObjectDataProvider(() -> getFocusPersonasQuery(), null);
}
// @Override
// protected ObjectQuery getCustomizeContentQuery() {
//
// }
@Override
protected boolean isObjectDetailsEnabled(IModel<SelectableBean<UserType>> rowModel) {
return false;
}
@Override
protected UserProfileStorage.TableId getTableId() {
return null;
}
@Override
protected boolean enableSavePageSize() {
return false;
}
};
userListPanel.setOutputMarkupId(true);
add(userListPanel);
}
use of com.evolveum.midpoint.web.component.util.SelectableBeanImpl in project midpoint by Evolveum.
the class FocusPersonasTabPanel method initLayout.
private void initLayout() {
MainObjectListPanel<F> userListPanel = new MainObjectListPanel<F>(ID_PERSONAS_TABLE, (Class<F>) FocusType.class, null) {
private static final long serialVersionUID = 1L;
@Override
protected IColumn<SelectableBean<F>, String> createCheckboxColumn() {
return null;
}
@Override
protected List<InlineMenuItem> createInlineMenu() {
List<InlineMenuItem> menuItems = new ArrayList<>();
menuItems.add(new ButtonInlineMenuItem(createStringResource("AssignmentPanel.viewTargetObject")) {
private static final long serialVersionUID = 1L;
@Override
public CompositedIconBuilder getIconCompositedBuilder() {
return getDefaultCompositedIconBuilder(GuiStyleConstants.CLASS_NAVIGATE_ARROW);
}
@Override
public InlineMenuItemAction initAction() {
return new ColumnMenuAction<SelectableBeanImpl<F>>() {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
SelectableBean<F> personaRefSelectableBean = getRowModel().getObject();
F personaRefObj = personaRefSelectableBean.getValue();
ObjectReferenceType ort = new ObjectReferenceType();
ort.setOid(personaRefObj.getOid());
ort.setType(WebComponentUtil.classToQName(FocusPersonasTabPanel.this.getPrismContext(), personaRefObj.getClass()));
WebComponentUtil.dispatchToObjectDetailsPage(ort, FocusPersonasTabPanel.this, false);
}
};
}
@Override
public boolean isHeaderMenuItem() {
return false;
}
});
return menuItems;
}
@Override
protected void objectDetailsPerformed(AjaxRequestTarget target, F object) {
}
@Override
protected boolean isCreateNewObjectEnabled() {
return false;
}
@Override
protected ISelectableDataProvider<F, SelectableBean<F>> createProvider() {
return createSelectableBeanObjectDataProvider(() -> getFocusPersonasQuery(), null);
}
// @Override
// protected ObjectQuery getCustomizeContentQuery() {
//
// }
@Override
protected boolean isObjectDetailsEnabled(IModel<SelectableBean<F>> rowModel) {
return false;
}
@Override
protected UserProfileStorage.TableId getTableId() {
return null;
}
@Override
protected boolean enableSavePageSize() {
return false;
}
};
userListPanel.setOutputMarkupId(true);
add(userListPanel);
}
use of com.evolveum.midpoint.web.component.util.SelectableBeanImpl in project midpoint by Evolveum.
the class OrgUnitAddDeletePopup method initColumns.
private List<IColumn<SelectableBeanImpl<ObjectType>, String>> initColumns() {
List<IColumn<SelectableBeanImpl<ObjectType>, String>> columns = new ArrayList<>();
IColumn column = new CheckBoxHeaderColumn<OrgType>();
columns.add(column);
column = new AjaxLinkColumn<SelectableBeanImpl<OrgType>>(createStringResource("orgUnitAddDeletePopup.column.name"), getSortableProperty(), "value.name") {
@Override
public void onClick(AjaxRequestTarget target, IModel<SelectableBeanImpl<OrgType>> rowModel) {
OrgType org = rowModel.getObject().getValue();
chooseOperationPerformed(target, org);
}
};
columns.add(column);
return columns;
}
Aggregations