1 Reply Latest reply on Feb 25, 2009 11:05 AM by nbelaevski

    Question about a4j:support

      Hello!

      I'm trying to make this thing: when user make choice from the of the radio buttons, application should fill list of the combobox from database.

      Here is my code:
      [JSP]

       <table width="100%" border="0">
       <tr>
       <td>
       <h:selectOneRadio id="selectFilterType" layout="lineDirection" value="#{projNewsListBacking.filterType}">
       <f:selectItem itemValue="all-news" itemLabel="All news"/>
       <f:selectItem itemValue="my-news" itemLabel="My news"/>
       <f:selectItem itemValue="other-user-news" itemLabel="News by"/>
       <a4j:support event="onselect" reRender="selectUser" action="#{projNewsListBacking.selectFilterAction}"/>
       </h:selectOneRadio>
       </td>
       <td>
       <h:selectOneMenu id="selectUser" value="#{projNewsListBacking.selectedUser}">
       <f:selectItems value="#{projNewsListBacking.usersList}"/>
       </h:selectOneMenu>
       </td>
      


      And here is java code:
       public String selectFilterAction() {
       if (filterType.equals("other-user-news") == true) {
       if (usersList.size() == 0) {
       loadUsersList();
       }
       }
      
       return null;
       }
      


      When user makes choice selectFilterAction method dows not fires. Where is the mistake?

      Thanks