on 09-12-2007 8:43 AM
recently i was doing a tutorial on <b>A Simple Input Form</b> on page 25
there is a declared method for initialize i have problem with the code at this line
<u><b>wdContext.currentContextElement().setBirthday(new Date(0));</b></u>
as the error message is show as below
<b>The method setBirthday(String) in the type IPrivateForm.IContextElement is not applicable for the arguments (Date)</b>
wonder did any encounter the same problem and can help me up. as i saw in my IPrivateForm for the method for my setBirthday is as below
<b>public void setBirthday(java.lang.String value) {
this._birthday = value;
changed(2);
}</b>
or anyone that has do this Tutorials which is found on here
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/a%20simple%20input%20form%20with%20message%20and%20error%20service%20support.pdf">A Simple Input Form Tutorials</a>
Hi,
The context attribute that you have defined is of type string and not date. If you want to set Date to that field than change its type to data.
Change the type of the context attribute BirthDay to date
Regards,
Murtuza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jia Jun Ng,
Please check type of context attribute Birthday. If it is of type String, you can change the code to
wdContext.currentContextElement().setBirthday(new Date(0)+"");
OR
change the type of value attribute to Date.
Regards,
Ganga.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jia,
Try
wdContext.currentContextElement().setBirthday(new Date(System.currentTimeMillis())) instead of new Date(0)
Regards,
Smruti
Message was edited by:
Armin Reichert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.