glassfish v3验证错误:值无效

时间:2014-02-13 19:25:38

标签: jsf tomcat jsf-2 primefaces

我在jsf2.1和primefaces 3.5上开发应用程序,我已将我的应用程序从tomcat-7.0.39切换到glassfish-3.1.2.2-web 它在tomcat上运行正常但在GF v3中我有错误 baaaffId_tabview:appropriateId_form:formationAppropriateId_select: Validation Error: Value is not valid我在很多博客n论坛上看过这个问题,但是没有人理解答案可以清楚吗?

这是我的代码:

<p:tabView id="baaaffId_tabview" style="width:100%;">
<p:tab title="Appropriate Budget" id="appropriateId_tab">
<h:form id="appropriateId_form">
<h:selectOneMenu id="formationAppropriateId_select" value="{generalInformationAction.budgetFormationsBean.budgetFormationIdBean}" required="true"
requiredMessage="Select any formation">
<f:selectItem itemLabel="formation" itemValue="" />
<f:selectItems value="#{generalInformationAction.budgetFormationsBean.budgetFormationMapBean}" />
<f:ajax event="change" render=":#{p:component('appropriateId_datatable')}" listener="#{budgetAppropriateOrAdditionalFormationWiseAction.getFormationBudgetForAppropriate}" />
</h:selectOneMenu>
/// closing tags

BudgetAppropriateOrAdditionalFormationWiseAction

@ManagedBean
@RequestScoped
public class BudgetAppropriateOrAdditionalFormationWiseAction implements Serializable {

@ManagedProperty(value = "#{budgetFormationsBean}")
    private BudgetFormationsBean budgetFormationsBean;

}

我使用viewScoped

检查了上述课程

BudgetFormationsBean

@ManagedBean(name="budgetFormationsBean")
@ViewScoped
public class BudgetFormationsBean implements Serializable {
// some other beans
private Map<String , Integer> budgetFormationMapBean = new LinkedHashMap<String, Integer>();
//setter and getter
}

我再次在tomcat上运行此应用程序,对我来说工作正常

0 个答案:

没有答案