[2.x-java] Date formatters

26 views
Skip to first unread message

Niklas Nylund

unread,
Nov 15, 2012, 2:20:56 PM11/15/12
to play-fr...@googlegroups.com
I am trying to get bindFromRequest() to work with a request that includes a Date object. If I send the this type of date string, 
Wed, 14 Nov 2012 22:00:00 GMT, to an action I always get a validation error. My form class looks like this:

public class foo {
   @Formats.DateTime(pattern="ddd, dd MMM yyyy HH':'mm':'ss 'GMT'")
   public Date end;
}

Any ideas why this isn't working?


Niklas

Niklas Nylund

unread,
Nov 16, 2012, 4:29:59 AM11/16/12
to play-fr...@googlegroups.com
I can't get this to work so currently I have to fallback to passing an array and parsing the string myself. This is imho a clear step back from the 1.x style where it just worked.


Niklas
Reply all
Reply to author
Forward
0 new messages