05-26-2014 06:41 PM
<property name="my:fromDate">
<title>From Date</title>
<type>d:date</type>
<mandatory enforced="true">true</mandatory>
<constraints>
<constraint name="my:minMaxDateConstraint" type="my.package.constraints.DateMinMaxConstraint">
<parameter name="minDate">
<value>2014-01-01</value>
</parameter>
<parameter name="maxDate">
<value>2014-01-01</value>
</parameter>
</constraint>
</constraints>
</property>
llegalStateException: Cannot convert value of type [java.lang.String] to required type [java.util.Date] for property 'minDate': no matching editors or conversion strategy found
public class DateMinMaxConstraint extends AbstractConstraint {
private Date minDate;
private Date maxDate;
public Date getMinDate() {
return this.minDate;
}
public void setMinDate(Date minDate) {
this.minDate = minDate;
}
public Date getMaxDate() {
return this.maxDate;
}
public void setMaxDate(Date maxDate) {
this.maxDate = maxDate;
}
@Override
public Map<String, Object> getParameters() {
Map<String, Object> params = new HashMap<String, Object>(2);
params.put("minDate", this.minDate);
params.put("maxDate", this.maxDate);
return params;
}
@Override
protected void evaluateSingleValue(Object val) {
// TODO this is just to be able to set a break point for the moment
@SuppressWarnings("unused")
int i = 0;
i++;
}
}
05-26-2014 06:58 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.