Potrzebuję wykonać żądanie ajax po kliknięciu "enter" w polu inputText, bez odświeżania strony. To mój kod:JSF 2.0: żądanie ajax po naciśnięciu ENTER
<h:form id="form-test">
<p:growl id="messages" showDetail="true"/>
<p:inputText id="inputEnter"
onkeypress="if (event.keyCode == 13) {onchange(); return false; }"
value="#{bean.content}">
<f:ajax event="change" listener="#{bean.save}" update="messages"/>
</p:inputText>
</h:form>
A w fasoli Mam proste metody:
public void save(AjaxBehaviorEvent event){
...
}
Wszystkie prace, ale odświeżyć stronę !!! Czemu ? Jak mogę to rozwiązać?
Ten sam problem. Przeładowanie strony !!!! – enfix
rozwiązał mój problem. Musiałem usunąć zdarzenie z filtru dataTable na "enter clic". to jest mój kod 'onkeydown =" PF ('organicGroupsTable'). filter(); return! (event.which === 13 || event.keyCode === 13); "' Dziękujemy! – Uness