2 Replies Latest reply on Jun 23, 2009 9:55 AM by fil78

    Adding a4j:support programmatically

      Hi there,
      I faced with a problem.. I am trying to add a4j:support to HtmlSelectOneListbox this way:

       private HtmlAjaxSupport addAjaxSupport(FacesContext context) throws IOException{
       HtmlAjaxSupport ajaxSupport = new HtmlAjaxSupport();
       ajaxSupport.setEvent("onclick");
       ajaxSupport.setId("ajaxSupport");
      
      // ExpressionFactory factory = context.getApplication().getExpressionFactory();
      // MethodExpression methodExpression = factory.createMethodExpression(context.getELContext(), "#{" + getListListener() + "}", null, new Class<?>[0]);
      // ActionListener listener = null;
      
       ajaxSupport.addActionListener(getListOrgListener());
       ajaxSupport.setReRender(LIST_BOX);
       ajaxSupport.setEventsQueue(eventsQueue);
       ajaxSupport.setImmediate(true);
       return ajaxSupport;
       }
      

      and
      listBox.getFacets().put("ajaxSupport", addAjaxSupport(context));
      

      and I am expecting that after every click on the listbox row processAction(ActionEvent event) method is invoked. I have A4J.AJAX.Submit generated indeed but it does not invoke this method. Could you tell me am I miss something?
      Thanx.