How to disable Richfaces nothingValue overwriting inputText when no
results returned?
Recently I started using RichFaces to build suggestionBoxes to help speed
the filling out forms when typing. I've included a chunk of the code being
used.
<rich:suggestionbox
id="Suggestion" zindex="2000" for="chosenField"
suggestionAction="#{MyClass.getSuggestions}"
var="chosenlist" fetchValue="#{MyClass.chosen}"
nothingLabel="No match found!!!" width="250"
shadowDepth="0" ignoreDupResponses="true" usingSuggestObjects="true">
</rich:suggestionbox>
I got the suggestionBox to work, but their is currently a special choice
that is valid for the user that doesn't return suggestions. This is typing
a range of numbers [#-#] instead of a single number in the suggestionBox
Since there are no results, this causes the nothinghValue attribute to
appear in the suggestionBox. My problem is that if I press "Enter", the
special choice is overwritten with the nothingValue even though it is
still a valid option. This however doesn't occur when I lose focus from
the suggestionBox, click on the button that submits the entire form, or
fill out the box again and press "Enter".
Is there anyway to consistently use the nothingValue on all submissions of
the "Enter Key" or to have it display in the SuggestionBox, but not
override the textBox?
No comments:
Post a Comment