Gmaps4jsf can not render Map Primefaces selected values

94 views
Skip to first unread message

erb...@gmail.com

unread,
Mar 12, 2014, 5:49:32 AM3/12/14
to gmaps4...@googlegroups.com
Hi everybody,

I hv city and suburbs which returns all markers shown inside map at begining of page load works successfully . However, after selecting city and suburb it runs ajax and render gmaps4jsf map  but map get disappeared what should i do. Thank you.

 <p:selectOneMenu id="city" value="#{sehirTable.city}">
                <f:selectItem itemLabel="Select City" itemValue="" />
                <f:selectItems value="#{sehirTable.cities}" />
                <p:ajax update="suburbs"
                        listener="#{sehirTable.handleCityChange}" />
            </p:selectOneMenu>

            <p:selectOneMenu id="suburbs" value="#{sehirTable.suburb}">
                <f:selectItem itemLabel="Select Suburb" itemValue="" />
                <f:selectItems value="#{sehirTable.suburbs}" />
                <f:ajax render="pnl" 
                        listener="#{sgmTable.displayLocation}" />// this returns my selected city its suburbs values
            </p:selectOneMenu>
----------------------------------------------------------
<h:panelGroup id="pnl" widgetVar="pnl">
     <m:map width="800px" latitude="36.1" longitude="36.1" height="500px" zoom="6"   autoReshape="true" partiallyTriggered="true"  >
                 
                
                  <ui:repeat var="loc" value="#{sgmTable.data}">
                
                      <m:marker latitude="#{loc.enlem}" longitude="#{loc.boylam}" >
                     
                          <m:htmlInformationWindow htmlText="&lt;img src=resources/images/image.png &gt; #{loc.sgm_adi} &lt;br&gt;&lt;hr&gt;&lt;b style=color:red &gt; Telefon: &lt;/b&gt;" />
                          <m:icon  width="25" height="36"  imageURL="resources/images/marker.png"/>
                       </m:marker>
                  </ui:repeat>
              </m:map>
             </h:panelGroup>
----------------------------------------------------------
To test whether values rendered or not. Test is successful when i change ajax render render id as "tblCountries"
 <h:dataTable id="tblCountries"                         
                     value="#{sgmTable.data}"
                     var="row">
            <h:column>
              <f:facet name="header">
                <h:outputText value="IL"/>
              </f:facet>
              <h:outputText value="#{row.il}"/>
            </h:column>
            <h:column>
              <f:facet name="header">
                <h:outputText value="ILCE"/>
              </f:facet>
              <h:outputText value="#{row.ilce}"/>
            </h:column>
            <h:column>
              <f:facet name="header">
                <h:outputText value="NAME"/>
              </f:facet>
              <h:outputText value="#{row.name}"/>
            </h:column>           
          
        </h:dataTable>


Hazem Saleh

unread,
Mar 13, 2014, 5:41:13 PM3/13/14
to gmaps4jsf-dev
Which version of GMaps4JSF are you using?


--
You received this message because you are subscribed to the Google Groups "gmaps4jsf-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gmaps4jsf-de...@googlegroups.com.
To post to this group, send email to gmaps4...@googlegroups.com.
Visit this group at http://groups.google.com/group/gmaps4jsf-dev.
For more options, visit https://groups.google.com/d/optout.



--
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

erb...@gmail.com

unread,
Mar 14, 2014, 5:34:45 AM3/14/14
to gmaps4...@googlegroups.com
gmaps4jsf-1.1.3-SNAPSHOT

12 Mart 2014 Çarşamba 11:49:32 UTC+2 tarihinde erb...@gmail.com yazdı:

Hazem Saleh

unread,
Mar 14, 2014, 10:08:35 AM3/14/14
to gmaps4jsf-dev
As indicated in the documentation, this attribute did not exist in 1.1.3:

partiallyTriggered (since 1.1.4)falseThis flag determines whether to render the map will be updated by Ajax. This flag should be set to true if the map is inside a zone that will be updated by Ajax.
false

In this old version of GMaps4JSF, you can use set renderOnWindowLoad="false" and it will give you the same behavior of partiallyTriggered="true"


--
You received this message because you are subscribed to the Google Groups "gmaps4jsf-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gmaps4jsf-de...@googlegroups.com.
To post to this group, send email to gmaps4...@googlegroups.com.
Visit this group at http://groups.google.com/group/gmaps4jsf-dev.
For more options, visit https://groups.google.com/d/optout.

erb...@gmail.com

unread,
Mar 14, 2014, 11:44:58 AM3/14/14
to gmaps4...@googlegroups.com, haz...@apache.org
Yes true, i hv just realized that im using old version of gmap4jsf. I changed with new jar file now it is working very well , thank you so much.



14 Mart 2014 Cuma 16:08:35 UTC+2 tarihinde Hazem Saleh yazdı:
Reply all
Reply to author
Forward
0 new messages