当我使用value="#{wizard.filial.numFilial}".
时,向导不会进入下一个标签但是,当我使用value="#{wizard.intFilial}".
时,它可以正常工作吗?
<!--XHTML-->
<h:selectOneMenu id="fieldFilial" title="Filial" value="#{wizard.filial.numFilial}" required="true" label="Filial*" >
<f:selectItem itemLabel="Selecione" />
<f:selectItems value="#{commons.filiais}" var="cfilial"
itemValue="#{cfilial.numFilial}" itemLabel="#{cfilial.descricao} "/>
</h:selectOneMenu>
Wizard.java
@ManagedBean
@SessionScoped
public class Wizard{
private Filial filial;
private int intFilial;
<GETTERS/SETTERS>
}
**Commons.java**
@ManagedBean
@SessionScoped
public class Commons{
private List<Filial> filiais;
<GETTERS/SETTERS>
}
<!--FILIAL-->
public class Filial implements Comparable<Filial>, Serializable {
private int numFilial;
private String descricao;
<GETTERS/SETTERS>
答案 0 :(得分:0)
您需要实例化filial对象,因为您需要一个包含numFilial的Filial type Object实例。
尝试
private Filial filial = new Filial();