DateTime Input Control


I’'m having the following error:

DateInput component value must be a java.util.Date instance

I’'m binding the value Date Input control to a java Date field.

Any suggestions?

Are you referring to the validation error shown in the Designer? If so that might be a problem with validation code not correctly recognizing your property, if that is the case you may ignore it and proceed with deploying and running your application


Let me give you more detail:

I’m on the job of creating a task portlet using Designer CAF 7.1. As an input and output (Managed Bean) of the task, I have a document which contains 6 attributes (all of them type string) even tough 2 of them represent dates values. When it first loads the page all of the values are empty.

What I did was:

The IS and CAF webservice stacks have some sort of mismatch when it comes to handling dates. Whereas those fields may be typed as dates in IS, they’re probably exposed to CAF as strings. In CAF 7.1.x, you can bind the DateInput control’s value to a string, as long as you also set the DateInput’s “valuePattern” property to a pattern that can be used to parse the string. See “”.

I myself don’t know anything about IS, but here’s a suggestion from one of our SE’s about how to alternately handle this on the IS side:

I handled this by having IS return the date as a String, and I set the namespace on the date as w3c…DateTime. When you create the WSC in Designer it properly recognizes the field as a DateTime, so no other controls are required. You need to make sure that you format the date in IS as YYYY-MM-DDTHH:MM:SS.SSS-ZZZZ.

I have also found that when I recreate a WSC in Designer, that I sometimes need to go to the Navigator view and delete the wsdl before I regenerate/recreate the WSC or else it used the old wsdl. Not sure if this was something I was doing wrong, or Designer.