Are there any Data on Demand Listboxes for Web Apps?
Not that I’m aware of. The problem with web apps is the latency in the ‘on demand’ part. This is why websites only have lists that are between 50 and 100 rows long - otherwise their load times are craptastically long. Paging of data is easy enough to do using simple controls and SQL.
FWIW, I have an hour long video on how to create paging controls in desktop and web and show you how to do all the SQL. Not very hard but if you’ve never done it before it can be challenging. http://xojo.bkeeney.com/XojoTraining/
Thanks for that Bob. We’ve been playing with WebListBox vs scrollable WebContainers… Just found that WebContainers has:
http://documentation.xojo.com/index.php/WebContainer.ContentsScrolled
So we may be able to auto page as the user scrolls…
Be aware that you’ll want to do testing on a server, not locally so you can see how latency affects it.
If you have chrome, you can set the bandwidth/latency in the developer tools.
In custom Web controls we are using scrollTop and scrollHeight javascript to send back an event as soon as the user hits the bottom of the scrollable area:
Part of the code to create the element on screen:
[code] " onscroll="“if(this.scrollTop+this.offsetHeight>=this.scrollHeight){Xojo.triggerServerEvent(’” +_
Self.ControlID + “’,‘ScrollEnd’,[this.scrollHeight]);};return false;”""
data.append “<div id=”"" + self.ControlID + “_scroll”" class="“iOSTableView_scrollarea”"" + onScroll + “>”
[/code]
Then in the ExecuteEvent event, it is necessary to compare the scrollHeight (Parameter(0)) with the last received scrollHeight as most browsers will regularly send the ScrollEnd event even if the user didn’t scroll.
Short video : https://www.youtube.com/watch?v=Ag-5DMhkeBk