1 Reply Latest reply on Feb 25, 2009 5:40 AM by nbelaevski

    rich:map and a4j:support

    superstef

      Hi there,

      i have a question because of a problem...

      I have a GMap and wants to "listen" if a double click is executed on the gmap twice, per reRender and in my Javascript.

      A GMarker will be painted on the map by double click, the GReverseGeocoder looks for the address of the marker and writes the found country in a text-field (this happens in Javascript).
      Then I have a mapping-table with all countries and wants to select the country in my selectOneMenu by id... (this should be the Java part).

      <rich:gmap onload="init()"....

      <a4j:support event="onload" reRender="address" />
      <a4j:support event="ondblclick" reRender="country" />
      </rich:gmap>

      <h:selectOneMenu id="country"

      In my Javascript-init() method i have registered a doubleclick "listener" too...
      GEvent.addListener(map, "dblclick", handleClicks);

      The a4j:support onload event will be executed normaly, Javascript as well as the reRender.
      But my dblclick event will only be executed in Javascript and not by <a4j:support.
      Is there any possibility to "catch" my doubleclick event by ajax??
      Could it be that the Javascript listener "catches" the event so that the <a4j:support event won't be executed??

      Thanks for your potential help

        • 1. Re: rich:map and a4j:support
          nbelaevski

           

          "superstef" wrote:
          Could it be that the Javascript listener "catches" the event so that the <a4j:support event won't be executed??


          Yes, it's possible. Search for event.preventDefault()/event.stopPropagation() method invocations.