-
Notifications
You must be signed in to change notification settings - Fork 0
Usage
rootkit007 edited this page Dec 13, 2012
·
1 revision
Usage:
<gn:GooglePlace id="address" place="#{customer.place}" value="#{customer.fullAddress}" style="width:100%;">
<p:ajax event="place_changed" update="placeResult"></p:ajax>
</gn:GooglePlace>
<p:panelGrid id="placeResult" columns="6">
<h:outputText value="#{customer.place.getStreetAddress()}" ></h:outputText>
<h:outputText value="#{customer.place.getCity()}" ></h:outputText>
<h:outputText value="#{customer.place.getRegion()}" ></h:outputText>
<h:outputText value="#{customer.place.getCountry()}"></h:outputText>
<h:outputText value="#{customer.place.getCountryCode()}"></h:outputText>
<h:outputText value="#{customer.place.getPostalCode()}"></h:outputText>
</p:panelGrid>
The "place" attribute is bound to GooglePlaceEx object (see sources) which contains most of the data as returned by Google (I did not include stuff like reviews and ratings). Search results are biased towards user's current location.