Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Contributor
Posts: 4
Registered: ‎02-23-2010
My Device: Bold 9700
My Carrier: Vodafone UK

Autocomplete fields in a widget

Hi all

 

I'm trying to create a google-suggest style autocomplete field in my blackberry widget. For performance, I would prefer not to have to call the server for suggestions on every key press. I have a list of items that the autocomplete can choose from (c. 2500) which I would like to store locally.

 

My question is - what's the best way to achieve this in widget? Should I use jquery (which seemingly has a large overhead) or try to write an extension to the blackberry autocomplete field? Or maybe there's a more efficient way using sqlite?

 

Grateful for any suggestions.

 

Thanks!

 

Ben

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Autocomplete fields in a widget

Have you checked out the HTML5 datalist field that is available in 5.0?

 

http://devblog.blackberry.com/2010/03/use-html5-in-your-blackberry-web-content/

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Contributor
Posts: 4
Registered: ‎02-23-2010
My Device: Bold 9700
My Carrier: Vodafone UK

Re: Autocomplete fields in a widget

I haven't - but I will do now!

 

Thanks!

New Contributor
Posts: 4
Registered: ‎02-23-2010
My Device: Bold 9700
My Carrier: Vodafone UK

Re: Autocomplete fields in a widget

[ Edited ]

Hmmm. Perhaps it's me, but I can't seem to get this to work reliably in the simulator.

 

<div>
<b>Test list:</b><br/>
<input id="a" name="b" list="lstS" />
<datalist id="lstS">
          <option label="G" value="Abc">
          <option label="D" value="Def">
          <option label="L" value="Ghi">
          <option label="E" value="Jkl">
          <option label="W" value="Mno">
</datalist>
</div>

 

Thae datalist displays, but the rest of the items on the screen have gone! Also, using typeahead and then scrolling down to select an item seems to crash the browser.

EDIT: I should also add that I have over 2500 possible entries for my datalist - the list seems to want to display on load so I think that could also cause a few problems!!

 

The simulator is Bold 9700 (5.0.0.469)

 

Any tips anyone?

 

Thanks

 

Ben

 

Contributor
Posts: 33
Registered: ‎07-08-2010
My Device: Bold 9700/9900 - Playbook v2.0.xxx
My Carrier: Telus

Re: Autocomplete fields in a widget

Same here. Bold 9700 and the Storm2 with 5.0.0.496

 

Looks like a nice feature that I could use but does not seam stable.