Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6048015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:24:57+00:00 2026-05-23T07:24:57+00:00

I’m new to Blackberry Development and i have to implement a search functionality. It

  • 0

I’m new to Blackberry Development and i have to implement a search functionality. It is supposed to be like when i input something in the search field and press the search button it should pass that string to a url as a parameter. Can anyone put me in right direction so as i can understand how to implement it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T07:24:58+00:00Added an answer on May 23, 2026 at 7:24 am

    If you want the searching to be done on a remote server, and just want the user to be able to enter a search term, then you’ll first want a manger with two fields, such as a BasicEditField and a ButtonField. Then you’ll want to hook up the button field to submit a request when it is clicked (I assume from your description that is http, but it could be anything). If your button field is stored in a buttonField variable, and your edit field is stored in your editField variable, and you have a method named sendRequest that takes a parameter and sends a request to the url, then you might have:

    buttonField.setChangeListener(new FieldChangeListener() {
        public void fieldChanged (Field field, int context) {
            (new Thread() {
                public void run() {
                    sendRequest(editField.getText());
                }
            }).start();
        }
    });
    

    This might look a little complicated, but it breaks down pretty easily:

    • By calling setChangeListener, we ensure that the fieldChanged method will be called whenever the button is pressed
    • When fieldChanged is called, we will be in the UI thread. We don’t want to lock the UI while we make the request, so you should send the request in a new thread.
    • getText gets the current text that the user has entered, and passes it to your sendRequest method

    The sendRequest method should send the request to the url you mentioned. This will differ depending on how old devices you need to support – BlackBerry introduced a new networking API in 5.0 and expanded on it in 6.0, that simplifies network communications significantly.

    I’m assuming you’ll be parsing some sort of response that holds the search results. In this case, you’ll also want a manager (such as a VerticalFieldManager) to store those results. Then you would add a field for every result that you wanted to show. You’ll need to be careful to be holding the UI event lock when doing this, however, since it will probably be executing in a background thread. For example, you might have:

    public void addResult(String result) {
        synchronized(Application.getEventLock()) {
            searchResults.add(new LabelField(result));
        }
    }
    

    This would just show results in a label field, but you could obviously have more complex fields if you wanted more complicated behavior or more complicated UI.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some data like this: 1 2 3 4 5 9 2 6
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
this is what i have right now Drawing an RSS feed into the php,
I want use html5's new tag to play a wav file (currently only supported

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.