0 Replies Latest reply on Sep 16, 2009 5:45 AM by JLuis -

    How to bound ajaxListener tag with the ajaxListener method

    JLuis - Newbie

      I don't understand why this <a4j:ajaxListener> example doesn't work:

       <f:facet name="header">Using a4j:actionListener</f:facet>
       <a4j:commandButton value="Submit" reRender="#{ajaxBean.areas}">
       <a4j:ajaxListener type="echo.AjaxBean"/>
       <h:outputText id="id1" value="id1"/>
       <h:outputText id="id2" value="id2"/>

      package echo;
      import java.util.HashSet;
      import java.util.Set;
      import org.ajax4jsf.event.AjaxEvent;
      public class AjaxBean implements org.ajax4jsf.event.AjaxListener{
       private Set<String> areas = new HashSet<String>();
       public Set<String> getAreas() {
       return areas;
       public void setAreas(Set<String> areas) {
       this.areas = areas;
       public void processAjax(AjaxEvent event) {
       System.out.println("Update IDs of components to be rerendered");

      I will thank any suggestion...