cancel
Showing results for 
Search instead for 
Did you mean: 

Disable framework message: String * not in the set of allowed values

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

chander_kararia4
Contributor
0 Kudos

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.

Former Member
0 Kudos

Chander

The user puts in 8 and hits Enter.

OnEnter the app. fetches the search help. Nice.

If he selects a value from the list everything is ok.

But if he wants to start searching for a new list by entering 9 and hitting

Enter, the system throws an exception.

Hope it is clear.

thanks

Yuval

chander_kararia4
Contributor
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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