darshakshah1988 / gmaps4jsf

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

Ajax is broken in GMaps4JSF 1.1.4 when the map is updated. #141

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The following code does not work:

            <h:panelGroup id="updatablePanel">
                <m:map id="map1" width="500px" height="500px" latitude="24" longitude="15" 
                       jsVariable="map1" zoom="2" partiallyTriggered="true">

                    <m:marker id="marker1" 
                          latitude="#{place3.latitude}" longitude="#{place3.longitude}" 
                          jsVariable="marker1" draggable="true" 
                          submitOnValueChange="false" 
                          valueChangeListener="#{map.processValueChangeForMarker}">
                            <m:icon shadowImageURL="http://www.google.com/mapfiles/shadow50.png" 
                            imageURL="http://www.google.com/mapfiles/markerA.png"/>                       
                    </m:marker>    

                </m:map>

                <h:outputText value="Marker state (Longitude, Latitude):  (#{place3.longitude}, #{place3.latitude})"/>              
                <h:outputText value="<br>" escape="false"/>             
                </h:panelGroup>

            <a4j:commandButton value="Save Markers Positions" reRender="updatablePanel">
            </a4j:commandButton>

            <a4j:commandButton value="Reset Markers Positions" action="#{place3.moveToDefaults}" reRender="updatablePanel" >
            </a4j:commandButton>    

Original issue reported on code.google.com by Hazem.sa...@gmail.com on 28 Aug 2010 at 5:39

GoogleCodeExporter commented 8 years ago
Fixed here:
http://gmaps4jsf.googlecode.com/files/gmaps4jsf-1.1.4-preRelease1.jar

In GMaps4JSF 1.1.4 preRelease1.

Original comment by Hazem.sa...@gmail.com on 28 Aug 2010 at 6:14

GoogleCodeExporter commented 8 years ago
Hello,
just tested with this new download link and a:ajax won't work. Downgrading to 
1.1.3-u3 and restarting web app makes ajax work again.

Also, I've seen that 
The m:polyline code that is working OK form me in 1.1.3 and not in 1.1.4-pre:

    <m:polyline lineWidth="1"><ui:repeat value="${gmapsView.cervatOH2.track}" var="point">
        <m:point latitude="#{point.latitude+0.0016}" longitude="#{point.longitude}"/>
    </ui:repeat></m:polyline>

Ajax code not working for me in 1.1.4-pre:
<h:commandLink id="cmdShow2" value="CervatOH2" 
action="#{gmapsView.selectCervatOH2}"> 
    <f:ajax render="mapGroup2"/> 
</h:commandLink>

Also, a custom ajax auto-reload that also worked in 1.1.3:
<ez:poll id="poll4" interval="5000" timeout="10000" 
render="gmapsForm:mapGroup2"/>

Thanks,
Ignacio

Original comment by ignaciod...@gmail.com on 28 Aug 2010 at 11:49

GoogleCodeExporter commented 8 years ago
For the Ajax part:
We deprecated the (renderOnWindowLoad) attribute.

So please remove the (renderOnWindowLoad="false") and use 
(partiallyTriggered="true") instead.

I will develop a testcase for the m:polyline case soon.

Original comment by Hazem.sa...@gmail.com on 28 Aug 2010 at 11:53

GoogleCodeExporter commented 8 years ago
Does the Ajax works with you now?

Original comment by Hazem.sa...@gmail.com on 31 Aug 2010 at 11:02