2

I'm building a JSF application which has multiple sections at any time on a page. Section 1 & 2 have same input fields (different IDs and class) to search for location of user. both fields use geocomplete

When the page loads initially, everything works fine. Data using geocomplete is loaded correctly in both the fields separately.

Now when I perform validations on section2 and re-render it

f:ajax execute="panelBlocks" render="panelBlocks"/>

, geocomplete stops working in only this section. I continue to get

TypeError: $(...).geocomplete is not a function

for the fields in section 2. However, section 1 fields still continue to work fine.

Any help would be greatly appreciated. I've been stuck with this issue for 3 weeks now.

Akash

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • Have you take a look at [this](http://stackoverflow.com/q/33514921/1016716) question and [this](http://stackoverflow.com/q/35442804/1016716) one? It looks like the function is called from somewhere that doesn't have the geocomplete.min.js loaded, or where it is called before geocomplete.min.js is included. – Mr Lister Sep 04 '16 at 06:52
  • Yes. I've looked at both. In my case, section 1 fields are working. So that rules out incorrect call of geocomplete js. As long as I do not reload section 2 via AJAX, everything works fine. Not sure why geocomplete JS is not visible. I've tried re-rendering the JS thinking that the reload of JS might help. But no success. – Akash Singla Sep 05 '16 at 07:14
  • Somehow the AJAX reloaded panel cannot see the geocomplete JS import. – Akash Singla Sep 05 '16 at 07:20

0 Answers0