Nobleflow / gmaps4jsf

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

Can't assign dynamic id parameter value to m:marker inside a ui:repeat #140

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I need to draw multiple draggable markers using a ui:repeat
2. m:marker gets position OK from the latitude and longitude properties of the 
var in ui:repeat
3. m:marker doesn't get any property inside "id" parameter form the var in 
ui:repeat, so all markers have empty or ramdom id's.

What is the expected output? What do you see instead?
For: <m:marker id="myMarker#{object.id}"../>
myMarker1, myMarker2, myMarker3
I see:
myMarker, myMarker, myMarker

What version of the product are you using? On what operating system?
1.1.3u3

Please provide any additional information below.
I think it is important because now you cannot know which marker has been 
dragged in the method specified in valueChangeListener as MarkerValue.getId() 
returned there has the same or random IDs.

Original issue reported on code.google.com by ignaciod...@gmail.com on 24 Aug 2010 at 9:39

GoogleCodeExporter commented 9 years ago
This is a JSF issue.
You cannot set component ID using EL.

Original comment by Hazem.sa...@gmail.com on 26 Aug 2010 at 5:45

GoogleCodeExporter commented 9 years ago
You can use the jsVariable attribute for distinguishing between markers.

Original comment by Hazem.sa...@gmail.com on 27 Aug 2010 at 12:46

GoogleCodeExporter commented 9 years ago
There was a related issue of having multiple eventListeners to markers inside 
ui:repeat. It is fixed in GMaps4JSF 1.1.4 preRelease jar:
http://gmaps4jsf.googlecode.com/files/gmaps4jsf-1.1.4-preRelease1.jar

Original comment by Hazem.sa...@gmail.com on 28 Aug 2010 at 12:59

GoogleCodeExporter commented 9 years ago
Thanks,
just checked valueChangeEvent.getSource().getJsVariable() and unlike "id" 
parameter, in jsVariable  the value is there OK, also when using EL. 

Regards and thanks again :-)

Original comment by ignaciod...@gmail.com on 28 Aug 2010 at 6:19