3 Replies Latest reply on Oct 31, 2007 1:13 PM by Joe Greene

    using a4j:support within h:graphicImage

    Joe Greene Novice

      I'm trying to call a bean action method when a user closes a
      > rich:modalPanel. Here's the markup inside my jsp:
      >
      >
      >

       <f:facet name="controls">
      > <h:graphicImage value="../img/close.png" style="cursor:pointer"
      > onclick="Richfaces.hideModalPanel('myPanel')" >
      > <a4j:support event="onclick" action="#{myBean.cancel}"/>
      > </h:graphicImage>
      > </f:facet>
      


      > The panel closes OK, thanks to the plain old javascript call, but the bean action method does not execute. The problem is that the required a4j:support markup never gets rendered on the page, so of course the action bean method can't get called. Is there a problem using the a4j:support with a h:graphicImage JSF component?

      I also tried wrapping the h:graphicImage inside an a4j:commandLink component, and using the "action" attribute of the a4j:commandLink, but that did not work, either.

      Any ideas will be appreciated. Thanks.