Search in sources :

Example 1 with DateFormGroup

use of com.evolveum.midpoint.web.component.form.DateFormGroup in project midpoint by Evolveum.

the class AuditPopupPanel method initLayout.

@SuppressWarnings("serial")
private void initLayout(final Component component) {
    TextFormGroup name = new TextFormGroup(ID_NAME, new PropertyModel<String>(getModel(), AuditReportDto.F_NAME), createStringResource("ObjectType.name"), ID_LABEL_SIZE, ID_INPUT_SIZE, true);
    add(name);
    TextFormGroup description = new TextFormGroup(ID_DESCRIPTION, new PropertyModel<String>(getModel(), AuditReportDto.F_DESCRIPTION), createStringResource("ObjectType.description"), ID_LABEL_SIZE, ID_INPUT_SIZE, true);
    add(description);
    IModel choices = WebComponentUtil.createReadonlyModelFromEnum(ExportType.class);
    IChoiceRenderer renderer = new EnumChoiceRenderer();
    DropDownFormGroup exportType = new DropDownFormGroup(ID_EXPORT_TYPE, new PropertyModel<ExportType>(getModel(), AuditReportDto.F_EXPORT_TYPE), choices, renderer, createStringResource("AuditPopulPanel.exportType.label"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
    add(exportType);
    choices = WebComponentUtil.createReadonlyModelFromEnum(AuditEventType.class);
    DropDownFormGroup auditEventType = new DropDownFormGroup(ID_AUDITEVENTTYPE, new PropertyModel<AuditEventType>(getModel(), AuditReportDto.F_AUDITEVENTTYPE), choices, renderer, createStringResource("AuditPopupPanel.auditEventType"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
    add(auditEventType);
    DateFormGroup dateFrom = new DateFormGroup(ID_DATE_FROM, new PropertyModel<XMLGregorianCalendar>(getModel(), AuditReportDto.F_FROM_GREG), createStringResource("AuditPopupPanel.dateFrom"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
    add(dateFrom);
    DateFormGroup dateTo = new DateFormGroup(ID_DATE_TO, new PropertyModel<XMLGregorianCalendar>(getModel(), AuditReportDto.F_TO_GREG), createStringResource("AuditPopupPanel.dateTo"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
    add(dateTo);
}
Also used : TextFormGroup(com.evolveum.midpoint.web.component.form.TextFormGroup) IModel(org.apache.wicket.model.IModel) DropDownFormGroup(com.evolveum.midpoint.web.component.form.DropDownFormGroup) AuditEventType(com.evolveum.midpoint.audit.api.AuditEventType) ExportType(com.evolveum.midpoint.xml.ns._public.common.common_3.ExportType) XMLGregorianCalendar(javax.xml.datatype.XMLGregorianCalendar) DateFormGroup(com.evolveum.midpoint.web.component.form.DateFormGroup)

Example 2 with DateFormGroup

use of com.evolveum.midpoint.web.component.form.DateFormGroup in project midpoint by Evolveum.

the class UserReportConfigPanel method initLayout.

private void initLayout(final Component component) {
    TextFormGroup name = new TextFormGroup(ID_NAME, new PropertyModel<String>(getModel(), UserReportDto.F_NAME), createStringResource("ObjectType.name"), ID_LABEL_SIZE, ID_INPUT_SIZE, true);
    add(name);
    TextFormGroup description = new TextFormGroup(ID_DESCRIPTION, new PropertyModel<String>(getModel(), UserReportDto.F_DESCRIPTION), createStringResource("ObjectType.description"), ID_LABEL_SIZE, ID_INPUT_SIZE, true);
    add(description);
    IModel choices = WebComponentUtil.createReadonlyModelFromEnum(ExportType.class);
    IChoiceRenderer renderer = new EnumChoiceRenderer();
    DropDownFormGroup exportType = new DropDownFormGroup(ID_EXPORT_TYPE, new PropertyModel<ExportType>(getModel(), UserReportDto.F_EXPORT_TYPE), choices, renderer, createStringResource("UserReportConfigPanel.exportFileType"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
    add(exportType);
    DateFormGroup dateFrom = new DateFormGroup(ID_DATE_FROM, new PropertyModel<XMLGregorianCalendar>(getModel(), UserReportDto.F_FROM_GREG), createStringResource("UserReportConfigPanel.dateFrom"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
    add(dateFrom);
    DateFormGroup dateTo = new DateFormGroup(ID_DATE_TO, new PropertyModel<XMLGregorianCalendar>(getModel(), UserReportDto.F_TO_GREG), createStringResource("UserReportConfigPanel.dateTo"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
    add(dateTo);
}
Also used : IChoiceRenderer(org.apache.wicket.markup.html.form.IChoiceRenderer) XMLGregorianCalendar(javax.xml.datatype.XMLGregorianCalendar) TextFormGroup(com.evolveum.midpoint.web.component.form.TextFormGroup) IModel(org.apache.wicket.model.IModel) DropDownFormGroup(com.evolveum.midpoint.web.component.form.DropDownFormGroup) EnumChoiceRenderer(org.apache.wicket.markup.html.form.EnumChoiceRenderer) ExportType(com.evolveum.midpoint.xml.ns._public.common.common_3.ExportType) DateFormGroup(com.evolveum.midpoint.web.component.form.DateFormGroup)

Aggregations

DateFormGroup (com.evolveum.midpoint.web.component.form.DateFormGroup)2 DropDownFormGroup (com.evolveum.midpoint.web.component.form.DropDownFormGroup)2 TextFormGroup (com.evolveum.midpoint.web.component.form.TextFormGroup)2 ExportType (com.evolveum.midpoint.xml.ns._public.common.common_3.ExportType)2 XMLGregorianCalendar (javax.xml.datatype.XMLGregorianCalendar)2 IModel (org.apache.wicket.model.IModel)2 AuditEventType (com.evolveum.midpoint.audit.api.AuditEventType)1 EnumChoiceRenderer (org.apache.wicket.markup.html.form.EnumChoiceRenderer)1 IChoiceRenderer (org.apache.wicket.markup.html.form.IChoiceRenderer)1