4 Replies Latest reply on Dec 28, 2011 1:58 PM by undermanager

    RF4.1 rich:select and valueChangeListener issue

    undermanager Newbie

      I have the following component inside <h:form>...</h:form> in a JSF page:


      <rich:select defaultLabel="Please select a value"


                   valueChangeListener="#{itemsBean.valueChanged}" >

        <f:selectItems value="#{itemsBean.items}" />

        <a4j:ajax event="change" render="target" execute="@this" />



      The related bean contains a method with the following signature:


      public void valueChanged(ValueChangeEvent event)


      The method uses event.getNewValue() to identify and process the selected item.  The separate "target" component displays the selected item - just to show the Ajax nature of the page update.


      I'm seeing two issues:


      1) My IDE (NetBeans 7) is complaining about "itemsBean.valueChanged" in the JSF page.  It throws a warning stating "Unknown property: 'valueChanged'".


      2) If I ignore the above warning and run the code, then there is no Ajax request sent to the server when I use the <rich:select> object in the web page.  However, as soon as I take another action - such as clicking anywhere else on the page - then the Ajax event is sent to the server, and the page behaves as expected.  (I used "<a4j:log/>" to verify this).


      I have seen other people mentioning apparently similar issues - so this may be a duplicate.


      Are either of these known issues?


      Am I doing something obviously wrong?


      Thanks in advance.


      Also, in case it helps:


      I get the same NetBeans warning as in (1) above if I use "valueChangeListener" in <h:selectOneMenu>.


      I am using:


      NetBeans 7

      Mojarra 2.1.3

      Glassfish 3.1

      RichFaces 4.1-Final

      FireFox 9