0 Replies Latest reply on Jul 31, 2008 6:06 AM by Edwin van der Elst

    Adding a4jsupport to all children

    Edwin van der Elst Newbie


      I am trying to create a component to add a onchange listener (a4jsupport) to all UIInput components on a page.
      This is comparable to the 'validateAll' tag in Seam.
      Like this:

       <t:supportAll event='onchange' action="#{myBean.action}">
       <h:inputText ....>
       <h:inputText ....>

      I tried subclassing HtmlAjaxSupport, but this stops the children from rendering.

      In my component, I add a HtmlAjaxSupport element to all subclasses of UIInput:
       HtmlAjaxSupport support = new HtmlAjaxSupport();
       for (ActionListener l : this.actionListeners) {
       c.getFacets().put("a4jsupport", support);

      I see the onChange in the HTML in the browser, but I never get an event on the server....

      Which component should I subclass for this? (I only want to add a4jsupport, not render any output for the component itself)
      Is it correct to add the HtmlAjaxSupport from the 'encodeChildren' method, or do I need to do this at some other time?