传递给函数问题的JSF值

传递给函数问题的JSF值,jsf,Jsf,由于某些原因,我的函数在提交时没有被调用。有人能给我指一下正确的方向吗?我有能手和二传手。 我尝试了多种方法,但仍然没有成功 所以在后端,我有。 公共int prdcTypeSelection=00 public int getPrdcTypeSelection() { return prdcTypeSelection; } public void setPrdcTypeSelection(int prdcTypeSelection) {

由于某些原因,我的函数在提交时没有被调用。有人能给我指一下正确的方向吗?我有能手和二传手。 我尝试了多种方法,但仍然没有成功

所以在后端,我有。 公共int prdcTypeSelection=00

    public int getPrdcTypeSelection() {
        return prdcTypeSelection;
    }
    public void setPrdcTypeSelection(int prdcTypeSelection) {
        this.prdcTypeSelection = prdcTypeSelection;
    }

    public void effDateValueChange() {
                LOGGER.info("calling effDtChangeListenerMass");
                System.out.println("PrdTypeSelection"+getPrdcTypeSelection());

            }     

Front end

<ace:dialog widgetVar="effectDatePopup"
                width="455" height="180"
                header="Effective Date Popup"
                draggable="false"
                modal="true"
                closable="true"> 

                  <h:form id="efForm">
                        <h:outputText value="Effective Date Popup TEXT "
                              styleClass="blBlkText" />

                            <h:outputText value="#{paDefAdministrativeDataTableViewBean.paDefAdministrative.defaultEffDate}" style="width:55px;display:block;">
                            <f:convertDateTime pattern="MM/dd/yyyy"/>
                            </h:outputText>







                                            <h:outputText value="Product Type "/>
                                            <h:selectOneMenu value="#{paDefAdministrativeDataTableViewBean.prdcTypeSelection}">
                                            <f:selectItem itemValue="00" itemLabel="All" />
                                            <f:selectItem itemValue="03" itemLabel="03" />
                                            <f:selectItem itemValue="04" itemLabel="04" />
                                            <f:selectItem itemValue="07" itemLabel="07" />
                                            </h:selectOneMenu>




                                         <h:panelGrid style="margin-left: auto; margin-right: auto; text-align: left;" width="100">
                                         <h:commandButton id="submit" action="#{paDefAdministrativeDataTableViewBean.effDateValueChange}" value="Submit"/>
                                         </h:panelGrid>





                                       <h:panelGrid width="100%" style="text-align: right; top:20px;"> <h:commandButton value="Cancel" onclick="effectDatePopup.hide();"/>      </h:panelGrid>

                            </h:form>
        </ace:dialog>   
public int getPrdcTypeSelection(){
返回prdcTypeSelection;
}
public void setPrdcTypeSelection(int-prdcTypeSelection){
this.prdcTypeSelection=prdcTypeSelection;
}
public void effDateValueChange(){
LOGGER.info(“调用effDtChangeListenerMass”);
System.out.println(“PrdTypeSelection”+GetPrdTypeSelection());
}     
前端

您的itemValue字段00、03、05等为字符串,请将prdcTypeSelection变量更改为字符串或从itemValue字段中删除前零。如果问题仍然存在,请将
添加到selectOneMenu组件