on 02-18-2009 12:18 PM
Hi
I have an input field to which I attach search help.
This search help is built dynamically once the user enters a number in the
input text box. If the user enters a number which is not in the set of values in the search help,
web dynpro framework throws an exception:
Character String * does not exist in the set of allowed values
and marks the input text box in red.
My question:
- how can I clean the message from the MessageArea?
- Is it possible to intercept this message?
- how do I prevent the system from marking my input text box red?
Anyway my method is of type non-validating so the application flow is not obstructed by this
system message.
Thank you
yuval peery
Hi,
From your post I understand that, You have an input field only. If the user enters the numeric entry (Q: is there any action, like Button click or Enter button Press ?) it generates the Help dynamically.
So, in that case, why do not you restrict the unwanted numbers?
What I mean is, Suppose I enter the 8 which is not there in the help, so everytime a user enters the number, that number must be validated & then the Help should be called on the basis of entry made.
Regards
Chander Kararia
# Please close the thread once get the correct answer. Give rewards for answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yuval,
If you know the specific requirements, then why don't you restrict the user from entering the other values.
You just need to set the check/validation on what the user has entered. Call that validation method on "OnEnter" just before fetching the Help data. If correct value call the Help else invalidate the node & show exception.
That will do. After that you may ask the user to re enter the value by just refreshing the node or you may throw an exception message of your choice.
Regards
Chander Kararia
# Please close the thread once get the correct answer. Give rewards for answers.
Edited by: Chander Kararia on Feb 19, 2009 9:43 AM
Kararia
I do not want to restrict the user from entering anything.
On the contrary. Input field serves as user interface to start a new search.
Suppose you have a very long list of numbers and you want the user to pick one of them.
By telling the user to enter the first digit to cut down your search by approx 80%. Right?
Ok now the user tried 9 and the search help brings 100 numbers starting with 9.
Now the user wants to look for numbers starting with 8.
If he enters 8 the system throws this exception!!!
Regards
yuval
Hi all
The solution for this annoying problem of the framework throwing an exception :
String * not in the set of allowed values
is to put the attribute attached to the search help in a new node.
In your code you must ensure that this node is invalidated:
wdContext.myNode.invalidate();
before you do anything with the new value the user has put in.
I hope this can be of assistance to others.
Yuval peery
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.