ButtonField focus in events management problem

Hi all

I have this button that starts a background thread to do something of your time. When I push the button and run the wire the focus is lost. Somehow the focus of the button is restored after the background thread is completed.

Here is a code snippet:

ButtonField button = new ButtonField("start");
button.setChangeListener(new FieldChangeListener() {
    public void fieldChanged(Field field, int context) {
        startProcess();
    }
});

private void startProcess() {
    new Thread(new Runnable() {
        public void run() {
            // do stuff
        }
    }).start();
}

Why the button loses focus when a background thread runs?

Thank you!

Try to instantiate your button with... New ButtonField("start",ButtonField.CONSUME_CLICK);...

Tags: BlackBerry Developers

Similar Questions

  • Update scheduled task orchestration event custom password manager problem

    Hello experts,

    I'm trying to run a custom on-demand updating the user password in IOM 11.1.1.5

    Taken into account in the file input stream, there are 5 users
    TSTUSR1
    TSTUSR2
    TSTUSR3
    TSTUSR4
    TSTUSR5

    Problem that I face is when the update of password change fails for a user and for future users also obtain failed. Say to TSTUSR3 change the password has failed for some reason any (take the example user does not exist) then TSTUSR4 and TSTUSR5 also it is failed.

    Note: here the changepassword to TSTUSR4 and TSTUSR5 is get called but I get an orchestration event manager exception like below.

    < 9 March 2012 06:26:12 THIS > < WARNING > < oracle.iam.platform.kernel.impl > < IAM-00 80002 > < Orchestration validation failed on the event handler - the password change operation failed >.
    Exception occurred during password change
    oracle.iam.identity.exception.UserManagerException: the password change operatio n failed.
    at oracle.iam.identity.usermgmt.impl.UserManagerImpl.changePassword (user ManagerImpl.java:3024)
    at oracle.iam.identity.usermgmt.impl.UserManagerImpl.changePassword (user ManagerImpl.java:2959)
    at oracle.iam.identity.usermgmt.api.UserManagerEJB.changePasswordx (exercise wn Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl. java: 39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAcces sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJo inpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMetho dInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMetho dInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntrodu ctionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntrodu ctionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMetho dInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisit orImpl.visit(MethodInvocationVisitorImpl.java:37)
    at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.c allback(EnvironmentInterceptorCallbackImpl.java:54)
    at com.bea.core.repackaged.springframework.jee.spi.EnvironmentIntercepto r.invoke(EnvironmentInterceptor.java:50)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMetho dInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocat ionInterceptor.invoke(ExposeInvocationInterceptor.java:89)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMetho dInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntrodu ctionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntrodu ctionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMetho dInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopPr oxy.invoke(JdkDynamicAopProxy.java:204)
    to $Proxy331.changePasswordx (Unknown Source)
    at oracle.iam.identity.usermgmt.api.UserManager_nimav7_UserManagerRemote Impl.__WL_invoke (unknown Source)
    to weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke (its sionRemoteMethodInvoker.java:40)
    at oracle.iam.identity.usermgmt.api.UserManager_nimav7_UserManagerRemote Impl.changePasswordx (unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl. java: 39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAcces sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke (distance BusinessIntfProxy.java:85)
    to $Proxy195.changePasswordx (Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl. java: 39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAcces sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti on(AopUtils.java:307)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke (JdkDynami cAopProxy.java:198)
    to $Proxy328.changePasswordx (Unknown Source)
    oracle.iam.identity.usermgmt.api.UserManagerDelegate.changePassword (U're Source)


    And here is the code snippet I use
    ####################

    Try
    {
    CsvReader fileName = new CsvReader (actualPath);
    fileName.readHeaders ();

    While (fileName.readRecord ()) {}

    Try
    {

    String username = fileName.get("USR_LOGIN").toUpperCase ();
    Password String = fileName.get ("USR_PASSWORD");

    If (! isNullOrEmpty (username) & &! isNullOrEmpty (password))
    {
    userAPI.changePassword (username, password.toCharArray (), true);
    }
    on the other
    {
    System.out.println ("file is empty");
    Err.Add (FileName.getRawRecord ());
    }
    } catch (Exception e) {}
    Err.Add (FileName.getRawRecord ());
    System.out.println ("Exception occurred during password change");
    e.printStackTrace ();
    System.out.println ("continues with the next record");
    }
    }

    catch (Exception e) {}
    e.printStackTrace ();
    }

    ####################

    Your entry to most early would be useful.

    Thank you
    DK

    Published by: 875142 on March 8, 2012 22:56
  • Edit event managed by this case in LabVIEW 2013 does not show the specifiers of the event, Event Sources and events on screen resolution 800 x 600

    Edit event managed by this case in LabVIEW 2013 shows not specifiers of the event, Event Sources and events on screen resolution 800 x 600.

    As far as I know, the list of supported resolutions is determined solely by the graphics card. It is possible that one used by the PC supports only 800 x 600 as maximum resolution, even if you plug an external monitor.

    Like Dennis suggested, the recommended option would probably be to develop on another PC and only deploy an executable for the industrial PC. That's what we do with our systems (although not because of this problem, but because it makes sense. There absolutely no need to have the IDE installed in most of our systems).

    Other options:

    1. See if you can get an update of the driver from the manufacturer to solve this problem.
    2. Plug a USB Monitor with its own driver.
    3. Try to hide the taskbar and make the smaller title bar in the hope that the bug manifests.
    4. Try remote access in the PC. I think that some remote access programs allow you to specify custom resolutions that are not affected by the original drivers. Remote Desktop seems to be a likely this option even if it has been awhile since I've used it.
    5. Check the BIOS. I saw at least one industrial PC where there was some settings in the BIOS to control the resolution, but I don't remember the details, and it was quite limited. I think that in this case, you can change the resolution, but then the image does not fill the entire screen.
  • How to control the Focus in landscape Manager.

    Hi friends,

    I have a small doubt to control focus on the Manager.

    in my third-party application, I add two fields at Horizontalmanager and that the Manager (Manager level) to the Manager of the vertical. so when I scroll first means down development is the first field to the entire screen. next time, I scrolled to the top of the bottom, then the focus is on the last field. here what I want is from bottom to top that will focus on the first field not a last field. How to do this.

    Please help me friends.

    Thanks in advance.

    Thank you simon_hain,

    Are finally corrected this problem.

    Here I'm just my managers onFocus method substitution.

    TO

    super.onFocus (1);

  • Cisco integrated event handler problem

    Hello Experts,

    I took the following sample EEM

    https://learningnetwork.Cisco.com/blogs/network-Sheriff/2009/06/19/writing-your-first-EEM-applet

    The intention is to send a notification to an email address on a network problem. I modified it bit as illustration. You will see that there are various show commands.

    Can someone show me please how to send show rather commands simply by adding them to the directory called "server_unreachable"?

    TechWiseTV4506 (config) #eve

    (_email_server 172.16.1.44) NT Manager environment<-my post="" cast="">

    TechWiseTV4506 (config) #event Manager environment _email_to [email protected] / * /

    TechWiseTV4506 (config) #event Manager environment _email_from [email protected] / * /

    Event Manager applet email_server_unreachable

    Event track 10 down state

    message from syslog to action 1.0 "Houston we have a problem. Ping failed, inaccessible Server! »

    command action 1.1 cli 'enable '.

    Action 1.2 cli command "del/force flash: server_unreachable.

    action 1.3 cli command "display the clock | Add server_unreachable.

    action 1.4 cli command "show ip arp 172.16.1.55 | Add server_unreachable.

    action 1.5 cli command "show ip route 172.16.1.55 | Add server_unreachable.

    action 1.6 cli command "show interface FastEthernet0/1/1 | Add server_unreachable.

    action 1.7 cli command "flash: server_unreachable more»

    Action 1.8 mail server "$_email_server" to "$_email_to" of "$_email_from" subject "inaccessible server: ICMP-echo has no" body "$_cli_result»

    Action 1.9 msg syslog "Server unavailable alert has been sent to the mail server!

    See you soon

    Carlton

    This cmdlet will actually results by e-mail.  However, in order to get all of the whole output, it uses the file server_unreachable as a buffer from the accumulator.  This file could be deleted as an action 2.0:

    Action 2.0 cli command "remove/force flash: server_unreachable.

    But it is already there in action 1.2, so it is not really necessary.

    What will happen, this is the applet will be more the file to collect all of the production.  This aggregate output is stored in the variable of _cli_result $.  The result is that the body of your email will contain the result of the consolidated order.

  • Event management issues

    Hi guys...

    I do a code of event management and am having some problems. I have placed the following on the scene, a button to send including the instance name is 'btnSubmit' and a label whose instance name is "lblTest. The ActionScript 3 code resides in a separate file of "Maxwell.as". In the "Maxwell.FLA".

    file, I typed "Maxwell" in the document class properties. Here is my AS3 code:

    package
    {

    import flash.display.Sprite;
    import flash.events.MouseEvent;

    SerializableAttribute public class Maxwell extends Sprite
    {

    public void Maxwell()
    {
    the constructor code
    }

    private void sendMsg(e:MouseEvent):void
    {
    lblTest.text = "Clicked".

    }

    btnSubmit.addEventListener (MouseEvent.CLICK, sendmsg(2));

    }

    When I do a "CTRL + ENTER" and run the program I get the following errors:

    Access of undefined property btnSubmit.

    Access of undefined property sendmsg(2).

    I don't understand why I get these errors. I already connected the two files by typing "Maxwell" in the

    document class window and "sendmsg(2)" is also the name of a function. I hope someone can advise me. Thank you.

    Your add the listener code is outside any function - you can do that with classes. You can put it in the constructor:

    package
    {

    import flash.display.Sprite;
    import flash.events.MouseEvent;

    SerializableAttribute public class Maxwell extends Sprite
    {

    public void Maxwell()
    {
    the constructor code

    btnSubmit.addEventListener (MouseEvent.CLICK, sendmsg(2));
    }

    private void sendMsg(e:MouseEvent):void
    {
    lblTest.text = "Clicked".

    }

    }

  • Click of the mouse on the chart without event management

    Is there a way to detect the mouse click on a chart without event management? My version of LabVIEW database has no events management features.

    Thank you

    Ryan

    Sweet justice.  Because you were a guy standing, my scorn is now much closer to 90/10.  They should really sign make an acknowledgement that you know what you get.  I don't think it's unreasonable to expect basic functionality, and IMO event Structures are pretty basic.  This is why I'm not in marketing.

    Time of experience.  It may be while you are unable to change the structure of the event, maybe you can run code that contains and edit around them.  Here, I use a structure of the event to a mouse event down to the chart.  Normally, I'd put the code inside the occurrence of the event, but maybe you can not change the inside.  Instead, I pass a boolean that is true when the mouse down event fired and pass out the XY coords as well.  You can do something within a structure separated from cases as I show.

    I would like to know if it works.

  • Popup list event management

    Could someone list popup work? I tried to add one to my request and I was able to get the list to come but could not do the work of event management. The code between any events management function. Can someone please take a look at this code and see what is missing?

    Thank you

    Hi, Maxim,.

    his was discussed before any stretching of the BaseDialog is an error with the DialogEvent of management class. Use the following code to correct your mistake. It should do the job:

    Replace:

    popUp.addEventListener(DialogEvent.DIALOG_BUTTON_CLICKED, repeatButtonClicked);
    

    With:

    popUp.addEventListener(Event.SELECT, repeatButtonClicked);
    

    your function to retrieve the event will look like this:

    public function repeatButtonClicked(e:Event):void
    {
        trace("Selected Index of Button: " + e.target.selectedIndex);
    }
    

    that should do the trick. Here's the forum thread, you can check for more information:

    http://supportforums.BlackBerry.com/T5/Tablet-OS-SDK-for-Adobe-Air/strange-dialog-behaviour/m-p/6681...

    hope that helps. Good luck!

  • Anyone know a good event management tool that integrates well with Eloqua?

    Anyone know a good event management tool that integrates well with Eloqua?  The tool would deal with everything associated with the event as: management agenda, registration, monitoring, reports, etc., but integrated with Eloqua in a way that allows you to trigger emails to confirmations, reminders and thank you and facilitates the exchange of information of contact/participant and campaign.    Think of something as integration between Eventbrite and Eloqua (although we are not looking at Eventbrite specifically).

    Any suggestions?

    Hi Kurt -.

    We've been Cvent users for two years and it integrates very well with Elouqa. If you have any specific questions, feel free to give me a shout - I manages all our events and am happy to give feedback.

    See you soon,.

    Laura

  • Neophyte color management problems

    Neophyte color management problem:

    Image rendered PS colors do not match monitor or images rendered with other applications.

    Recall facts: using MacBook Pro retina with NVIDIA GeForce GT M 750 (calibrated in sRGB with ColorMunki Display software), OSX 10.95, PS CS5 and new external NEC PA272 (material calibrated to native with calibrator Spectraview II & NEC gamut) connected with the mini-displayport cable. Although slightly different due to different Mac and NEC display gammuts, a sample JPEG on Mac seems somewhat near NEC as desktop BG on respective monitors images and seen with the OSX Preview app on a monitor. AND the same image in PS when the image PS window is MOVED to NEC, is STILL, UNTIL the mouse is released. Then the image in the PS on NEC image window moves with a glance off the coast of colors. I am aware that the Mac display is sRGB and the NEC a range wide screen, and that this image of the example is a JPEG to sRGB, but I wanted an image that would be displayed on two monitors, with different applications, including the Psalm but it's the same thing when the main PSD used to create the JPEG format is loaded in PS then MOVED over to the NEC. Tried to play with management PS colors and corresponding attempt to different

    Profiles, but no luck. Tried the General searches on Google, but I'm lost. Any suggestions where to start to fix this problem? Thank you!

    The standard behavior in a multi-screen configuration is that Photoshop uses other operating system display profile offers upward so that the display - up to what the image window crosses the line to halfway between them. Then he goes to use the other profile.

    The shift-on-drop thing indicates a video card problem. That's how OpenGL works in Photoshop, when you drag an OpenGL image is temporarily suspended, and then snaps back on when you file.

    So I would try to disable the GPU in the PS preferences or set it to the basic mode. This shifts all display color to the CPU. Then wait for the next update of video driver from Apple.

  • Link Block event management

    Is it possible to block the event Manager is so that if the user clicks on a link, nothing happens? I want to validate links and offer the ability to create internal links that navigate in the application, but no matter what are the parameters of the event listener for the event click on the textFlow can pass it always tells the browser to access the location of the link.

    Thanks in advance.

    I discovered that there is a way to do it. If you listen to the CLICK event, and then manipulate yourself and call preventDefault() on the event, there will be no default handling of the connection (that is, it will not bring up the browser).

    So in your event handler, where you listen to the LinkElement MouseEvent.CLICK, add something like this:

    If (event.type is MouseEvent.CLICK)

    {

    ... your handling goes here...
    Event.preventDefault ();

    }

    Sorry I didn't see this before. I hope that helps!

    -robin

  • Need help with event handler Code - does in Manager event Manager

    Hello

    Here is the code snippet that I use to create an event handler:

    ///////////////////////////////////////////////////////////////


    package com.oracle.events;

    import com.thortech.util.logging.Logger;
    import com.thortech.xl.client.events.tcBaseEvent;
    import com.thortech.xl.dataobj.tcDataObj;
    import com.thortech.xl.util.logging.LoggerModules;

    public class tcCheckOvrallProvStatusUDFs extends tcBaseEvent
    {
    private static Logger logger = Logger.getLogger (LoggerModules.XL_JAVA_CLIENT);

    public tcCheckOvrallProvStatusUDFs()
    {
    setEventName ("generation tcCheckOvrallProvStatusUDFs");
    }

    /**
    * @Override
    * @throws exception
    */

    protected void implementation() throws Exception {}
    data tcDataObj = getDataObject();

    String OIDProvStatus = data.getString ("usr_udf_oidusrprovstatus");
    String EBSProvStatus = data.getString ("usr_udf_ebstcausrprovstatus");

    If (OIDProvStatus.equals ("Provisioned") & & EBSProvStatus.equals ("Provisioned")) {}
    setOverAllProvStatus (data);
    }
    }

    /***
    *
    @param data
    * @throws exception
    */
    Private Sub setOverAllProvStatus(tcDataObj data) throws Exception
    {
    data.setString ("usr_udf_ovrrscprovstatus", "put into service");
    }

    }

    ///////////////////////////////////////////////////////////////



    Its a simple code that I use to fill the value of a UDF field according to the value of the remaining 2 fields. I want to trigger the events it after insertion and subsequent update.
    But even if I restart the server of the IOM after having placed the file compiled successfully (0 error, 0 warnings) in the EventHandlers's OIM_HOME folder. It does not appear in the Console Design-> developer tools-> definition of business-> event Manager Manager rule. :( I need this file appears in the search for adapters/event handlers to create an event handler. This JAR file doesn't show up there.

    Is there something missing in the code?
    What else must be specified?

    Please provide some guidance.

    Thank you
    -jhb.

    Create a variable username you adapter, go to the list of Variable in the adapter and click Add. Do set during execution.

    Once the adapter of the entity is created and you put this device in the data object manager ==>.click on Attach pre users insert and save.

    Go to the tab cards card, here, you can select your adapter and double click on the variable User ID and map it to entity field - USR_LOGIN.

    Thank you
    Suren

  • On a chart or an area of events management

    Hi all
    Is it possible to do event manages on a table or on a region? For example, I traced a 2d graph if I click on any part of the chart I need to see other tables. Is this possible to event management? Do I need to write code in java script? Pointers to this will be a great help

    Thanks in advance

    Hello

    as you can find in the documentation: graphical http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/app_comp.htm#BCEIJJID queries have a special syntax.
    The first parameter of the request (which is usually ZERO) can also be a link to a page (syntax see here: http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/concept.htm#BEIJCIAG).
    So when a user clicks on a bar of your chart it will be redirected to the page given by the link.

    As far as I understood that this should do what you wanted.

    Best regards, Tine.

    Published by: WTine on 15.02.2010 16:13

  • Click management problem in the controls created dynamically events

    I'm creating the ObjectListField loop i-e (CustomObjectListField class is extended by the ObjectListField to customize its behavior) but the problem is that only by clicking the list no. 5 is managed other lists click handling is not manipulated thr id mylist2...

    CustomObjectListField mylist2;

    for (int i = 0; i)<>

    {

    mylist2 = new CustomObjectListField();

    }

    and click on manage using method...

    protected boolean navigationClick (int status, int time)
    {

    if(Field==mylist2)
    {/ / implementation of a feature}

    }

    }

    pls help

    Hello Shaina

    Your code is not so clear. I don't know why you're my differrrent creaing objects and passing them to the same reference. The last (the 5th list) one will be that which makes reference. In your method of navigation click you compare the rating with mylist2 that contains the reference to the list 5, it's why you have found the events for 5th list only.

    You must create an array of objectListfield, assign values to it and then use part of this comparison table.

    CustomObjectListField mylist2 [] = new CustomObjectListField [5];

    for (int i = 0; i)<>

    {

    mylist2 [i] = new CustomObjectListField();

    }

    and click on manage using method...

    protected boolean navigationClick (int status, int time)
    {

    if(Field==mylist2[0])
    {/ / implementation of a feature}

    }

    if(Field==mylist2[1])
    {/ / implementation of a feature}

    }

    if(Field==mylist2[2])
    {/ / implementation of a feature}

    }

    .

    .

    .

    .

    .

    }

    It may be useful

    Thanks Pierre

  • Problem of scope for the event Manager

    Hello. I am fairly new to the ACE and I'm having some trouble presentation event handler of the scope. I tried searching the forums, but it doesn't seem to be any discussions on this particular problem. I'm trying to dynamically define event handlers onRelease for video clips created in an onLoad handler attached to an XML object. Unfortunately, when the onRelease functions are called, the variables seem to have passed out of range (I get "" as value). I have attached the code below. If anyone has any suggestions, it would be greatly appreciated.

    Thank you!
    -------

    ["NavMviClp" + i] nameNavClip has no way to know that it is the i - th movieclip, unless you store a value from somewhere I (what is salvageable) before the loop increments for.

    Try:

Maybe you are looking for