Details
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.
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
- blocks
-
ICE-5868 MyFaces 2 compatibility
- Closed
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion