Hi,
I have an input field which mapped to a context attribute of type Time. When I try to enter any value during runtime I have a small message in the bottom of my webpage ( Error during parse, please give a value in form 10:11:12 AM ). After that I should enter a good value otherwise I cannot do any other action.
Thanks,
Younes
So, what is the problem???
This is behavior by design -- to validate input.
If you don't like such validation bind your input to String attribute. Or, you can surround original Time attribute with calculated String attribute (with setter/getter) and parse / format data on your own. Or you can set non-validating flag for certain action and perform validation on your own in this action handler.
VS
Hallo Younes,
that's the purpose of implicit validation based on the dictionary type definition.
By default the format of the built-in type 'time' is "<b>hh:mm:ss a</b>" but you can easily change this format by defining your own simple data type. Name this local dictionary type <i>MyTime</i>, select the built-in type 'time' and then specifiy its <i>format</i> (tab 'Representation') via "<b>hh:mm</b>". In this case the generic validation will accept '12:10' as input field value.
For more details look at http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
Greetings, Bertram
Hi,
I am sorry I didnot explain my problem very well. When I try to enter a Time I can only enter "hh:mm:ss" (8 characters) and the webpage asks me to enter "hh:mm:ss AM" (11 Characters). I concluded that the inputfield for the Time is too short. I changed length attribute of this Time inputfield but it doesnot change anything. How can I make It work?
regards,
Younes
Hi,
Thanks a lot, I managed to make it work.
Younes
Add a comment