1
I am trying to register a Neighborhood based in the City and the selected state.
The list of the city depends on the state selected.
Follows my code:
<div class="form-group">
<h:selectOneMenu id="selectCidade" class="form-control mr-3" value="#{bairroBean.cidade}" rendered="true" >
<f:selectItem itemValue="" itemLabel="Cidade" />
<f:selectItems value="#{bairroBean.cidades}" var="c" itemLabel="#{c.nome}" itemValue="#{c.id}" />
</h:selectOneMenu>
</div>
<div class="form-group">
<h:outputLabel for="nome" value="Nome" />
<h:inputText type="text" class="form-control"
placeholder="Digite o nome da cidade"
value="#{cidadeBean.cidade.nome}" />
</div>
I don’t know how to do this using JSF.
I don’t know what’s going on... this change service isn’t getting into the method at all...
– Thiago Cunha
public void processCities() { System.out.println("onChangeEstad() -------------"); System.out.println(status); this.cities = this.cityService.busca; }
– Thiago Cunha
See if my change takes effect for you. Remembering that the onChange bean should be where the list of cities is...
– Felipe Avelar
It... didn’t work.... unfortunately... wants me to update posting more code?
– Thiago Cunha
Boy... I got it here... I had to make an American...
– Thiago Cunha