ICEfaces
  1. ICEfaces
  2. ICE-7099

MyFaces causes the GMap component to trigger a recursive full submit when choosing a location from the select menu.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.1-Beta2, 3.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      ICEfaces 2 MyFaces 2
    • Assignee Priority:
      P1

      Description

      When running the Compat Component Showcase under MyFaces 2, the GMap component triggers recursive "full submit" calls if a city is chosen from the drop down menu.

      Once the item has been chosen and the value changed event has fired, the update returns and is applied. My guess is that the script update that comes back and is evaluated is handled differently by MyFaces and results in another full submit. The candidate area may be here (Ice.GoogleMap.submitEvent):

          locateAddress: function(clientId, address) {
              var gLatLng = function(point) {
                  if (!point) {
                      alert(address + ' not found');
                  } else {
                      var gmapWrapper = Ice.GoogleMap.getGMapWrapper(clientId);
                      if (gmapWrapper) {
                          gmapWrapper.getRealGMap().setCenter(point, 13);
                          var marker = new GMarker(point);
                          gmapWrapper.getRealGMap().addOverlay(marker);
                          marker.openInfoWindowHtml(address);
                          gmapWrapper.geoMarker = marker;
                          gmapWrapper.geoMarkerAddress = address;
                          Ice.GoogleMap.submitEvent(clientId, gmapWrapper.getRealGMap(), "geocoder");
                      } else {
                          //FOR IS DEFINED BUT MAP IS NOT FOUND,
                          //LOGGING CAN BE DONE HERE
                      }
                  } //outer if
              }; //function ends here

              var geocoder = Ice.GoogleMap.getGeocoder(clientId);
              geocoder.getLatLng(address, gLatLng);
          },

      Note that adding an address manually to the inputText and hitting Enter does not result in the looping request behaviour.

        Issue Links

          Activity

            People

            • Assignee:
              Deryk Sinotte
              Reporter:
              Deryk Sinotte
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: