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

Java 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.

New Contributor
Posts: 5
Registered: ‎09-01-2009
My Device: Storm 9500

populate objectchoicefield from web service?

Hi all,


i'm writing a java app for the bb storm on os 4.7, and was wondering if anyone could answer this question. If this has already been addressed, feel free to tell me off Smiley Wink


I have an objectchoicefield dropdown list, and i'd like to know if it's possible to populate it from a web service as opposed to hard coding the values in?


i'm not very familar with java, so any help would be greatly appreciated.



Posts: 395
Registered: ‎12-18-2008
My Device: BlackBerry Torch 9800
My Carrier: AT&T

Re: populate objectchoicefield from web service?

Beginning with BlackBerry Device Software 4.3, RIM added support for consuming Web Services from a Java application. They basically did an implementation of the JSR 172 specification. So basically, yes - you can use the results of a web service call to pupulate interface objects.


You can find an example of how to consume a web service from a BlackBerry Java application here:




Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: populate objectchoicefield from web service?

Quite possible, however until you get the values down from the web (which might take sometime, especially if the user is not a good network area, you will not have any data to display to the user.  What are you going to do in this circumstance?

New Contributor
Posts: 5
Registered: ‎09-01-2009
My Device: Storm 9500

Re: populate objectchoicefield from web service?


that's a good question Peter, I hadn't thought of that.


I can display a dropdown from the web service in a simpleweb page displayed in Google Chrome on my laptop, so was going to link directly to the page stored within the java app, but when i load the page onto my storm,  it doesn't show the dropdown.


I have to admit, i'm not exactly brilliant at web coding either, so if you'll indulge me, that'd be great. the link to the web service ends in .aspx. I can display the dropdown on the storms browser if i go directly to the web address, so can't figure out what i'm doing wrong with the page i've written. the code for the page is below. i'm wondering if i'm doing something wrong with the java script.


I know this has turned from a java to a web query, but i'll be launching this from within a java app, so it's still sorta relevant (i hope)



<h2>Now Showing...</h2>

<div class="cinemasearchMain"> 
    <label><strong>Film Title: </strong></label> 

    <script type="text/javascript"> 
            document.write("<script type=\"text/javascript\" charset=\"utf-8\" src=\"web service address.aspx" + location.search +"\">" + "<" + "/script>");




thanks for looking...