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
Deryk Sinotte
created issue -
Deryk Sinotte
made changes -
Field | Original Value | New Value |
---|---|---|
Salesforce Case | [] | |
Assignee | Deryk Sinotte [ deryk.sinotte ] |
Deryk Sinotte
made changes -
Deryk Sinotte
made changes -
Salesforce Case | [] | |
Affects Version/s | 2.0.2 [ 10273 ] |
Ken Fyten
made changes -
Salesforce Case | [] | |
Assignee Priority | P1 |
Deryk Sinotte
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Fix Version/s | 2.1-Beta2 [ 10294 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |