0 Replies Latest reply on Oct 2, 2008 5:49 PM by Stefan Huber

    Getting Coordinates from mediaOutput

    Stefan Huber Newbie

      Hi!

      What we're trying to achieve is delivering an image to the user where he can click into a region. The server should then determine which region that is and redelliver the image with the region replaced from a reference image.

      So far, I failed with two approaches.
      First, I used a commandButton. This worked with respect to recognizing the coordinates where the user clicked but failed in properly drawing an image that is created on-the-fly by the backend.

      We're now trying mediaOutput but we fail to get the coordinates of the mouse click. It would be nice to simply be able to use
      <a4j:mediaOutput id="image" createContent="#{a4j.paint}" ....>
      <a4j:support event="onclick" actionListener="#{a4j.clickety}" reRender="image"/>
      </a4j:mediaOutput>

      But the action listener is never called.

      I've read http://jboss.com/index.html?module=bb&op=viewtopic&t=141998 and get the idea of adding a timestamp to the URL to have the client rerender the page. But as the action listener isn't called at all, that approach fails anyway.

      Does anyone have approaches for this issue? I can post more (real) source code, if needed. (But I have to remove a lot of debug code first)

      Thanks in advance,
      Stefan