use of com.evolveum.midpoint.web.component.data.column.CheckBoxPanel in project midpoint by Evolveum.
the class RoleMemberPanel method initSearch.
@Override
protected void initSearch(Form form) {
List<QName> allowedTypes = WebComponentUtil.createFocusTypeList();
allowedTypes.add(FocusType.COMPLEX_TYPE);
DropDownChoice<QName> typeSelect = createDropDown(ID_OBJECT_TYPE, Model.of(FocusType.COMPLEX_TYPE), allowedTypes, new QNameChoiceRenderer());
add(typeSelect);
DropDownChoice<OrgType> tenant = createDropDown(ID_TENANT, new Model(), createTenantList(), new ObjectTypeChoiceRenderer<OrgType>());
add(tenant);
tenant.add(new VisibleEnableBehaviour() {
@Override
public boolean isVisible() {
return isRole();
}
});
DropDownChoice<OrgType> project = createDropDown(ID_PROJECT, new Model(), createProjectList(), new ObjectTypeChoiceRenderer<OrgType>());
add(project);
project.add(new VisibleEnableBehaviour() {
@Override
public boolean isVisible() {
return isRole();
}
});
CheckBoxPanel includeIndirectMembers = new CheckBoxPanel(ID_INDIRECT_MEMBERS, new Model<Boolean>(false)) {
private static final long serialVersionUID = 1L;
public void onUpdate(AjaxRequestTarget target) {
refreshTable(target);
}
};
add(includeIndirectMembers);
// TODO shouldn't we hide also the label?
includeIndirectMembers.add(new VisibleBehaviour(this::isRole));
}
use of com.evolveum.midpoint.web.component.data.column.CheckBoxPanel in project midpoint by Evolveum.
the class JasperReportConfigurationPanel method initParameterColumns.
private List<IColumn<JasperReportParameterDto, String>> initParameterColumns() {
List<IColumn<JasperReportParameterDto, String>> columns = new ArrayList<>();
IColumn<JasperReportParameterDto, String> column = new CheckBoxHeaderColumn<>();
columns.add(column);
// name editing column
columns.add(buildEditableLinkColumn("JasperReportConfigurationPanel.parameterName", null, "name", true));
// class editing column
columns.add(buildEditableLinkColumn("JasperReportConfigurationPanel.parameterClass", null, "typeAsString", true));
columns.add(buildEditableLinkColumn("JasperReportConfigurationPanel.nestedClass", null, "nestedTypeAsString", true));
columns.add(new LinkColumn<JasperReportParameterDto>(createStringResource("JasperReportConfigurationPanel.properties")) {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target, IModel<JasperReportParameterDto> rowModel) {
showPropertiesPopup(target, rowModel);
}
@Override
protected IModel createLinkModel(IModel<JasperReportParameterDto> rowModel) {
return createStringResource("JasperReportConfigurationPanel.configure");
}
});
CheckBoxColumn<JasperReportParameterDto> forPrompting = new CheckBoxColumn<JasperReportParameterDto>(createStringResource("JasperReportConfigurationPanel.forPrompting"), "forPrompting") {
private static final long serialVersionUID = 1L;
@Override
public void populateItem(Item<ICellPopulator<JasperReportParameterDto>> cellItem, String componentId, IModel<JasperReportParameterDto> rowModel) {
CheckBoxPanel checkBox = new CheckBoxPanel(componentId, new PropertyModel<Boolean>(rowModel, getPropertyExpression()), new Model<>(true));
cellItem.add(checkBox);
}
};
columns.add(forPrompting);
return columns;
}
Aggregations