Value List Update Display in Real Time

Questions, tips and tricks and techniques for scripting in Servoy

Value List Update Display in Real Time

Postby akaash » Tue Sep 09, 2014 12:12 am

Hi all,

I'm calling a google maps API through Servoy and I'm trying to mimic the same UX as when you're typing an address in google maps. It performs a search on keystrokes that are more than 1s apart using the keyListeners plugin and returns me a set of addresses in an array. I then build a value list using the returned search results. Unfortunately, even though the value list is constantly rebuilding as I type (with keystrokes 1s apart), it's not displaying in the UI. Does anyone know of a way I can have the changing value list values display without doing a focus loss/gain on the text field? I tried recreate UI and update UI, neither of these work.

Any suggestions would be greatly appreciated

Thanks,
Akaash
akaash
 
Posts: 30
Joined: Fri Jan 25, 2013 4:58 pm
Location: Montréal

Re: Value List Update Display in Real Time

Postby ROCLASI » Tue Sep 09, 2014 9:27 am

Hi Akaash,

I don't think you can use the value list approach without doing the focus lost/gained technique. It only loads it the moment you give it the focus.

Another way would be to mimic the typeahead list by using a HTML_AREA field attached to a form global. Here you render the list using your array and show/hide it accordingly.
If you want to be real fancy you could also use a dialog without chrome (no borders) (or else just a tab-less tabpanel) and put a list/table view on it but that might be overkill for your purpose.

Hope this helps.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium


Return to Methods

Who is online

Users browsing this forum: No registered users and 9 guests