on 04-22-2009 1:26 PM
I have three input fields which are mapped to context attributes of type decimal.
now if you are trying to enter alphabetic characters and fire any event to navigae to other screen web dynpro automatically gives a message saying "Enter the value in -2317.45 format" and navigation is cancelled.
Now we can make the action non validating and to stop web dynpro from giving these error messages.
we need to reset the fields.so i am writing the code for same in the eventhandler just before firing the navigation plug of the action.But the problem is that it is not clearing the all the fields instead it is clearing the first field means it is resetting the first attributes leaving others as it is.
can anybody help?
Sarbjeet Singh
Edited by: sarbjeet singh on Apr 22, 2009 3:05 PM
HI,
But the problem is that it is not clearing the all the fields instead it is clearing the first field means it is resetting the first attributes leaving others as it is.
Are u sure that u are clearing all the attributes ?
if the Attributes belongs to a node, please make sure u are clearing the values for all the fields ?
i believe, u are getting the currrently selected element and clearing the values..that might be the reason.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sarbjeet,
The problem you are facing is due to the fact that when you access the context the screen input is automatically traversed into the context and validated as otherwise there would be no current values in it. If during this traversal errors occur these errors will be shown because the values can't be moved into the context.
Maybe invalidating the node is an option for you.
wdContext.nodeTest().invalidate();
It won't give the errors and does reset the data. But you will lose all your input. You can't differentiate correct values from wrong values.
I guess there are more elegant ways to do this, but it works.
J
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
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.