2 Replies Latest reply on Mar 16, 2013 6:22 AM by Tommaso Giachi

    Weird problem with  <h:selectOneListbox> valueChangeListener and a4j:ajax

    Tommaso Giachi Newbie

      Hello to all!

      I'm using richfaces 4.3.0 final and I have a weird problem!

      This is my page:

       

      <h:form id="frmDlgViewTicket" prependId="false">
                          <rich:popupPanel id="dlgViewTicket" autosized="false" modal="true" height="600" width="800" >
      
      
                                    <f:facet name="header">
                                              <h:outputText
                                                        value="Visualizza ticket #${visualizzaTicketBean.selectedTicket.ticketUID}" />
                                    </f:facet>
                                    <f:facet name="controls">
                                              <h:outputLink value="#"
                                                        onclick="#{rich:component('dlgViewTicket')}.hide(); return false;">
                                                        <h:graphicImage value="/resources/img/ic_close.png" />
                                              </h:outputLink>
                                    </f:facet>
        
        
                    <h:selectOneListbox  id="cmCambiaStato" value="#{visualizzaTicketBean.newTicketState}"
                    valueChangeListener="#{visualizzaTicketBean.onCambioStatoTicket}"
                    >
                    
                              <f:selectItems value="#{visualizzaTicketBean.lstStatoStr}" />
                     <a4j:ajax event="valueChange" render="frmDlgViewTicket" execute="@this" />
                   
                    
                    
         
                    </h:selectOneListbox>
      

       

      This is my valueChangeListener

       

      public void onCambioStatoTicket(ValueChangeEvent event) 
                {
                     log(Level.INFO, "%s => %s", event.getOldValue(), event.getNewValue());
        
                }
      

       

      But when i click on my selectOneListBox with my valueChangeListener the result is NULL?

       

      19:24:06,229 INFO  [it.sistemisnc.sphera.web.beans.VisualizzaTicketBean] APERTO => null

       

       

      Can someone help me?

      Is bug?