Hi i am new here , kindly help in the follow issue i am facing for days.
I want to get the Value of selectItem (ItemValue which is an Integer and the Item Label is String) in my backing bean using autocompleteentry tag of icefaces 3.1.0
but i get error:
here is the code:
Bean is :
the cities has itemvalue as a number and itemLabel as String stored in it. I do get autocomplete fine and shows list of matches if i store value in some String property of backing bean but if storing in integer property of bean, gives this error as soon i write something in autocomplete.
INFO: WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
sourceId=frmmaster:j_idt205:txtcity[severity=(ERROR 2), summary=(frmmaster:j_idt205:txtcity: 'a' must be a number consisting of one or more digits.), detail=(frmmaster:j_idt205:txtcity: 'a' must be a number between -2147483648 and 2147483647 Example: 9346)]
I think you are trying to permit people to type in a city name but have it resolve to a numeric city ID. The user typed in "a", and since that's not a number, the validator got annoyed.
SelectItems are value/label pairs, and presumably you want the user to type the label and have JSF set the value. Which can be a problem when you have an incomplete label that doesn't correspond to any value in the selectitem collection.
That's about as much help as I can give, since I'm not familiar with the "ace" tag library, but hopefully it will help.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Sep 17, 2012
Thanks that really made me understand the problem why it would not set the the value in cityID if using SlecetItem list because of incomplete entered value(Label) is not having any item value(Integer) in the list.
but i have done the same thing another way by giving a list of City class objects to this autocomplete tag instead of list of selectItems (following this tutorial icefaces Showcase)but that also didnt work as page page gets blurred out whenever i enter some character or says "internel server error" despite i m getting the correct list in getter of list<Citiy> i am using in tag. Atleast it should show the list in autocomplete even if i dont store anything in backing bean.