SelectOneMenu valuchangeListener event.getNewValue()始终返回null

时间:2016-02-15 09:59:27

标签: jsf primefaces selectonemenu valuechangelistener

我有selectOneMenu的valuechangelistener但是event.getNewValue()总是返回null

                   <p:selectOneMenu value="#{localeBean.selectedLocale}"
                    converter="locale" onchange="submit();" effect="fade" var="loc"
                    filterMatchMode="startsWith" styleClass="flagDisplay" valueChangeListener="#{localeBean.selectedLocaleValue}"
                    >        
                    <f:selectItems value="#{localeBean.locales}" var="locale"
                        itemLabel="#{locale.name}" itemValue="#{locale}" />

                    <p:column>
                        <p:graphicImage value="/resources/images/#{loc.photo}">   <h:outputText value="#{loc.name}" styleClass="welcome" style="margin:0px!important;padding:1px;"/></p:graphicImage>

                    </p:column>
                </p:selectOneMenu>

 public void selectedLocaleValue(ValueChangeEvent event) {
    System.out.println("selectedLocale inside action method "+event.getNewValue());
 ....}

0 个答案:

没有答案