05-03-2010 06:27 PM
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
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.
05-03-2010 07:39 PM
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:
05-03-2010 07:41 PM
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?
05-04-2010 04:00 AM
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)
thanks for looking...