Click event of ListField Probem with the navagationClick

Hello

I want to capture the envent of click on a listField.

in my screen, I had other compents as ButtonFields and RadioButtonFields.

I capture events of these elements.

to capture the click on the ListField event, I first tried this solution:

Click on a file in the list ltDossier *.
protected boolean navigationClick (int status, int time) {}
if(Status == KeypadListener.STATUS_FOUR_WAY) {}
int iselected = ltDossier.getSelectedIndex ();
                
Selected string = (String) myCallback.get (ltDossier, ltDossier.getSelectedIndex ());
csDossier ocsDossier = new csDossier();
ocsDossier = vectDossier.elementAt (iselected) (csDossier);
int id = Integer.parseInt (ocsDossier.Id);
                
If (id! = 0)
{
Dialog.Alert ("file selected:" + id);
}
on the other
{
Dialog.Alert ("no file selected");
}
}
Returns true;
}

My probem is that this works well if the Listfield is the only component on my screen.

so, I tried this alternative:

FieldChangeListener listenerltDossier = new FieldChangeListener() {}
' Public Sub fieldChanged (field field, int context) {}
TODO self-generating method stub
Dialog.Alert ("click on listenerltDossier");
}
};

ltDossier.setChangeListener (listenerltDossier);

But it does not work.

Can someone help me please?

I found this solution:

protected Boolean navigationClick (int status, int time) { If(status == KeypadListener.STATUS_FOUR_WAY)}

{

if (rbTous.isFocus ())

{

rbTous.setSelected (true);

rbSelected = rbgFiltre.getSelectedIndex ();

}else If(rbTraites.isFocus ()) {}

rbTraites.setSelected (true);

rbSelected = rbgFiltre.getSelectedIndex () ;}

else if (rbATraiter.isFocus ()) {

rbATraiter.setSelected (true);

rbSelected = rbgFiltre.getSelectedIndex ();

}

else if (btRefresh.isFocus ()) {

switch (rbSelected) {

case 0: pushScreen (new ExpertiseScreen (0));

Close();

Init_ltDossier (0);

Break;

case 1(ushScreen)

new ExpertiseScreen (1));

Close();

Init_ltDossier (1);

Break;

case 2(ushScreen)

new ExpertiseScreen (2));

Close();

Init_ltDossier (2);

Break;

}

}else If(ltDossier.getSelectedIndex ()! = - 1) {Dialog.alert ("index =" + ltDossier.getSelectedIndex ());}

}

}

return true;

}

It seems to work.

Tags: BlackBerry Developers

Similar Questions

  • Event gateway to communicate with the ports series

    I'm not so familiar with event gateways so sorry if I ask a question wrong. Can we use event gateways to communicate with the serial ports? Thank you.

    Can we use event gateways to communicate with the serial ports?
    N ° at least, not directly. Serial ports are physical, material, while ports dealing with event gateways are virtual, software.

    The event gateway is simply the code that listens to events in a Coldfusion application. He then responds accordingly. For example, the event Socket gateway is the code that listens on a TCP - IP port, then sends or receives messages via TCP - IP protocol.

  • ListField interferes with the State

    So I have a listfield on the bottom of my screen and a status which is a toolbar that I did.

    I have the earpiece to the listfield:

    protected boolean touchEvent(TouchEvent event) {
            int x = event.getX(1);
            int y = event.getY(1);
            if (event.getEvent() == TouchEvent.CLICK && done == true) {
                // Check if a list item is selected.
                if (lf.getSelectedIndex() > -1 && lf.getExtent().contains(x, y)) {
                    _uiapp.pushScreen(new SearchInfoScreen());           }
            }
            else {
                return false;
            }
            return true;
        }
    

    However, when I click on the status (toolbar in the State), it goes to the screen to search for information. Can someone tell me a possible solution?

    Had a problem with the earpiece of the toolbar.

  • Probems with the record time on the TDS3014C

    Hello

    I use a tektronic TDS3014C brought to acquire data from an AC supply.  I played with the single channel waveform acquire VI examples and added a "wirte to file the measure" puck.  "I would like to record a stream of waveform for 5 seconds and write this file, but if I try to enter a ' times a record" greater than 100 ms data is beginning to break down.  I know that I can acquire only given 10000 point using this material, but is there a limit to the length of a continuous acquisition?

    Trent

    Hi ErgonTW,

    After reviewing your chart I think that the configuration is correct. However, your chart is only show four milliseconds of data. You need to change the x-axis of your chart to show the entire waveform. Do double-click le.004 on the x axis and the abandoned.2 then click anywhere on the front panel. This will change the values.

    Perry S.

  • I click on "Fix a problem with the NVIDIA graphics driver" and he says: "this solution could not be downloaded.

    I click on solve PC problems (the flag) and it says address a problem with the NVIDIA graphics driver. I click it and it says:

    This solution could not be downloaded

    --------------------------------------------------------------------------------

    The most likely causes:
    Your computer was unable to download the solution at this time. Make sure that your computer is connected to the Internet and then try to download the solution later.

    --------------------------------------------------------------------------------
     
    I am connected to internet, and the works, works etc of web browsing of windows update. Why it is not downloading the solution?

    Download and install the latest driver for your graphics card nVidia.

  • Shift-click to create straight lines with the Brush tool is no longer works in 2015 CC

    Hello!

    I feel a maddening thing I can't explain, maybe a bug or a dark environment?

    If I use the pencil tool, I can click on the same spot on the canvas, then releases, then hold SHIFT key and click in another location on the canvas to create a straight line between the two points. This is expected behavior, and Photoshop has done this for years, as long as I can remember.

    Until recently, the same has worked with the Brush tool. Since the upgrade to 2015 CC, however, shift-click on demand exactly as if I was clicking simply - he draws another full brush, but without a straight line connecting the two clicks. Weird.


    Everyone knows the same behavior? (CC and Yosemite are completely up to date.)


    Best,

    Jason

    Image%202015-08-04%20at%201.04.07%20PM.png

    (this little test of the brush is also to express my emotional state right now.)    : |

    Spacing stops on this special brush?

  • I can't right click to block ads/images with the browser Firefox 4 'new '.

    Older versions of Firefox you could block images and ads by clicking and using the characteristic 'blocking of the image' this function disappeared with Firefox 4?

    It has been removed from the context menu, because people were accidentally blocking the images. You can always block images, but there is an additional step to be taken. Right-click on an image that you want to block and select "View Image Info". This will open a dialog box that contains an option to block images of the area that the image came from.

  • Follow an event in a graph with the mouse cursor 3D

    I'm trying to track events in a 3-d Surface chart. I need track the mouse down and mouse up on top of the slider. Mouse works fine, but when I drag the cursor and let, mouse event does not get the subject of a follow-up, and I have to click the mouse button once to catch the mouse event. Any suggestions?


  • Click event does not work for the first choice of object field index

    Hello

    In my application, there is a ObjectChoiceField inMainScreen

    I want to get change Listner of ObjectChoiceField after clicking on index 0. When I am clicking on the second element of the choice field, I am able to move to another screen. But for the first selection of the element, it does not move on the screen.

    if(field == mOcfVehicle)
                {
                    Logger.out("MyProf", "vehicle choice field touched ");
                    int index = mOcfVehicle.getSelectedIndex();
                    Vector vecVID = store.getVehicleID("VehicleID");
                    final String strVehId = vecVID.elementAt(index).toString();
                    UiApplication.getUiApplication().invokeLater(new Runnable() {
    
                        public void run() {
                            // TODO Auto-generated method stub
                            UiApplication.getUiApplication().popScreen(MyProfScreen.this);
                            UiApplication.getUiApplication().pushScreen(new AddNewCarScreen(1, strVehId));
                        }
                    });
    //
                }
    

    Please help me...

    Here it happens little differently. I explain the requirement properly. Suppose that the I am A screen where I have the ObjectChoiceField. I added a choice of X. Now, when I am pressing on the field of choice and selection, it must pass on the screen (B) but that the choice of the field is choice (X) only one, it is not mobile. Now if, after the addition of the choice of two X and Y, if I select go, it's going to screen B. But when again, the field of choice has 2 options X and Y with X as the default selection. There is therefore no chance for me to choose the X.

    Therefore, I have added a Select called default choice. Now, if X is added, field of choice is the choice of towing display: Select and X. And while choosing X, it moves on the screen B.

    Hopefully now, it is good for understanding.

    And can help me please to this: http://supportforums.blackberry.com/t5/Java-Development/How-to-on-the-Camera-Flash-for-a-long-time-l...

    Thank you.

  • Satellite click on Mini - something wrong with the system

    No idea how even specify what is wrong with this system. Here goes:

    About to go to bed. Set it up to reset (a common practice every two/three months). Everything is connected. Single screen unplugged the keyboard and laid on the floor, all thin connections, any reboots to 21% when I go to bed.

    Since then, nothing. Laptop does not turn on. Connect a charger and I see the screen casual flash tells me that both batteries are absolutely free of charge in them either. Repeatedly kept fresh in two, three, four days at a time. None other than the screen occasional flash.

    Almost as if there is nothing to charge up, nothing to the accusation. Something happened then that it has been reset. I'm completely exasperated as well. I think only a completely uneducated about this, is that for some reason, he stopped restarts. Essentially leaving the cell empty.

    Any ideas, anyone? Little broken hereby to be honest...

    Thanks for the replies.

    Make you average rather than restart Reset? A reboot is just a reboot of the machine.

  • Probems with the service for all users of Windows Installer Agent is not able to run

    Day 2 after the installation of Windows 8 on my desktop PC, all the user accounts with a standard profile are unable to connect. However, my admin account can connect and I get a message saying that the 'Agent Windows all users install' does not work so why accounts no administrator cannot connect.

    I restarted the service but she turns for a few seconds and ends without a message. Several attempts to restart it have failed.
    Is this a problem with Windows 8?

    I just found out that I must be an ADMINISTRATOR to do. Thanks much for the reply

  • Double-click event does not tire/triggered by double clicking on the left side of the tree node

    I have the following tree of Flex

    <mx:Tree id="Tree" left="0" right="0" top="0" bottom="0"
            
    alternatingItemColors="[#EEEEEE, white]" dataProvider="{lsEspecie}"
            
    dragEnabled="true" dragMoveEnabled="true" dropEnabled="true" labelField="item"
            
    labelFunction="tree_labelFunc" showRoot="false"
            
    doubleClickEnabled="true" doubleClick="Tree_DoubleClick(event)">
    </mx:Tree> 

    When I double click on the ICON and to the right of the side on any node, double-click event is triggered as expected. But when clicking on any part of the left side of the node double click is not triggered

    DoubleClickNotFiring.png

    Is there a way to make the double click event fire when happens on the left side of the node?

    The problem has been resolved with this class of FixedTree

    import flash.display.InteractiveObject;
    import flash.events.Event;

    import mx.controls.Tree;
    import mx.core.mx_internal;

    use namespace mx_internal;

    public class FixedTree extends Tree {

    public function FixedTree() {
          super();
       }

    override protected function createChildren():void {
          super.createChildren();

    getListContentHolder().selectionLayer.addEventListener(Event.ADDED, selectionLayerChildAddedHandler);
       }

    private function selectionLayerChildAddedHandler(e:Event):void {
          // ListBase:5790 creates a SpriteAsset for the selectionLayer but does not set mouseEnabled to false

    InteractiveObject(e.target).mouseEnabled = false;
       }

    }

  • reversal, and then click event with swapping of images

    Dear people,

    I am looking for a simple way to solve my problem. I want to have a passage of the mouse and - effect on my bar of navigation, as well as on the click event, it should stay in the mouseover state. So far the mouseout/mouseouthandler() and the click event affect eachother on a wrong track. The example that I have attached here is done with plain rectangles, but later, they will be the images. So I guess that changes in css does not help me.

    I tried to understand some old threads here in the community, but they have reached a level of coding that isn't mine so far.

    MyStatusQuo: http://intern.ixtract.de/_3MFkJRIOOfbNZR

    I hope for your help and thanks in advance!

    It's very easy

    Just put your codes click between If like your mouseover and mouseout/mouseouthandler()

    sample for press 1 > click on

    If (WB! = 1) {}

    Buttons.Reset ();

    sym.getSymbol("btn1").$("back").css ({"background-color": "#ffbb0f"})

    sym.getSymbol("btn1").$("Text").css ({"color": "#000000"})

    sym.getSymbol("btn1").$("Text").html ("Clicked")

    WB = 1;

    }

    Zaxist

  • Image with enabled set to false still receives click events

    I have a simple image with a click event and the button is set to enabled = false and it still receives click events. Does anyone know how to disable the image if it receives no click events. I want only the image to send a click on some points, then the other event not to do... Thanks to all those who can help

    I didn't think allowed aims to control the actual events - rather the native behavior resulting from events. My suggestion is that you either remove the headphones when you don't want to see the clicks, or place the code in the listener that runs the effect selectively.

    If you want you could simply encapsulate your headset with a test for the license:

    private void handleImageClick(event:MouseEvent):void {}
    If ((event.currentTarget_as_InteractiveObject).enabled) {}
    ... Things //Your here
    }
    }

    It will run only then the code when the image is selected.

    If you want to have the image as the button, you can extend it and save a listener in the constructor for the click event. Inside the listener, if not enabled, call event.stopImmedatePropogation ().

    Tim

  • When I click on a link, it opens 2 tabs with the same window

    I am trying to open a link from a Web site. When I click on it, 2 tablets with the same site open. It is only on a few links. How can I solve this problem?

    I realized what happened. There was a little problem on the page that did appear twice, like a mirror. Makes things come several times. I managed to fix it. Thank you!

Maybe you are looking for

  • With the help of blogspot on iPhone

    I have an iPhone with OS update 5. I created a blog with blogspot, but when I try to use it in safari on my iPhone I get a message that the browser is not supported. On the list of supported browsers is safari 4 or better. But according to the settin

  • Motorcycle display dark hours ago?

    When I got my Z days, I had the display option in the application of the bike to set the "dark hours". After installation of the last updated system & applications update, I can't find the option more. If it has been deleted? I was looking forward to

  • Link HP - mouse 5 battery replacement

    I've had my link HP - 5 mouse for over a year now and it started to freeze frequently so I thought that I should change the batteries. Got the box out and looked at the paperwork, and there is no instructions on how to change the batteries. I had to

  • is PC Cleaner Pro a good program for cleaning (fixing) my PC problems?

    PC Cleaner PRO from the East a good program of cleaning (fixing) my PC problems? An analysis by PC CLEANER PRO has detected problems 47 134.

  • T500 with Windows 7 Enterprise (x 64) Ricoh drive/SD card randomly disappears

    I got a T500 (2082-5XU) running Windows 7 Enterprise (64-bit) with 4 GB of RAM. I have been using a 8 GB SDHC card into the Reader/slot for card SD Ricoh as a ReadyBoost drive. Recently, I noticed that the SDHC card will disappear at random from the