on 08-04-2005 1:26 PM
Hello,
I have a standard form with submit button.
Most of the input fields can't be empty on submit.
Is there any way in DynPro to test that these input fields are not empty other than checking each context at the action method handler of the button? I would like that the user will be notified of these fields before submiting the form (Like in Javascript...).
Roy
Hi Roy,.
there is one event handler onEnter with each inputfield, you can use it for the input fields. Whenever you press enter after leaving an InputField this event handler will fire. But that not similar to the JavaScript functionality u are talking about. There is nothing in WD like that functionality.
Regards,
Shubhadip
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
If i am not not wrong ....This property just display "*" mark on the lable associated with the inputfield just to indicate that the inputfield is mandatory.But doesn't do any validations during runtime.
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can do one thing..Manually check them. And use reportContextattributeMessage of MessageManager to report the error for each input field.
And there is a method in the controller called wdDoBeforeNavigation which is executed before each navigation...
Try making use of this.I will think if i can find a way of using this function!
cant think of anythin else!:)
Regards
Bharathwaj
Hi Roy,
Yes, you can do it. For that change the state of the Inputfiled to "Required".
There is one property of Input field element that is, "STATE". You have to set its value as "required".
It will do validation on client side whether field is empty or not.
Regards,
Bhavik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Roy,
Webdynpro by itself does not support Javascipt as the webdynpro meta model has no support to javascript.
But you can acheive client side validation in an alternative way.
There is an inbuilt java class in Webdynpro called as Message manager class. This class has some methods which helps us to find whether a particular UI elemnt say a Input field in empty or not by clicking a button.
Here is the link for the same.This is slove your problem.
http://help.sap.com/saphelp_erp2004/helpdata/en/72/1d6526263ff24995016a152705eab2/frameset.htm
Regards,
Guru
P.S :- Close this thread if you are satisfied with the answer and reward points suitably.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No It will not .
Only way i can see is validating through context.
Regards, Anilkumar
Message was edited by: Anilkumar Vippagunta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
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.