Board index JavaServer Faces General autocomplete "_hinput" not updated if typed or copy-pasted

autocomplete "_hinput" not updated if typed or copy-pasted

Components, Ajax Framework, Utilities and More.


Posts: 48
primefaces 2.2.1

As far as i know it, an autocomplete has 2 input elements, one with id_input and one with <id>_hinput, where the value <id>_hinput will be used to the converter if we are using POJO.

If i choosed the item from the autocomplete popup list, either by click or up/down arrow keyboard, the <id>_hinput will be updated with the string representation generated by the converter.

But if i type the complete string inside the autocomplete, and if i copy-pasted the whole string inside the autocomplete, the <id>_hinput is not updated with the string representation generated by the converter.

Is there any solution or workaround for this ?


Posts: 15033
Location: Cybertron

How should autocomplete know the hinput value if you don't select the item from the suggestions.
PrimeFaces Lead


Posts: 48
Im not sure also, but i wonder whether this approach below will work ?

1) User typed or pasted the content, and as usual, the ajax calls happen to get the suggestions
2) The suggestion returned from the ajax call have 1 exact result and it matches what's in the <id>_input, which i think is the condition to set the converter-string to <id>_hinput


Posts: 48
Hello ..

Do you guys think this make sense ?

I reason if the user can type, and if it matches the converter string, this should be handled as if it's selected from the selection list.
In the eyes of the user, he's just typing or pasting the same thing that appears on the selection list, and gets confused why it wouldnt work when typed or pasted.

Regards,
Albert Kam


Return to General