ListField in Blackberry - open a new screen after click listfield elements

Hi guys I'm new to the Blackberry java development

can someone suggest me how the code to open the new screen after clicking ListField point

What is navigationClick() or something

Thank you

Himanshu sharma

Beginner

Just copy and paste into your application

package mypackage;

import net.rim.device.api.command.CommandHandler;
import net.rim.device.api.command.ReadOnlyCommandMetadata;
import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.FieldChangeListener;
import net.rim.device.api.ui.Manager;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.component.LabelField;
import net.rim.device.api.ui.component.SeparatorField;
import net.rim.device.api.ui.component.table.SimpleList;
import net.rim.device.api.ui.container.MainScreen;

public class SimpleListDemo extends UiApplication {
    public static void main(String[] args) {
        SimpleListDemo theApp = new SimpleListDemo();
        theApp.enterEventDispatcher();
    }

    public SimpleListDemo() {
        pushScreen(new SimpleListScreen());
    }

    class SimpleListScreen extends MainScreen {
        private SimpleList listField;

        public SimpleListScreen() {
            super(Manager.NO_VERTICAL_SCROLL);
            setTitle("Simple List Demo");
            add(new LabelField("Blackberry Team", LabelField.FIELD_HCENTER));
            add(new SeparatorField());
            Manager mainManager = getMainManager();
            mainManager.setMargin(0, 0, 0, 50);

            listField = new SimpleList(mainManager);

            listField.add("Mr.Sushil");// /////////////// i want to open a new
            listField.add("Mr.Anantha");
            listField.add("Mr.Himanshu");

            listField.setCommand(new CommandHandler() {

                public void execute(ReadOnlyCommandMetadata metadata,
                        Object context) {

                    if (listField.getFocusRow() == 0) {
                        UiApplication.getUiApplication().pushScreen(new P());
                    }

                }
            }, null, null);

        }

    }

}

No need for a FieldChangeListener interface

Run to it and if you think you've got the necessary solution just set this thread as SOLVED

Tags: BlackBerry Developers

Similar Questions

  • Why can't I open a new tab after clicking on the button +?

    Usually I can click on the "open a new tab" button to open a new tab, but now, when I click on the button, nothing happens. I tried right clicking and choosing the option: 'New tab', but still no opening tab. However, new tabs open if I click on a link and it leads to a new window. I don't know why? How can I fix?

    Uninstall the toolbar Ask and it should work again. There is a compatibility issue with the Ask and Firefox toolbar that prevents the opening of new tabs.

  • When I open a new tab by clicking on t he '+' tab, I get a search engine called "-Search. How can I get rid of this? Where is this link?

    When I open a new tab by clicking on t he '+' tab, I get a search engine called "-Search. How can I get rid of this? Where is this link?

    Hello

    The reset Firefox feature can solve a lot of problems in restaurant Firefox to its factory default condition while saving your vital information.

    Note: This will make you lose all the Extensions and preferences.

    • Sites Web open is not recorded in less than 25 versions of Firefox.

    To reset Firefox, perform the following steps:

    1. Go to Firefox > help > troubleshooting information.
    2. Click on the button 'Reset Firefox'.
    3. Firefox will close and reset. After Firefox is finished, it will display a window with the imported information. Click Finish.
    4. Firefox opens with all the default settings applied.

    Information can be found in the article Firefox Refresh - reset the settings and Add-ons .

    This solve your problems? Please report to us!

    Thank you.

  • I can only open a new tab by clicking on an element to an already open tab and choose open in a new tab

    I can only open a new tab by clicking on an element to an already open tab and choose open in a new tab. Nothing else works for example file, new tab or by clicking the new tab to the right of the last tab.

    Uninstall the Ask Toolbar. It can cause this problem.

    If this does not resolve the problem:

    If this answer solved your problem, please click 'Solved It' next to this response when connected to the forum.

    Not related to your question, but...

    You may need to update some plug-ins. Check your plug-ins and update if necessary:

  • How to open a new tab by clicking the tab bar twice in firefox5?

    I used to open a new tab by clicking the tab bar twice in previous versions. I also want to put this feature in firefox 5.

    see you soon
    Asif

    Found. However by doing this, you will not be able to have the Firefox Orange button too.

    -> Tap ALT key or press F10 to display the Menu bar

    -> go to the Menu view-> toolbars-> select menu bar

    You don't need to set the button (+) tab on the tape tabs either. Check and tell if its working.

  • I can'r open a new tab by clicking on "Open new tab", I can open a new tab by clicking the mouse wheel while

    I to open a new tab by clicking on the + or "open new tab" in the drop down... I can open pages in a new tab by clicking right mouse wheel. I did not make changes to settings.

    Uninstall the Ask Toolbar to Ask published a fix for this problem

  • I want to learn Photoshop for t-shirt art... doesn't know ANYTHING!... And Adobe open a new tab, all clicks (I'm on a SurfacePro3 Ms... Help!

    I want to learn Photoshop for t-shirt art... doesn't know ANYTHING!... And Adobe open a new tab, all clicks (I'm on a SurfacePro3 Ms... HEL

    Why am I being asked to redeclare my problems?

    Photoshop is a professional application, so be prepared for a steep learning curve (or use a simpler application).

    Try the video tutorials online include an issue dedicated to TrainSimple.com or Lynda.com Photoshop (you can get a free 10 day trial).

    There are also a few books of excellent training, such as Photoshop's quick start Guides.

  • How to close this dialog box modal blocking and open a new one after a few minutes

    It's my method to display a modal dialog box:

    public static dialogue handleInactivityDialog (String msg, int [] values) {}
    Diálogo dialog = new dialog box (msg, new String() {"Yes", "No"}, values, 2, null);
    int i = dialogo.doModal ();
    If (I == 1) {}
    try {}
    do something
    Utils.popScreenForLogout ();
    } catch (Exception e) {}
    Utils.forceLogout ();
    }
    }
    return of diálogo;

    }

    After 3 minutes, this dialogue must be closed and should be opened a new. The new dialog box must be closed after 1 minute.

    I have no idea on how to do as DIalog.doModal () is a blocking operation.

    Thanks in advance!

    You can start a timertask before calling doModal, for example.

  • Cannot open a new file after working in PE13, file open the Organizer

    When you work in PE13 I can't open or save a file after a period of time. I am able to work on some photos and then I can't open a new or save all.

    Go in the editor preferences > general, click this button and restart the Editor:

  • Buttons - open the file - open in new screen

    I use the buttons to open a new PDF. Works fine, but the only problem is that the document will open in the same screen, and during the closure of this new document open, I lost my previous screen. I need to restart everything.

    What is the solution for this problem?

    I can change all the links using Acrobat X, because there you can make the choice. Problem is that when you re - generate a new PDF (modifications), you have to redo all the work.

    Luke

    (Indesign CS6)

    No, I guess that there must be a solution in Indesign. or not?

    I don't know how to do this in indesign, but there is also another option that you can try on Acrobat Edit menu > Preferences > Documents > setting open: unckeck open interdocument links in the same window

  • How to open a new tab after the current browsing session.

    I used to use the new King of the tab, and when I opened a new tab, it would still open the new tab the very right of my session, the gap and not somewhere randomly in the middle. However, I wanted my restored windows to open where I had closed my session. I've since changed to use the new tab more instead and it worked the same way before, but since I've updated for firefox 26, he seems to have reset this option (and others), it opens in the middle of the session now instead of the end.

    I don't know what you mean by the middle of the session.

    Do you mean in the middle of the bar tabs in the current window? There is a setting to make it open a link in a new tab adjacent to the page where you clicked on the link, or always at the end of the tab bar. If this is what you mean, here's how you can activate:

    (1) in a new tab, type or paste Subject: config in the address bar and press ENTER. Click on the button promising to be careful.

    (2) in the search above the list box, type or paste the tabs and make a pause so that the list is filtered

    (3) double-click the preference browser.tabs.insertRelatedAfterCurrent from true to false.

    But I'm not sure that's what you hear... also, extensions can replace Firefox built-in behaviors with their own settings tab.

  • How can I get a new window open, but slowly opened to full size after clicking on a main page link

    Transitions I mean are on this site. Discoloration in the window and click on the picture, which opens a new window, but slowly to full size.  http://ra1830.wix.com/qgd2012

    Thank you.

    The site you quoted uses a plug-in similar to "Lightbox". You can get it here: http://www.lokeshdhakar.com/projects/lightbox2/

  • DoubleClick opens a new site after about 60 seconds of delay, IE OK

    Especially a lot of time to download after clicking on links in Outlook Express

    Safe mode is entered (Maj/FF) and refreshed proposed such Firefoxed. The respons of doubleclick on seems normal now. Exit safe mode did not return the problem to the back.
    So, it seems that refreshing and cleaning resolved problem.
    Thank you very much

  • I want to open the background app after clicking the ok button in the alert illustrated?

    I have an application I have let down in the background.

    After awhile, I show an alert for help:

    synchronized(Application.getEventLock()){
                            UiEngine ui = Ui.getUiEngine();
                            Screen screen = new Dialog(Dialog.D_OK, "Alert!", Dialog.OK
                                                        , Bitmap.getPredefinedBitmap(Bitmap.EXCLAMATION), Manager.VERTICAL_SCROLL);
                            ui.pushGlobalScreen(screen, 1, UiEngine.GLOBAL_QUEUE);
    }
    

    After this code, I add this, but the background application opens instantly, no waiting user click on the ok button:

    UiApplication.getApplication().requestForeground();
    

    How can I take the app in the foreground after the user clicks the ok button?

    Seek to create a DialogClosedListener and make your first query in this plan.

  • Menu text freezes on the screen after clicking

    Hello!

    Whenever I click on an option in Photoshop CC, the menu button is frozen on the screen. I will attach a few pictures to better illustrate the problem.

    This is my screen after the opening and closing of a file. The respective part of the menu remains frozen on the screen:

    ps_cc_menu_freezes_1.jpg

    After clicking on a plugin button in the menu "filter":

    ps_cc_menu_freezes_2.jpg

    ps_cc_menu_freezes_3.jpg

    It happens every time on any button. The only way to erase the screen-ahem, the only way I know - is through the control panel screen resolution. I just have to go to a different resolution in both directions, and it works. The thing is, this bug will come back as soon as I use the menu, which is, thus, very often because I rely heavily on some plugins or actions with no shortcuts.

    I have Windows 7 64 bit, an ATI Radeon HD 6500 M graphics card and a Bamboo of Wacom tablet.

    I have to guess a video driver problem (upgrade from AMD site), or a utility program that mess with menu design and has a few bugs.

Maybe you are looking for

  • HP system event utility

    What is the HP System event utility and how to use it? http://h10025.www1.HP.com/ewfrf/wc/softwareDownloadIndex?softwareitem=ob-133065-1 & CC = UK & DLC = in & LC = in...

  • How can I remove icons of the screen of high office

    How can I remove icons from desktop screen?

  • read/write binary file in struct

    Hi all, I created a profile of struct defined as follows: typedef struct {profile name char [30];Electric float;Double frequency;Profile of struct * next; } I can write structures in a file, but I have to do that when you try to insert a struct, you

  • Update for Windows XP (KB971029) repeatedly fails to install

    Update for Windows XP (KB971029) repeatedly moved and I get the error: 0x80072EFD. Any help?

  • XPS - L702X 32-bit drivers necessary?

    Hello, anyone knows where to find the drivers at least networking, so I can update the window 7 ultimate in windows update... Reference Dell seems to think that eveyone wants to only 64-bit, and I don't have any software a lot of 32-bit software and