本文整理汇总了Java中org.apache.wicket.extensions.yui.calendar.DateTimeField类的典型用法代码示例。如果您正苦于以下问题:Java DateTimeField类的具体用法?Java DateTimeField怎么用?Java DateTimeField使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DateTimeField类属于org.apache.wicket.extensions.yui.calendar包,在下文中一共展示了DateTimeField类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: validate
import org.apache.wicket.extensions.yui.calendar.DateTimeField; //导入依赖的package包/类
/**
* Validation rule : all 3 fields (date,hours,minutes) must be not-null.
* @param form
*/
@Override
public void validate(final Form form) {
final DateTimeField dateTimeField =
(DateTimeField) dateTimeComponents[0];
if (!(dateTimeField.getDate() != null
&& dateTimeField.getHours() != null
&& dateTimeField.getMinutes() != null)) {
ValidationError ve = new ValidationError();
ve.setVariables(DateTimeFormValidator.this.variablesMap());
ve.addMessageKey(resourceKey());
dateTimeComponents[0].error((IValidationError) ve);
}
}
示例2: OnceJobPanel
import org.apache.wicket.extensions.yui.calendar.DateTimeField; //导入依赖的package包/类
public OnceJobPanel(String id, SchedulerJob schedulerJob) {
super(id, new CompoundPropertyModel<SchedulerJob>(schedulerJob));
add(new Label("runDate", getString("JobPanel.runDate")));
runTime = new DateTimeField("time.runDate") {
protected DateTextField newDateTextField(String s, PropertyModel propertyModel) {
DateTextField dateField = super.newDateTextField(s, propertyModel);
dateField.setLabel(new Model<String>(getString("JobPanel.runDate")));
return dateField;
}
@Override
protected boolean use12HourFormat() {
return false;
}
};
runTime.setRequired(true);
add(runTime);
}
示例3: DateTimeFormValidator
import org.apache.wicket.extensions.yui.calendar.DateTimeField; //导入依赖的package包/类
public DateTimeFormValidator(final DateTimeField dateTimeComponent) {
if (dateTimeComponent == null) {
throw new IllegalArgumentException(
"argument dateTimeComponent cannot be null");
}
dateTimeComponents = new FormComponent[]{dateTimeComponent};
}
示例4: setFormValidator
import org.apache.wicket.extensions.yui.calendar.DateTimeField; //导入依赖的package包/类
public FieldPanel setFormValidator(final Form form) {
if (field == null) {
LOG.error("Error setting form validator");
} else {
form.add(new DateTimeFormValidator(((DateTimeField) field)));
this.form = form;
}
return this;
}
示例5: DateValidator
import org.apache.wicket.extensions.yui.calendar.DateTimeField; //导入依赖的package包/类
public DateValidator(DateTimeField dateFrom, DateTimeField dateTo) {
this.dateFrom = dateFrom;
this.dateTo = dateTo;
}
示例6: setDateFrom
import org.apache.wicket.extensions.yui.calendar.DateTimeField; //导入依赖的package包/类
public void setDateFrom(DateTimeField dateFrom) {
this.dateFrom = dateFrom;
}
示例7: setDateTo
import org.apache.wicket.extensions.yui.calendar.DateTimeField; //导入依赖的package包/类
public void setDateTo(DateTimeField dateTo) {
this.dateTo = dateTo;
}
示例8: StartEndDateValidator
import org.apache.wicket.extensions.yui.calendar.DateTimeField; //导入依赖的package包/类
public StartEndDateValidator(DateTimeField notBefore, DateTimeField notAfter) {
this.notBefore = notBefore;
this.notAfter = notAfter;
}