primefaces jsf p:ajax event keyup ignore arrow keys -
i have inputtext field has validate button next it. when click validate button backend validation , greenish check mark appears next button. want greenish check mark disappear when value changes, , right away not when losing focus because there test button on page disable/enable when valid. event="blur" or even="change" won't work cause can click button when input text field has changed. used keyup , works great, arrow keys , tab etc... trigger event , dont want them to.
<h:inputtext id="baseurl" style="width:425px;" value="#{view.baseurl}"> <p:ajax event="keyup" update="validicon :addeditcatalogform:testurlbutton" listener="#{view.resetvalidation()}"/> </h:inputtext> i see jquery options this, need 1 works jsf , primefaces tags.
from i've seen here : http://forum.primefaces.org/viewtopic.php?f=3&t=24788
the solution close :
<h:inputtext id="baseurl" style="width:425px;" value="#{view.baseurl}" onkeyup="if (event.keycode != ####_your_keys_####) homecoming false;"> <p:ajax event="keyup" execute="@this keycode" update="validicon :addeditcatalogform:testurlbutton" listener="#{view.resetvalidation()}"/> </h:inputtext> ajax jsf primefaces keyup
No comments:
Post a Comment