Google Autocomplete

  
Hi guys.

I've built a webblock that manages addresses for me. I have included the google autocomplete widget on the screen. Based on logic it is not initially visible. As soon as the logic change and the widget becomes visible the whole screen goes blank.

Any help would be appreciated.
Please share a simple oml so we can help.

imho, you should careful about what to refresh and what not.
it could be that refreshing a whole block screws over the intial dom for autocomplete.

check in chrome developer tool if there are any javascript-errors
What I do is I have the parent webblock (addressmanager), then I insert the auto complete in a non-visible container (AddressTypeInputs). Then on change of the Address_AddressTypeID control the OnAddress_AddressTypeIDChange function gets called. All works fine until googleAutocomplete get inserted and the OnChange event gets fired.

Ive attached the OML file.

?Thanks for your help

I wanted to post what I did with the google auto complete.  I would love to get some feedback!  I'm sure everyone will have some questions as to why I did the way I transversed the address components or perhaps a much better way to get them.  Love to get your feedback!
Jay Brooks wrote:
I wanted to post what I did with the google auto complete.  I would love to get some feedback!  I'm sure everyone will have some questions as to why I did the way I transversed the address components or perhaps a much better way to get them.  Love to get your feedback!
Jay,

After going through the attached OML I did not see the changes that you refered to.

There is a newer version of the component on the forge that includes JSON to OS record conversion.

Take a look at it and please pass on your feedback so that I can look at including it in the component.

Ouen

Ouen,

What is the name that I should be searching for in the Forge?   I only see https://www.outsystems.com/forge/component/899/google-places/

Thank you,

jay
Ouen Worth wrote:
Jay Brooks wrote:
I wanted to post what I did with the google auto complete.  I would love to get some feedback!  I'm sure everyone will have some questions as to why I did the way I transversed the address components or perhaps a much better way to get them.  Love to get your feedback!
Jay,

After going through the attached OML I did not see the changes that you refered to.

There is a newer version of the component on the forge that includes JSON to OS record conversion.

Take a look at it and please pass on your feedback so that I can look at including it in the component.

Ouen
 
 Ouen,

could you assist me with the xpath needed to acquire the address components of the json returned please?

Thank you!
 
Jay,

The component is called Google Places.

The version 1.1.0 has an action to convert the JSON into a record structure which is much easier to work with. Check the demo module for an example of how to get the response record.

Ouen