-
Notifications
You must be signed in to change notification settings - Fork 188
/
DatePanel.java
39 lines (30 loc) · 1.08 KB
/
DatePanel.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
* Copyright (c) 2010-2013 Evolveum and contributors
*
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/
package com.evolveum.midpoint.web.component.input;
import com.evolveum.midpoint.web.component.DateInput;
import com.evolveum.midpoint.web.component.prism.InputPanel;
import com.evolveum.midpoint.web.model.XmlGregorianCalendarModel;
import org.apache.wicket.markup.html.form.FormComponent;
import org.apache.wicket.model.IModel;
import javax.xml.datatype.XMLGregorianCalendar;
/**
* @author lazyman
*/
public class DatePanel extends InputPanel {
private static final long serialVersionUID = 1L;
private static final String ID_INPUT = "input";
public DatePanel(String id, IModel<XMLGregorianCalendar> model) {
super(id);
DateInput date = new DateInput(ID_INPUT, new XmlGregorianCalendarModel(model));
date.setOutputMarkupId(true);
add(date);
}
@Override
public FormComponent getBaseFormComponent() {
return (FormComponent) get(ID_INPUT);
}
}