on 01-10-2009 5:08 PM
Dear All,
I have input filed UI in a view with context attribute bided to this UI element of type simple Date.
now if i execute WD application, i can pickup some date from calender.
instead of picking up from date picker, if i enter some values in input field
say 123, xyz and intially i will pickup date from date picker say 10/01/2009 now i will delete either date or month or year only then press button.
this time i will get an error enter the value in the format 11/25/1987.
although this message is not hardcoded in my code and also this message is not there in the message pool.
i feel this is generic message from WebDynpro frmae work.
How can overcome this message, is there any code to validate above scenario
Thanks in Advance
Murali
Hi,
You are getting the error message when you are manually entering the date because you have chosen the context attribute type of date. To solve your problem what you can do is chose the attribute type of string and then put your own validation while getting the date from the user.
You can also check the following link for the usage of different ui elements where calendar is one:
It may help you/
Regards.
Rajat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try a work around to change the format of date as below
SimpleDateFormat g_objDateFormat = new SimpleDateFormat("MMMM dd, yyyy");
wdContext.currentContextElement().setAbc(g_objDateFormat.format(dt));
or else first take the input in Context Attribute of type String and later on convert it into Date.
Regards
Raghu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Murali,
You can define your own messages in the message pool and show them based on the validation done on the input field. You can use the Web Dynpro Message Manager API for the same (there are reportSuccess, reportError, etc methods available on it).
Kind Regards,
Nitin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Murli,
After deleting either months or data you are getting the error mrssage because if you are using context of type date then it is intrnally validated for the date format 11/25/1987.
So it will automatically give the error and one cannot change this if one has used date type context.
Work Around could be like you can disabled the input field after selecting the date from it so that user cannot modify or change the date manuaaly.
if you want more info on it. i can help you.
Regards
Narendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.