What you need to do is to create a simple Java class extending java.util.Date which can handle ISO 8601 date format and specify it instead of standard java.util.Date in the JavaBean mapping file (to find the file you can use mapping file namespace: http://xmlns.oracle.com/adfm/beanmodel).
Here is the sample of simple Java ISODate class:
public class ISODate extends java.util.Date {
public ISODate(String value) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
Date d;
try {
d = sdf.parse(value);
} catch (ParseException e) {
throw new RuntimeException(e);
}
setTime(d.getTime());
}
}
2 comments:
Post a Comment