I have already created forms in JSF several times, but I do not understand why% of% of this value
is not being set.
<h:form>
<h:selectOneMenu id="nova-matriz-select"
value="#{historicoMatrizMatriculaBean.novaMatrizCurricular}"
required="true"
styleClass="uniformselect">
<f:selectItem itemLabel="-- Selecione --" noSelectionOption="true" />
<f:selectItems value="#{historicoMatrizMatriculaBean.matrizesCurriculares}"
var="mc" itemValue="#{mc}" itemLabel="#{mc.opcaoCurricular.complementoSigla} - #{mc.nome}" />
</h:selectOneMenu>
<h:commandButton id="salvar-btn"
action="list.xhtml?faces-redirect=true"
actionListener="#{historicoMatrizMatriculaBean.salvarAlteracao()}"
value="Salvar"
styleClass="stdbtn btn_orange submitbtn" />
</h:form>
Can anyone see the problem here?
NOTE: The getters / setters of the selectOneMenu
attribute have been created.
EDITED
@Named
@ConversationScoped
public class HistoricoMatrizMatriculaBean {
private MatrizCurricular novaMatrizCurricular;
private List<MatrizCurricular> matrizesCurriculares;
public void init() {
this.matrizesCurriculares = service.obterMatrizes();
}
public List<MatrizCurricular> getMatrizesCurriculares() {
return matrizesCurriculares;
}
public void setMatrizesCurriculares(List<MatrizCurricular> matrizesCurriculares) {
this.matrizesCurriculares = matrizesCurriculares;
}
public MatrizCurricular getNovaMatrizCurricular() {
return novaMatrizCurricular;
}
public void setNovaMatrizCurricular(MatrizCurricular novaMatrizCurricular) {
this.novaMatrizCurricular = novaMatrizCurricular;
}
}