Actually I have one input and I want to send the request without page reload (Ajax, probably). My code is bellow, but first I need to say I already see this question and it don't solve my problem.
Following is my code:
<h:form>
<div class="form-group">
<div class="col-md-10">
<h:inputText styleClass="form-control" id="disciplina" value="#{disciplinaMBean.nome}" valueChangeListener="#{disciplinaMBean.atualizarListagemPesquisa}">
<f:ajax event="keyup" render=":meuForm:minhaTabela"/>
</h:inputText>
</div>
<div class="col-md-2">
<h:commandButton value="Adicionar" styleClass="btn btn-md btn-success" action="#{disciplinaMBean.cadastrar}">
<f:ajax event="click" execute="@form" render=":meuForm:minhaTabela"/>
</h:commandButton>
</div>
</div>
</h:form>
The "render" in is to update a dataTable that I have in my page.
So, what I'm doing wrong?
Remembering, I want:
- When user insert a text and click in button, send the form normally.
- But when send the request/form, don't refresh/reload the page.
Thanks!