emnadridi / gmaps4jsf

Automatically exported from code.google.com/p/gmaps4jsf
0 stars 0 forks source link

Javascript Error when creating the markers through <f:ajax> #88

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a template with 3 compositions
2. One of the composition with the map
3. Another composition with a form and button triggering ajax (<f:ajax>).

What is the expected output? What do you see instead?
When you load the page is ok (I think because there is no marker). But when
you click on the button to trigger the ajax adding markers, the response is
trying to run a javascript where there is a hyphen(-) in the javascript
function name, occurring a error in the page. Eg:
"createMarkerFunctionj_id-799758775_399a54_1_marker(map_base_variable);".

What version of the product are you using? On what operating system?
gmaps4jsf1.1.2 with JSF2. WinXp. Tomcat 6.

Please provide any additional information below.
Trying to figure out the error, I found the problem in the MarkerEncoder
class, getUniqueMarkerId method. Replacing the '-' by '_' should fix the
problem.

Original issue reported on code.google.com by alex.sbr...@gmail.com on 2 Dec 2009 at 7:13

GoogleCodeExporter commented 9 years ago
Did you tried the latest snapshot of GMaps4JSF.

I think that this issue is resolved from the start of 1.1.3.

Original comment by Hazem.sa...@gmail.com on 18 Dec 2009 at 1:35

GoogleCodeExporter commented 9 years ago
I did some tests with the version 1.1.3 and this issue still persist. Please 
check it
out.

Original comment by alex.sbr...@gmail.com on 21 Dec 2009 at 1:45

GoogleCodeExporter commented 9 years ago
http://myfacespoc.googlecode.com/svn/trunk/favoritePlaces/

This is a NetBeans examples that uses:
JSF 2.0
CDI 1.0
EJB 3.1
JPA 2.0
GMaps4JSF 1.1.3.

And the markers are added dynamically to the map when the user click the add 
button.

please check the example page for more details:
http://code.google.com/p/myfacespoc/source/browse/trunk/favoritePlaces/web/index
.xhtml

I will add also a simpler example to the GMaps4JSF demos page as well soon.

Original comment by Hazem.sa...@gmail.com on 9 Jan 2010 at 4:17