Re: Gmaps4jsf & ajax problem

58 views
Skip to first unread message

Hazem Saleh

unread,
Dec 29, 2011, 5:25:58 PM12/29/11
to Damak Mones, gmaps4jsf-dev
Hi Damak,

You need to set the partiallyTriggered to true.

On Thu, Dec 29, 2011 at 2:56 PM, Damak Mones <damak...@gmail.com> wrote:
Hi Hazem,

I would like to thank you and your team for the great work.

I've created a simple web application to trace some coordinates from DataBase.
I use the gmaps4jsf 1.1.4
When I fill the Coordinate list( #{pathController.coord} ) manually it works.
When I press the "h:commandButton", the Coordinate list( #{pathController.coord} ) is filled but the map disapear!!! Is it a non compatibility with ajax??
Here is the code:

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<h:head>
<title>Carte avec GMaps4JSF</title>
<script
type="text/javascript"></script>
</h:head>
<h:body>
<h:form id="mashupForm">
<h2>Traquer l'utilisatuer 1</h2>
<h:commandButton value="Crée" action="#{pathController.doGetPath}">
<f:ajax render="mapGroup" />
</h:commandButton>
<h:panelGroup id="mapGroup">
<m:map width="800px" height="600px" latitude="36.50"
longitude="10.21">
<m:polyline lineWidth="5" hexaColor="#ff0000" geodesic="false">
<ui:repeat value="#{pathController.coord}" var="loca">
<m:point latitude="#{loca.latitude}" longitude="#{loca.longitude}" />
</ui:repeat>
</m:polyline>
</m:map>
</h:panelGroup>
</h:form>
</h:body>
</html>




--
Hazem Ahmed Saleh Ahmed

Author of (The Definitive Guide to Apache MyFaces and Facelets):
http://www.amazon.com/Definitive-Guide-Apache-MyFaces-Facelets/dp/1590597370
http://www.amazon.com/-/e/B002M052KY

Visualize and share your social networks 2D and 3D:

erb...@gmail.com

unread,
Mar 13, 2014, 2:51:21 AM3/13/14
to gmaps4...@googlegroups.com, Damak Mones, haz...@apache.org
i have same problem, even i put partiallyTriggered  true when i call map with <f: ajax render="pnl"> it disappears but when i call with ajax="false" page refresh all values seen, hv you solved your problem with that way ?

<h:panelGroup id="pnl" widgetVar="pnl">
     <m:map width="800px" latitude="36.1" longitude="36.1" height="500px" zoom="6"  partiallyTriggered="true"
      id="map"   type="G_NORMAL_MAP">                
                
                  <ui:repeat var="loc" value="#{sgmTable.data}">
                
                      <m:marker latitude="#{loc.enlem}" longitude="#{loc.boylam}" >
                     
                          <m:htmlInformationWindow htmlText="test " />
                          <m:icon  width="25" height="36"  imageURL="resources/images/marker.png"/>
                       </m:marker>
                  </ui:repeat>
              </m:map>
             </h:panelGroup>

30 Aralık 2011 Cuma 00:25:58 UTC+2 tarihinde Hazem Saleh yazdı:

Hazem Saleh

unread,
Mar 13, 2014, 5:40:44 PM3/13/14
to erb...@gmail.com, gmaps4jsf-dev, Damak Mones
Which version of GMaps4JSF are you using?
--
Hazem Saleh

Author of Pro JSF and HTML5 book:
http://www.amazon.com/Pro-JSF-HTML5-Building-Components/dp/1430250100/

Author of JavaScript Unit Testing book:
http://www.amazon.com/dp/1782160620/

Co-author of (The Definitive Guide to Apache MyFaces and Facelets) book:
http://www.amazon.com/-/e/B002M052KY

DeveloperWorks Contributing Author
https://www.ibm.com/developerworks/mydeveloperworks/blogs/hazem/entry/ibm_developerworks_contributing_author?lang=en_us

An Apache committer, IBMer, and a technical speaker

Twitter: http://www.twitter.com/hazems
Reply all
Reply to author
Forward
0 new messages