I've tried every keyword possible to search for my problem, so I'm asking a question here. I have the following code on my xhtml page:
<div class="form-group" >
<h:inputText value="#{loader.redmineApiKey}" id="apiKey"
class="form-control" >
<f:ajax event="change" listener="#{loader.testeLoader}" render="projetos" />
</h:inputText>
<h:commandButton class="btn btn-sm btn-primary"
action="#{loader.testeLoader}" value="Carregar Projetos"></h:commandButton>
<h:selectOneMenu value="#{loader.nomeProjetoRedmine}" class="form-control" id="projetos">
<f:selectItems value="#{loader.nomeProjeto}" />
</h:selectOneMenu>
</div>
SO I want to fill the dropdown list after the value of the first inputText. The f:ajax event listener is fired, a post request is created but nothing changes in the values of the dropdown list. I have another button that calls the same method in his action and it works fine. Why it's not working in the ajax call?
Here's the method code in my bean:
public void testeLoader() throws Exception{
RedmineAPI red = new RedmineAPI();
nomeProjeto = red.getProjectName(redmineApiKey);
}
Thanks for any help