How to determine, which is click on the command button

Hello

I have the following code, which adds 3 buttons on the form. I wanted to perform actions when you click on these buttons. NavigationClick method below is fired when button is clicked. Impossible to determine exactly what IAM button that is clicked as I want to run different action for the different button click?

last class MainMenu extends form {}
ButtonField B1;
ButtonField B2;
ButtonField B3;

MainMenu()
{
       
setTitle (new LabelField ("UI Testing", LabelField.ELLIPSIS |)) LabelField.USE_ALL_WIDTH));
Add (new LabelField ("Welcome!"));
B1 = new ButtonField ("Screen 1");
B2 = new ButtonField ("Screen 2");
B3 = new ButtonField ("form 3");
       
VFM VerticalFieldManager = new VerticalFieldManager (Manager.VERTICAL_SCROLL);
VFM. Add (B1);
VFM. Add (B2);
VFM. Add (B3);
       
Add (VFM);
       
}

public boolean navigationClick (int status, int time)
{
If ((status & KeypadListener.STATUS_TRACKWHEEL) == KeypadListener.STATUS_TRACKWHEEL)
{
Dialog.Alert("1!");
Entry came on the wheel.
} else if ((status & KeypadListener.STATUS_FOUR_WAY) == KeypadListener.STATUS_FOUR_WAY) {}
Entry came from a four-way navigation entry-level camera
       
Dialog.Alert("2!");
}
Return super.navigationClick (status, time);
}
   
}
Thank you

Use this option.

B1.setChangeListener (new FieldChangeListener () {}

' Public Sub fieldChanged (field field, int context) {}

}

}

field.getIndex () will give you the field index.

Tags: BlackBerry Developers

Similar Questions

  • I want to refresh my page jsf click on the command button.

    Hi all

    I m using JDEV 11.1.2.1.0

    I created a page jsf with fragment I want to refresh my entire page during the click on the command button that is present in the page fragment. Besause I want to refresh some field but those that are present in the jsf page so I can't apply partial trigger because the property of the command button in the support page fragment bean class and the attribute I need to refresh its property in another class.


    Thank you.



    Rafat

    Check this http://adfandjdeveloper.blogspot.in/2011/07/adf-page-refresh-using-java-code.html

  • How to determine which hard drive makes the rattling?

    Sometimes I hear the hard drive makes clicking, get 4 hard drives and would like to know how to determine who makes clicking sounds.

    Does anyone have any suggestions?

    Thanks in advance for your suggestions

    Sunday, September 16, 2012 12:58:32 + 0000, oem7110 wrote:

    Sometimes I hear the hard drive makes the rattling

    Almost certainly an indication that a disc is a failure and should be
    replaced as soon as POSSIBLE.

    I get 4 hard drives and would like to know how to determine who makes clicking sounds.

    Does anyone have any suggestions?

    1. open the case and disconnect the power cables of all readers but
    C:, then run the computer for awhile. If we click, it is C: this is
    dying.

    2. then plug the power cable into a different drive and run it
    computer for a while. If you click on, it's that you reconnected
    who is dying.

    3, number 2 twice more if necessary to repeat.

    Ken Blake, Microsoft MVP

  • How remove < empty Menu > when click on the menu button?

    Hello

    In my makeMenu() application method, I use menu.deleteAll () to remove all of the default menus. If I run this code in 9530 (storm Simulator), it shows only to see the keyboard and button application menu, it's good.

    But if I run the code in other simulators it shows .

    Where the focus is anywhere in the screen, it shows the empty menu when I click on the menu button. I need to remove this also.

    What I want, if I click on the menu button, it should not show anything (means it should not show , but in the storm if I click on the menu button, it should show (show the keyboard application and switch).)

    It is anyway to solve this problem...?

    Thank you

    MINDUS

    You can use the DeviceInfo class to determine the model number of BlackBerry and then return false in your keyDown method.

  • Change the color of the command button or the color of the font on the button?


    Interactive reporting vs Hyperion 9

    Is it possible to change the color of the command buttons on command button fonts?

    (Note: I don't want to use text as a command buttons labels)

    Unfortunately not.  They never extend these properties for the command button.

    If you right click on the command button and select Properties, you will see that the tab police only you allows you to change the style, size and type of police.

    w

  • Question CP9: HTML5: Apple: Android: how to avoid the click on the Play button / tap?

    Hello

    Captivate 9.0.0.223: HTML5 draft.

    I'm sorry to ask this question, it's a little old chestnut on HTML5 in Apple iOS and Android.

    I have searched on the internet and forums for a solution underway, but could not find something that works.

    The problem is how to avoid the PLAY button, which forces the user to click / tap on it, when the project is accessible on an Apple or Android system.

    Play_icon.png

    The project will be published on the internet for use on any Windows, Apple or Android device.

    I have no control over the Web server or devices that will use the people, so that any changes to the software server or browser is out of the question.

    I have tried both a plain HTML5 and a responsive project, but neither avoid the Play button. I put an example of 1 slide on these links.

    http://www.hoffits.com/test_responsive/index.html

    http://www.hoffits.com/test_html5/index.html

    The bottom line is: ' is it possible to remove the need for the user to click / press the Play button?

    Thank you.

    Peter

    Cardiff

    In Wales

    UK

    In your normal HTML5, there is a line (I think it's 46) with this code:

    CP. DoCPInit();

    Add cp.movie.play (); Located below.

    so:

    CP. DoCPInit();

    CP. Movie.Play ();

  • Whenever I try to click on the "back" button or the scroll bar, I get a popup asking me stupid questions, i.e.: Customize the toolbar / return reload etc how can I disable this gene

    When I click on the "back" button or the scroll bar with my mouse, I get a popup asking if I want to customize my toolbar back/reload/open (scrolling) or in a new window? I'm then cannot clear the pop-up window. How can I remove/fix this very annoying problem. I spend a lot of time trying to remove these popups and they keep recurring. No fix for that. I can't seem to find one in the preferences, and I'm starting to hate this OS because of this. Help!

    Please post a screenshot that shows what you hear. Please do not include personal information.

    Start a reply to this message. Drag the image file in the editing window downloading. Alternatively, you can include text in the response.

  • I can't find a way to sort the records themselves in alphabetical order by name. I speak not in a display mode, but in how they appear when I click on the tab my favorites. Can someone explain to me how to do this.

    I have a lot of issues of brand book with websites contained in each folder. I'm able to sort sites within each folder alphabetically by name, but I can't find a way to sort the records themselves in alphabetical order by name. I speak not in a display mode, but in how they appear when I click on the tab my favorites. Can someone explain to me how to do other than manually by dragging because it is extremely difficult for me, due to the fact that I am with limited movement tetraplegic hand dexterity

    Folders of bookmarks you created are in the folder Menu bookmarks. "Sort" this folder.

    http://KB.mozillazine.org/Sorting_bookmarks_alphabetically

  • How can I clear the notifications from the notification Center while I can not click on the delete button?

    How can I clear the notifications from the notification Center while I can not click on the delete button? I have an iphone with ios 9.3 6

    WBY can't you click on the white circle with an X in it next to the notification?

  • By clicking with the right button on something, I accidentally stuck the pictures on a website - I want them back, but may not know how to do

    By clicking with the right button on something, I accidentally blocked the photos to a Web site - want their return but may not know how to do

    This has happened

    Don't know how many times

    == I right click on the images of block a site or something like that.

    Check the image exceptions: Tools > Options > content: Load Images: Exceptions - see the web content, pop-ups, fonts and language settings

    A way to see what images are blocked is to click on the favicon (Site ID icon) on the left side of the address bar and click the button "additional information".
    This will open the Security tab of the window of the Information Page (also accessible via Tools > Page Info).
    Go to the Media of this Page Info window tab.
    Select the first image and scroll though the list with the arrow pointing downwards.
    If an image in the list is grayed out and there is a check mark in the box of block Images of... remove this brand in order to unlock the images from this area.

    See also the problems that cause to not show images and http://kb.mozillazine.org/Images_or_animations_do_not_load

  • How to keep the input value after click on the back button being the ADF

    Hi expert,

    I have a case currently the adf:

    1. I put 'value' in the Label 1

    2. I click on the next button

    3. I click on the "back" button

    4. the 'value' went from 1 label.

    How to keep the 'value' of 1 tag after I click back, do you have any suggestions?

    Kind regards

    Ricky

    Hello

    Where you store the value? Try to store it in a variable pageFlowScope or a property of the pageFlowScope bean.

    value = "#{pageFlowScope.testVar} '"

    value = "#{pageFlowScope.testBean.testVar} '"

    Kind regards

    Ruben.

  • How can I get the InDesign startup window go away when no documents are open so I can see my office? Other then having to click on the red button at the top left.

    How can I get the InDesign startup window go away when no documents are open so I can see my office? Other then having to click on the red button at the top left.

    Hello Janet,.

    Your problem could be solved if you turn off YOUR Application framework in the window Menu.

    Go to window-> part of the Application.

    Kind regards

    Aditi Simard

  • How to show or hide the region of the shuttle during the click on the radio buttons?

    Hello

    I'm new to JDeveloper. Here is my requirement.

    1. create 2 radio buttons: Yes and no and default displays "" selected radio button.

    2. create a region of shuttle with select query in VO.

    Query is:

    Select 'No group' for_user, for_pkg double null

    Union

    Select "Company" for_user, for_pkg "SEGMENT1" double

    Union

    Select 'Rental' for_user, for_pkg 'SEGMENT2"double

    Union

    Select 'Cost center' for_user, 'SEGMENT4' double for_pkg

    Union

    Select 'Project' for_user, 'SEGMENT5' double for_pkg

    Union

    Select "Intercompany" for_user, "SEGMENT8" for_pkg of the double

    order by nulls first for_pkg

    3. initially hide the region of the shuttle during the loading of the page.

    4. click on the radio button 'yes', display area of the shuttle with values at the head of list of query VO and empty list leak.

    5. new click on the 'no' radio button, he must hide region and so screen shuttle shuttle dynamically according to the selected option button.

    But my problem is I am able to hide area shuttle when the page loads at the beginning and after that, when I'm clicking 'Yes' radio button, is just to display area shuttle empty without value in the main list and once when I'm clicking 'No' radio button, it should hide area shuttle but he's not hiding. I used the RPP to show or hide the area Shuttle under certain conditions. I use JDev 10.1.3.3.0 version as we Oracle EBS version 12.1.2 in our society.

    Please find the attached draft and suggest me proper with examples of sample approach.

    Monika,

    I tried to get this working in the lower version of Jdeveloper and looks like it works.

    Can you make the change below and see what happens.

    1. modify your query to VO as below: (I replaced null with SEGMENT0)

    select 'No Grouping' for_user, 'SEGMENT0' for_pkg from dual
    union
    select 'Company' for_user, 'SEGMENT1' for_pkg from dual
    union
    select 'Location' for_user, 'SEGMENT2' for_pkg from dual
    union
    select 'Cost Center' for_user, 'SEGMENT4' for_pkg from dual
    union
    select 'Project' for_user, 'SEGMENT5' for_pkg from dual
    union
    select 'Intercompany' for_user,'SEGMENT8' for_pkg from dual
    order by for_pkg
    

    2. place VO execution to the processFormRequest:

        public void processFormRequest(OAPageContext pageContext,
                                       OAWebBean webBean) {
            System.out.println("In process Form Request");
            super.processFormRequest(pageContext, webBean);
            OAApplicationModuleImpl appModule =
                (OAApplicationModuleImpl)pageContext.getApplicationModule(webBean);
            String eventParam = pageContext.getParameter(EVENT_PARAM);
            System.out.println("eventParam: " + eventParam);
            if ("showHideShuttle".equals(eventParam)) {
                //  appModule.invokeMethod("deletetrailing");
                System.out.println("Inside If");
                OAMessageCheckBoxBean messageCheckBoxBean = (OAMessageCheckBoxBean)webBean.findChildRecursive("checkBoxBean");
                System.out.println("messageCheckBoxBean : " + messageCheckBoxBean);
                String messageCheckBoxBeanVal = (String)messageCheckBoxBean.getValue(pageContext);
                System.out.println("messageCheckBoxBeanVal: " + messageCheckBoxBeanVal);
    
                if ("Y".equals(messageCheckBoxBeanVal)) {
                    OAViewObjectImpl shuttleVO1 =
                        (OAViewObjectImpl)appModule.findViewObject("ShuttleVO1");
                    if (shuttleVO1 != null) {
                        shuttleVO1.setWhereClause(null);
                        shuttleVO1.setWhereClauseParams(null);
                        shuttleVO1.executeQuery();
                        System.out.println("Executed Query : " + shuttleVO1.getQuery());
                    }
                    OAViewObjectImpl shuttleVO2 =
                        (OAViewObjectImpl)appModule.findViewObject("ShuttleVO2");
                    if (shuttleVO2 != null) {
                        shuttleVO2.setWhereClause("1=2");
                        shuttleVO2.setWhereClauseParams(null);
                        shuttleVO2.executeQuery();
                        System.out.println("Executed Query1 : " + shuttleVO2.getQuery());
                    }
                }
                String[] name = { "RenderAttr1" };
                String[] val = { messageCheckBoxBeanVal };
    
                Serializable[] params = { name, val };
                Class[] paramTypes = { String[].class, String[].class };
                appModule.invokeMethod("setXXCustomPVOValues", params, paramTypes);
    
            }
    
        }
    

    3. move Spel link shuttle Bean for the region of header above.

    Some useful links for the shuttle Bean:

    Technology blog based in Java of Sushant: 13. Area of application OFA shuttle

    Framework OA Blog: control of the shuttle as part of OSTEOARTHRITIS

    See you soon

    AJ

  • Why windows Explorer not stop on click with the right button on an entry

    When I try to right click (or remove a file by using the delete key) when, in windows Explorer, it freezes and says there is a problem, but no suggestion is provided as to what went wrong. I also have problems with Outlock with a similar problem and Excel when opening the start menu shortcuts! This means a new installation of Vista, or is this something easier than that?

    Hello

    1 how long you have been facing this problem?
    2. don't you make changes before the show?

    Method 1:
    Try to boot in safe mode and check if the problem persists.

    How to start in safe mode
    http://Windows.Microsoft.com/en-us/Windows-Vista/start-your-computer-in-safe-mode


    Method 2:
    I suggest you perform a clean boot and check:
    http://support.Microsoft.com/kb/929135
    Note:
    when the diagnostic is complete do not forget to reset the computer to a normal startup. Follow step 7 in the above article.

    Method 3:
    If this step does not help then you can perform a System File Checker on the computer and check if it works.

    Use the (SFC.exe) System File Checker tool to determine which file is causing the problem and then replace the file.  You can check the link:
    How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7
    http://support.Microsoft.com/kb/929833

    You can also check the link provided and check:
    Explorer Windows stopped working
    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-performance/Windows-Explorer-has-stopped-working/6ab02526-5071-4DCC-895F-d90202bad8b3

    Method 4:
    If you have problems with Outlook and excel I suggest you send the request in the forums of office and check:
    http://answers.Microsoft.com/en-us/Office

  • Middle by clicking on the 'go' button is no longer, opens a new tab.

    When you pasted a link in the address bar and middle-click on the 'go' button, it is used to open a new tab to the new address. Now, it only goes to the average current tab page - by clicking on the button refresh (without a new link) always opens in a new tab, however.

    Still works for me.

    Try Firefox SafeMode to see how it works there.

    A way of solving problems, which disables most of the modules.

    (If you use it, switch to the default theme).

    • You can open the mode without failure of Firefox 4.0 + by pressing the SHIFT key when you use the desktop Firefox or shortcut in the start menu.
    • Or use the Help menu option, click restart with the disabled... modules while Firefox is running.

    Do not choose anything at the moment, just use 'continue in safe mode.

    To exit safe mode of Firefox, simply close Firefox and wait a few seconds before using the shortcut of Firefox (without the Shift key) to open it again.

    If it's good in Firefox Safe mode, your problem is probably caused by an extension, and you need to understand that one.

    http://support.Mozilla.com/en-us/KB/troubleshooting+extensions+and+themes

    When find you what is causing that, please let us know. It might help others who have this problem.

Maybe you are looking for

  • Intel WiDi question with my Satellite L750

    Hello I bought the new WiFi module on ebay and Intel 7260 supports wifi 867Mbps (in theory) speed and Bluetooth 4.0. WiFi works perfectly but the problem is Bluetooth device is not listed in Device Manager, I tried to install the driver, but there is

  • Satellite L650 - 10 d - cannot install a graphics driver

    Hello I just spend most of the day trying to get this laptop to use the appropriate resolution. History:The HARD drive failed and I had to get a new one. I downloaded Windows 7 Home Premium and everything installed from scratch on a new HARD drive. T

  • Do I need Mcfee security on my ipad

    Ive had an email telling me that my McFee is exhausted, do I need this on my ipad

  • internet no wireless connection

    I had to do a system recovery, the other day. Everything's fine now except 1 thing. I'm in a place where the wireless network does not work very well, so I took the wire internet connection on a desktop and put it in my laptop to the internet. Nothin

  • Cannot get device HP PRINTER DESKJET 3745 software

    UNABLE TO DOWNLOAD THE SOFTWARE FOR THIS PRINTER, ERROR READS NO SOFTWARE. EVEN through CD NOT to ACCEPT because THAT primary is XP. THANKS TO THE LINE WE DO NOT GET THE SOFTWARE FOR THIS PRINTER Thank you SETURAMAN