0 Replies Latest reply on Nov 28, 2012 12:13 PM by Warley Mendes

    How can I create the <a4j:ajax event="change" /> in the bean?

    Warley Mendes Newbie

      Hi, I need to create this code in my bean:

       

      <rich:calendar value="#{toolbarBean.data}" datePattern="dd/MM/yyyy" valueChangeListener="#{toolbarBean.selecionarData}">

           <a4j:ajax event="change" />

      </rich:calendar>

       

      But I don't know how can I create the <a4j:ajax event="change" /> and put it inside de component calendar:

       

      That is my code:

       

      UICalendar calendar = (UICalendar)ctx.getApplication()

          .createComponent(ctx, UICalendar.COMPONENT_TYPE,

          "org.richfaces.CalendarRenderer");

             

      calendar.setId("c");       

      calendar.setDatePattern("dd/MM/yyyy");

      calendar.setValueExpression("value",  newValueExpression(ctx, "#{toolbarBean.data}", Date.class));       

      calendar.setValueExpression("valueChangeListener", newValueExpression(ctx, "#{toolbarBean.selecionarData}", String.class));

       

      //HERE I NEED TO CREATE THE A4J:AJAX EVENT

       

      Anyone can help me?

      Thanks