Development in ObjectChoiceField


you create the field with an array of objects.

your object might look like this:

public class {Bean

secret of private; channel

description of the private channel;

{public bean (description of the string, string secret)

This.secret = secret;

This.Description = Description;

}

public String getSecret() {}

secret return;

}

public String toString() {}

return description;

}

}

now, create an array of Bean objects and initialize your field with her:

ObjectChoiceField myChc = new ObjectChoiceField ("beans:", beans, 0, ObjectChoiceField.FIELD_LEFT)

Tags: BlackBerry Developers

Similar Questions

  • Setting width of objectchoicefield

    Hello

    I want to ObjectChoiceField without tag and set its width on screen width in my project. Suggest me the way to do this

    Thanks in advance

    Check this box to learn how to make a custom presentation:
    http://supportforums.BlackBerry.com/T5/Java-development/how-to-extend-Manager/Ta-p/446749

    in your case, you can also try to crush getPreferredWidth, but do not know if it works on a choicefield

  • ObjectChoiceField FieldChangeListener problem

    Hi all

    I'm coding an application for 4.5 but testing on BB 9500.

    I want to a few call webservice on the choice of an ObjectChoiceField.

    But the problem is that the FieldChangeListener of the ObjectChoiceField fires on the development as well as on the selection of the field.

    How to distinguish two event?

    Thaks for your help in advance.

    Hi all

    I found the solution to my problem.

    Below is sample code for the solution.

    ObjectChoiceField myObjectField= new ObjectChoiceField("",new String[] { "" }, 0, FIELD_LEFT)
    {
        protected void fieldChangeNotify(int context)
        {
        new myObjectField_change_method();
        }
        public void focusChangeNotify(int arg0)
        {
        super.focusChangeNotify(arg0);
        }
    };
    

    In the code above myObjectField_change_method() is a method to be triggered when the field is selected.

  • Put two ObjectChoiceField side by side

    Hello

    I tried to put both components in a HorizontalFieldManager ObjectChoiceField, but I can't view both on the same line, it seems that the other is pushed off the screen to the right.

    I tried with Manager.NO_HORIZONTAL_SCROLL nothing works.

    Can anyone please help me;

    Thank you very much

    You can limit the width of one of them. These two talk on this subject, but for the different types of fields:

    http://supportforums.BlackBerry.com/T5/Java-development/can-t-put-BasicEditField-and-button-side-by-...

    http://supportforums.BlackBerry.com/T5/Java-development/please-help-with-trying-to-put-a-BasicEditFi...

    But if you are sure that they will hold next, you can set one on the left with the style

    Field.FIELD_LEFT and I think he'll try to stay as close to the left as it can.  Give it a try.

  • ObjectChoiceField listener

    I have several dynamic number of choice fields and I want n Exchange listner to each of them how do you

    for (int i = 0; i)<>
    {
                                
                                
    JSONObject obj1 = new JSONObject (arr.getString (i));
    Dialog.Alert (arr. ToString());
                                 
    final JSONArray arr1 = obj1.getJSONArray ("options");
    final String [] [] selection = String [2] [arr1.length (new)];
    for (int j = 0; j)<>
    {
    JSONObject obj2 = new JSONObject (arr1.getString (j));
    Choices [0] [j] = obj2. GetString ("Name");
    Choices [1] [j] = obj2. GetString ("optFees");
    }
                                 
    VF. Add (new ObjectChoiceField (obj1.getString ("optionname"), choices [0], 0, ObjectChoiceField.FIELD_LEFT))
    {
                                    
                                    
    public void paint (Graphics g)
    {
    g.setColor (Color.RED);
    Super.Paint (g);
    }
                                    
    ' Public Sub fieldChanged (field field, int context)
    {
    If (field instanceof ObjectChoiceField) {}
    Dialog.Alert (Choices [1] [This.getSelectedIndex ()]);
    }
                                               
    }
                                       
                                    
                                   
                                    
    protected boolean navigationClick (int status, int time)
    //                                   {
    //
    //                                     return true;
    //                                   }
    protected Boolean keyChar (character char, int status, int time)
    //                                     {
    Dialog.Alert (Choices [1] [This.getSelectedIndex ()]);
    Return super.keyChar (character, status, time);
    //                                    }

    });
    Add (new LabelField (obj1.getString ("optionname")));
    }
    Add (VF);
    }
    }

    I tried browsing click but as it s action happens when the click on I want to action either happens after selection

    a solution

    http://supportforums.BlackBerry.com/T5/Java-development/dynamic-value-change-and-select-in-object-ch...

  • [ObjectChoiceField] A sound clip?

    I want to ObjectChoiceField filled with sound files as in "Profiles" app, but I'm stuck-

    How to make an audio excerpt on the drop-down list select? FieldChangeListener runs on after the selection, but I need a listener during the selection.

    N ° it does not work on the drop-down list.

    Found the solution: http://supportforums.blackberry.com/t5/Java-Development/Listen-to-ObjectChoiceFields-focused-index/m...

  • Need help breaking into Java/BlackBerry development / this sample project

    I have a ton of experience OO, but I am new to Java and I am trying to enter development for BlackBerry, and my first problem is being stuck with this defective sample app that comes w/Eclipse or JDE or something (they call it "CityInfo"). When I run the Simulator, I see the drop-down list box, but by selecting its members does nothing, and I don't know enough about the environment/language to understand why.

    I installed all the packages that are free. They are Eclipse (I can't find a version number), JDE, the Java plugin for Eclipse and the BlackBerry JDE 4.3 to 4.7 components Packages.

    And when this has been resolved, perhaps someone can show me a good set of sample applications with tutorials. I'm trying to follow http://supportforums.blackberry.com/rim/attachments/rim/java_dev@tkb/9/1/Writing_Your_First_Applicat... but it's not compatible w / the environment that I run.

    Here is the code for the project CityInfo:

    package com.mycompany;

    Net.rim.device.api.ui import. *;
    Net.rim.device.api.ui.component import. *;
    Net.rim.device.api.ui.container import. *;
    Net.rim.device.api.system import. *;
    Net.rim.device.api.i18n import. *;

    Import net.rim.device.api.ui.UiApplication;

    SerializableAttribute public class CityInfo extends UiApplication {}

    public CityInfo() {}
    pushScreen (new CityInfoScreen());
    }

    /**
    @param args
    */
    Public Shared Sub main (String [] args) {}
    CityInfo PAP = new CityInfo();
    theApp.enterEventDispatcher ();
    }

    }

    final CityInfoScreen class extends form {}
    Private InfoScreen _infoScreen;
    Private ObjectChoiceField choiceField;
    private int select;

    public CityInfoScreen() {}
    Super();
    LabelField title = new LabelField ("town Information Kiosk", LabelField.ELLIPSIS)
    | LabelField.USE_ALL_WIDTH);
    setTitle (title);

    Add (new RichTextField ("cities"));

    Choice of String() = {"Montreal", "Waterloo", "Ottawa"};
    choiceField = new ObjectChoiceField ("select a city", choice).
    Add (choiceField);
    }

    public boolean onClose() {}
    Dialog.Alert ("Goodbye!");
    System.Exit (0);
    Returns true;
    }

    _viewItem private MenuItem = new MenuItem ("other info", 110, 10) {}
    public void run() {}

    Store the index for the city that selects a BlackBerry device user

    Select = choiceField.getSelectedIndex ();

    Create an instance of the screen that displays information about the city that
    the BlackBerry device user selects

    _infoScreen = new InfoScreen();
    UiApplication.getUiApplication () .pushScreen (_infoScreen);
    }

    };
    private MenuItem _closeItem = new MenuItem {("close", 200000, 10)
    public void run() {}
    onClose();
    }
    };

    protected void makeMenu (menu Menu, for example int) {}
    menu. Add (_viewItem);
    menu. Add (_closeItem);
    }

    private class InfoScreen extends form {}
    public InfoScreen() {}
    Super();
    LabelField lf = new LabelField();
    BasicEditField popField = new BasicEditField ("Population:", null, 20, Field.READONLY);
    BasicEditField stateField = new BasicEditField ("Province:", null, 20, Field.READONLY);
    BasicEditField sightsField = new BasicEditField ("sites:", null, 50, Field.READONLY);

    Add (LF);
    Add (new SeparatorField());
    Add (popField);
    Add (stateField);
    Add (sightsField);

    If (select == 0) {}
    lf.setText ("Ottawa");
    popField.setText ("3,694,820");
    stateField.setText ("Ontario");
    sightsField.setText ("Parliament");

    } ElseIf (select == 1) {}
    lf.setText ("Waterloo");
    popField.setText ("2,896,016");
    stateField.setText ("Ontario");
    sightsField.setText ("University of Waterloo");
    } ElseIf (select == 2) {}
    lf.setText ("Montreal");
    popField.setText ("8,008,278");
    stateField.setText ("Quebec");
    sightsField.setText ("Saint - Joseph Oratory");
    }
    }
    }
    };

    Hi and welcome to our forum!

    1. When you select item in your ObjectChoiceField nothing happens in terms of user interface. You must press menu and select "Details". Try it!
    2. Check out this http://docs.blackberry.com/en/developers/?userType=21
  • Show all members of the Group of developer tools?

    How can I view all of the current members of the developer tools group?

    Hello Michael,

    Unfortunately, it is quite difficult. Here are some solutions:

    http://superuser.com/questions/279891/list-all-members-of-a-group-Mac-OS-x

    https://jamfnation.jamfsoftware.com/discussion.html?ID=15503

  • How to open a file of unidentified developer?

    I try to open and install as a plugin for Final Cut Pro X. Plugin has been downloaded from the website of the official Developer (PixelFilmStudios.com).

    To make the story more short - button 'Still open' in security settings doesn't work :/ I always get the same information that is "unidentified developer. It looks like a bug or sth. I'm not sure. Please look at the screenshot below

    The question is: How can I install this plugin?

    additional information:

    MacBook Pro 13 "

    2.7 GHz Intel Core i5

    8 GB 1867 MHz DDR3

    MacOS 10.12 Sierra

    Final Cut Pro X 10.2.1

    plugin: FCPX LUT LOADER 1.4

    Thank you much for the help!

    Try this:

    Select the program package or App. CTRL - or RIGHT click, and select open in the top of the context menu. Click the Open button in the next dialog box. It works with the unsigned applications, but it may not work with an installer.

  • Have CarPlay - you arrested development?

    I bought a new car and a past due the CarPlay navigation system. I thought that the future is CarPlay or the equivalent of google - Yes, I tested both. But I must say that the two are very very disappointing.

    1 Siri:

    When you use Siri with Bluetooth, all right. Not useful each time, but the iPhone understands me. When you use CarPlay, Siri don't understand me anymore. The phone is in the same place in the car.

    2. maps:

    Why you do not support true navigation additional apps to maps? Maps is not as powerful as real navigation applications. There are a lot of things bother me:

    -No 3D view

    -No sign, for example tempo-limit,

    -The contrast is very bad. It is not easy to see the other roads

    -On the highway you'll see the road, just a vertical line, nothing around > This is not useful. I want to see how he is for the next round or my destination,

    -While driving and navigation time is enabled I can't zoom out.

    -For journeys over long routes maps suggests me are not the best.

    -Siri do not understand where I have to go,

    -More than one-stop? Well...

    -... and many more things real navigation systems or applications can do.

    Please at least improve CarPlay cards.

    3. integration of the car

    Well, I can use my remote control on the steering wheel. That's great. But as long as the car rolls. A large problem is that CarPlay information are not displayed on the screen at the wheel - only on the screen in the middle of the car. So I can't take a look at the road.

    4 applications

    You are supported audio applications. Why?

    So, I really want to try. I'm the only person who is not satisfied with it? You will develop new features? If this isn't the case, you will give other people the opportunity to develop applications for the navigation? I forgot a select all the options for the cards or CarPlay?

    Thank you for your help.

    PPaulHH wrote:

    I bought a new car and a past due the CarPlay navigation system. I thought that the future is CarPlay or the equivalent of google - Yes, I tested both. But I must say that the two are very very disappointing.

    1 Siri:

    When you use Siri with Bluetooth, all right. Not useful each time, but the iPhone understands me. When you use CarPlay, Siri don't understand me anymore. The phone is in the same place in the car.

    2. maps:

    Why you do not support true navigation additional apps to maps? Maps is not as powerful as real navigation applications. There are a lot of things bother me:

    -No 3D view

    -No sign, for example tempo-limit,

    -The contrast is very bad. It is not easy to see the other roads

    -On the highway you'll see the road, just a vertical line, nothing around > This is not useful. I want to see how he is for the next round or my destination,

    -While driving and navigation time is enabled I can't zoom out.

    -For journeys over long routes maps suggests me are not the best.

    -Siri do not understand where I have to go,

    -More than one-stop? Well...

    -... and many more things real navigation systems or applications can do.

    Please at least improve CarPlay cards.

    3. integration of the car

    Well, I can use my remote control on the steering wheel. That's great. But as long as the car rolls. A large problem is that CarPlay information are not displayed on the screen at the wheel - only on the screen in the middle of the car. So I can't take a look at the road.

    4 applications

    You are supported audio applications. Why?

    So, I really want to try. I'm the only person who is not satisfied with it? You will develop new features? If this isn't the case, you will give other people the opportunity to develop applications for the navigation? I forgot a select all the options for the cards or CarPlay?

    Thank you for your help.

    There is no Apple here in this technical forum from user to user.

    You may notify Apple here http://www.apple.com/feedback/

  • A 2 month old iPod Touch 5th generation began to lose its charge the battery overnight.  East - the developer of a battery issue?

    A "renovated" old 2 months iPod Touch 5th generation just recently started losing its charge the battery during the night.  East - the developer of a battery issue?

    Perhaps. Where did you buy this device?

  • iTunes late development and scale of problem

    I recently downloaded iTunes a few days ago. The program runs very slowly and in the iTunes store my cursor is not properly calibrated. The screen itself is also cut makes it difficult to navigate the store, especially combined with the slow performance.

    I tried to reinstall and other attempts to solve without success. I have a decent laptop, so this isn't a problem.

    Anyone else knows this or know of a fix? Thank you!

    These errors are usually the result of the use of the Windows options for expanded fonts with which iTunes does not work with or scaling the DPI. Try to set these default/100% and see if the problem with iTunes disappear. It will not help if you need to use these features for best results in other software, but at least she will confirm here the rub.

    As for the late development, it can help to make a complete tear down and rebuild, as described in the second box of troubleshooting problems with iTunes for Windows updates. Excluding the iTunes folder of any AV real-time, tests can also help.

    TT2

  • I would use Yuanti SC police for my web development project. However, my developer is not able to use the file .ttc I extracted from the library of fonts, and .ttf, .otf .woff formats not available anywhere on the web.

    I would use Yuanti SC police for my web development project. However, my developer is not able to use the file .ttc I extracted from the library of fonts, and .ttf, .otf .woff formats not available anywhere on the web. Please, let me know how can I use this font for my project.

    Thank you

    Anton

    Unless the site you develop is for the Asian market, I don't know why you want to use that particular font. The Basic, standard and digital alphabet punctuation glyphs has sans serif, Roman characters, but the rest is thousands of Kanji characters. While you can use the font .ttf and .otf and web fonts, it would be very unusual to use one so great. Pages should load quickly and 78 MB, with a value of faces to download for those who have connections slow Internet is not fast.

    I would take a different font without serifs. There are literally thousands who look identical or virtually identical to Yuanti.

    131 free and high quality without font serif to choose here. I'm sure you can find a desired.

  • I'm currently developing the feature keys on my MacBook. In the process, he asked that I enter a code sent by message to a phone number (only the 2 last digits are revealed) that I do not have access to.   How can I fill the activation?

    I'm currently developing the feature keys on my MacBook. In the process, he asked that I enter a code sent by message to a phone number (only the 2 last digits are revealed) that I do not have access to.   How can I fill the activation?

    See "change how the new features can be approved" here:

    OS X Yosemite: Configure iCloud keychain

    As you can see, this allows you to change the phone number.

  • A good laptop for video game development?

    I'm new to development and am looking for a new laptop that would work well for development. I know one a laptop is not the best option, but I need to be mobile because I tend to move around a lot. I'm looking for something under $ 1500. I need something that works well for making games indie and the latest software of the unit running. I would greatly appreciate all advice!

    Apple - MacBook pro 13 "16 GB Ram upgrade

    http://www.Apple.com/shop/buy-Mac/MacBook-Pro?product=MF839LL/A & step = config #.

    its what I use and it works very well for steam games, etc...

    Hope this helps, good luck to you.

Maybe you are looking for

  • Intel technology quick start error in event visors after upgrade to Windows 10

    Hello I get questions with technology Intel Rapid Start after upgrade my Portege Z30t-A-103 to 10 Windows. The Windows Event Viewer shows: irstrtsv Error: Cannot read LBA sector directly I tried to disable the technology Intel Rapid boot from the BIO

  • RVS4000 routing between VLAN static?

    Hello I was wondering if the RVS4000 allows a static routing between the VLANS.  I would like to have three VLANS, one for my cable system, one for my wireless network and one for my print server.  I want the two VLAN Wi - Fi and to be able to get to

  • Windows Media Player: Edit the titles and album names

    My husband ripped an album on a CD for me, but does not burn the CD on my drive. How do I title the album and each track on the CD? If the extracted tracks are not be written to the CD, this will be a problem later? Thanks for your help.

  • Smartphones from blackBerry Torch 9800 my email does not work via wifi

    I just sync my new torch of my old "BOLD". All information transferred perfectly including my 2 email accounts. I have the misfortune to live in an area of 2G alone on a remote island. SMS, phone calls and wifi only. I had my old "BOLD", via wifi hot

  • Bad resolution size is re-enabled Photoshop

    I had Photoshop CS6 on a Macbook Air 11 '', and when he died I re-uploaded it on my new 15 "Pro. However, when I open the text and interfaces and so on are really pixelated and I cannot see anything in the net. Even when I open an image, it is not cr