How to close a popup screen pushed as a global screen

I want to close a popup screen but my application is in background so

UiApplication.getUiApplication () .popScreen (getScreen ());

or

UiApplication.getUiApplication () .getActiveScreen () m:System.NET.Sockets.Socket.close ();

does not work is not something

same Ui.getUiEngine () .getActiveScreen () m:System.NET.Sockets.Socket.close () does not work...

in the popup screen, I have a custoListView (written own filed) there is an item when you click on an event

listner function is called by there, I have to close popup screen... my class is like that

SerializableAttribute public class SelectSms extends PopupScreen {}

private vector _data;

public boolean onClose() {}
try {}
Close();
Returns true;
} catch (Exception e) {}
Returns false;
}
}

public SelectSms() {}
Super (new VerticalFieldManager(), Field.FIELD_VCENTER);
_data = null;
_data = MessageStore.getMessage ();
last post [] message = Message [_data.size (new)];
MSGC [] CustomListField = null;
MSGC = new CustomListField [_data.size ()];
for (int i = 0; i)<>
message [i] = (Message) _data.elementAt (i);
MSGC [i] = new CustomListField (message [i] .getMSG_BODY (), message [i] .getMSG_NO (), and [i] .getMSG_STUS ());
last post mesg = message [i];
MSGC [i] .setChangeListener (new FieldChangeListener() {}
' Public Sub fieldChanged (field field, int context) {}
onClose();
}
});
Add (MSGC [i]);
}
can someone help me how to close the popup screen.
        
}
}

Place the UiApplication.popScreen () call in an executable object and pass this object to UiApplication.invokeLater ().

Tags: BlackBerry Developers

Similar Questions

  • How to close a popup by backing bean?

    How to close a popup by backing bean?
    StringBuilder script = new StringBuilder();
            FacesContext context =  FacesContext.getCurrentInstance();
                      script.append("var popup = AdfPage.PAGE.findComponent('").append().append("'); ")
                            .append("if (popup.isPopupVisible()) { ")
                            .append("popup.hide();}");
                      ExtendedRenderKitService erks =
                        Service.getService(context.getRenderKit(), ExtendedRenderKitService.class);
                        erks.addScript(context, script.toString());
    
  • How do I close the popup screen

    Hey, I opened a popup screen on the click of a menu item

    now, if the user presses the ESC key

    the pop-up screen should close

    I tried in a certain way, but does not work what to do

     protected boolean keyChar(char c, int status, int time)
            {
                 boolean retVal = false;
    
                if (c == Characters.ESCAPE)
                {
                    close();
                    UiApplication.getUiApplication().invokeLater(new Runnable()
                    {
                        public void run()
                        {
                            UiApplication.getUiApplication().popScreen(filter);
                            UiApplication.getUiApplication().popScreen(UiApplication.getUiApplication().getActiveScreen());//(filter);
                        }
                    });
                    retVal = super.keyChar(c,status,time);
    
                }
                return retVal;
            }
    

    kindly help what to do.

    the popup screen is blocked unless I click on a button on the pop-up screen for certain work

    What to do?

    Your pop-up screen should respond the the ESC key by calling the close() method.

    Override keyChar() in the pop-up screen, search for the ESC key and call close().

  • How to make a Popup screen

    I really need help. I can't find anything specifically about this in the forum. I am very new and everything on the forum talking about things that I don't even understand yet; As the resolution of problems.

    I want just a genius to help me do that. I want to click a button and have a smaller popup screen with more buttons of your choice. That's all. Please help someone.

    The tutorials already on the site (as pdf files) are not helping. She only gives a big piece of code without explanation. I really need to understand on this.

    Hi coilfyzx,

    To create your own popupscreen, you must extend the PopupScreen class to your class. And you must provide a handler delegate to this extended class to manage presentations.

    public class popupScreen extends PopupScreen implements FieldChangeListener {
          private ButtonField mOKButton,mCancelButton;
          popupScreen(){
    
              super(new VerticalFieldManager(NO_VERTICAL_SCROLL | USE_ALL_HEIGHT), PopupScreen.DEFAULT_CLOSE);
    //here verticalfieldmanager is the delegate manager
    
           HorizontalFieldManager hfm = new HorizontalFieldManager(FIELD_HCENTER);
    
            mOKButton = new ButtonField("OK", ButtonField.CONSUME_CLICK);
            mOKButton.setChangeListener(this);//this is to listen for button click event
            hfm.add(mOKButton);
            mCancelButton = new ButtonField("Cancel", ButtonField.CONSUME_CLICK);
            mCancelButton.setChangeListener(this);
            hfm.add(mCancelButton);
    
    // now you can add your buttons here.
    
          }
    /*FieldChangeListener is for button click event in the popupscreen. For this you should implement the method fieldChanged because FieldChangeListener is an interface */
    
    public void fieldChanged(Field field, int context) {
            if (mOKButton == field) {
                //do whatever you want
                close();
            }
            else if (mCancelButton == field) {
                close();
            }
    }
    //this is for back button on device, when click pop this popupscreen
    protected boolean keyChar(char key, int status, int time) {
            if (Keypad.KEY_ESCAPE == key) {
                this.close();
                return true;
            } else
                return super.keyChar(key, status, time);
        } 
    

    Sorry I forgot to add hfm their.

    push this screen like below

    popupScreen _popupScreen = new popupScreen();
    UiApplication.getUiApplication () .pushModalScreen (_popupScreen);

    Thank you & best regards

    pp

  • How to close the popup window after executing PL/SQL?

    Hello

    To see a junior question: we use APEX 5.0.2

    On a page of the modal dialog (of an interactive report), for the button create, I created a dynamic action that runs the specific code from PL/SQL to insert a new item.  Then behind the insert clause, I have the code to close the pop-up window, so that it executes successfully the insert clause without closing the window.  Please let me know what I can do.  Thank you.

    HTP.p ("< script > '");

    HTP.p ('window.opener.Location.Reload ();) Window.Close ();') ;

    HTP.p ("< /script >" ");

    Kind regards

    Jian

    OK, thanks for all your help and ideas. Finally, I gave up running JavaScript, instead, I created another dynamic action that closes the dialog box with a later sequence (for example, it runs after the PL/SQL code).  Now, it closes the windows properly after running pl/sql clause.  Although I still wonder how to run JavaScript because it doesn't do anything, even when I create a process to run javascript directly.

  • How to close a popup window progrmatically in backing bean

    Hello

    I use Jdeveloper 11 g, I have a requirement to close a pop-up window in backing bean after the selection of certain attributes in the pop-up window. Can someone share me the code to close the pop up window

    Thank you

    Hello

    See http://www.adftips.com/2010/10/adf-ui-popuputil-class-to-show-or-hide.html

    concerning
    Peter

  • Close popup screen programmatically

    I have a popup screen that I displayed to inform the user that they are wating on entry. When I try to close it in my earpiece method it gives the error:

    IllegalStateException - UiEngineImpl.assertHaveEventLock)

    I push the pop-up screen on the stack using a runnable.invokeAndWait and push as a ModalScreen because otherwise it will not show.

    What is the error of assertHaveEventLock for, and why the window display not using invokeLater and pushScreen?

    The IllegalStateException is thrown because the thread that calls the close method (the listener) is not the thread main event.  Calling the method close must occur in a block, as described on the next page.

    How - to upgrade a screen on the main event Thread
    Article number: DB-00136

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800256/...

  • How popup screen description on html?

    Location:

    After document. Write(), the application is stopped.

    Question:

    How popup screen description on html?

    You know that the following code is incorrect or other issues?

    Purpose:

    Display content on the screen.

    Minmum coding: (three methods are good to try, but fail)

    Method1

    function help() {}
    var myWindow = window.open (", 'Help', 'width = 600, height = 200');

    ...........stop here..........................
    myWindow.document.write(")

    To start

    ");
    myWindow.focus ();

    Methode2
    popup var = window.open (", 'Help', 'width = 600, height = 200');

    ...........stop here..........................
    var doc = popup.document;

    doc. Write(")

    To start

    ");
    }
    Method 3
    function help (id) {}

    var content = document.getElementById (id) .innerHTML;

    var generator = window.open (", 'name', 'height = 600, width = 200');

    ...........stop here..........................
    Generator.document.Write (')Popup');

    Generator.document.Write (')');

    Generator.document.Write (')

    This page

    ');

    Generator.document.writeln (content);

    Generator.document.Write (')');

    Generator.document.Close ();

    }

    If you know how to solve the problem, please let us know your suggestion or solution.

    Fight with the Playbook.

    Never (never never) use document.write. It can cause much more harm and confusion than good.

    If you want to display a dialog box that is customized with the text inside, the simplest is to use jQuery Mobile:

    http://jquerymobile.com/Demos/1.2.0-Beta.1/docs/pages/page-dialogs.html

    Otherwise, you can create your own by using a

    element with some custom CSS, like this

    HTML:

    this is my description

    CSS:

    .dialog {
       max-width: 30em;
       border: solid 0.25em black;
       background-color: #ddd;
       padding: 1em;
       display: inline;
       position: relative;
       left: 10em;
       top: 3em;
    }
    
  • How to recover data from an editable on a Popup screen field

    I have a popup screen that consist of two edit fields that contain the end and address of starting point. It seems that I can't recover the data that are filled in the fields. I would use the address to find the latitude and longitude in an attempt to invoke the map.

    CustomPopup screen = new CustomPopup(myAddress, data.getAddress());
         _controller.getUiApplication().pushModalScreen(screen);
    String newEndPoint = screen.getEndPoint();
    String newStartingPoint = screen.getStartingPoint();
    
     public CustomPopup(String sPoint, String ePoint)
        {
           super(new VerticalFieldManager());
    
           XYEdges thickPadding = new XYEdges(1,1,1,1);
    
           LabelField endDirection = new LabelField("End Point:");
             add(endDirection);
    
           EditField endPoint = new EditField("",ePoint.toString());
           Border eBorder = BorderFactory.createRoundedBorder(thickPadding, Border.STYLE_SOLID);
           endPoint.setBorder(eBorder);
           add(endPoint);
           add(new EditField(Field.NON_FOCUSABLE));
    
           LabelField startDirection = new LabelField("Start Point:");
             add(startDirection);
    
           EditField startingPoint = new EditField("",sPoint.toString());
           Border sBorder = BorderFactory.createRoundedBorder(thickPadding, Border.STYLE_SOLID);
           startingPoint.setBorder(sBorder);
           add(startingPoint);
           add(new EditField(Field.NON_FOCUSABLE));
    
           okButton = new ButtonField("OK", ButtonField.CONSUME_CLICK | Field.FIELD_HCENTER);
             okButton.setChangeListener(this);
             add(okButton);
    
        }
         public String getEndPoint()
         {
              if (endPoint == null) {
                  Dialog.alert("You must enter an Address!");
            }
            else
            {
                  return endPoint.getText();
            }
               return null;
         }
    
          public String getStartingPoint()
           {
               if (startingPoint != null) {
                   return startingPoint.getText();
    
              }
               return null;
           }
    
           public void fieldChanged(Field field, int context) {
               if (field == okButton) {
                   close();
              }
           }
    

    Hello

    Add the statement as startingPoint.setText (startingPoint.getText ()) and endPoint.setText (endPoint.getText ()) after creating the instance of starting point and the end point.  I think that this will solve your problem.

    -Roshn

    Press the button so resolute Bravo

  • How to close the pop-up screen with timer

    Hello

    How to close pop-up display with timer .assuming I want to close pop-up screen after 10 seconds please share code me complete.

    Hello

    See this sample program,

    import java.util.Timer;
    import java.util.TimerTask;
    
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.FieldChangeListener;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.component.LabelField;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.ui.container.PopupScreen;
    import net.rim.device.api.ui.container.VerticalFieldManager;
    
    public class Example extends UiApplication {
        public static void main(String[] args) {
            Example app = new Example();
            app.enterEventDispatcher();
        }
    
        public Example() {
            pushScreen(new ExampleScreen());
        }
    
        private class ExampleScreen extends MainScreen {
            public ExampleScreen() {
    
                ButtonField but = new ButtonField("Click",ButtonField.CONSUME_CLICK);
                but.setChangeListener(new FieldChangeListener() {
    
                    public void fieldChanged(Field field, int context)
                    {
                        UiApplication.getUiApplication().pushScreen(new exmplePopup());
    
                    }
                });
    
                add(but);
            }
        }
    
        private class exmplePopup extends PopupScreen
        {
    
            public exmplePopup()
            {
                super(new VerticalFieldManager());
                GuestPop p=new GuestPop();
                add(p);
            }
    
            public class GuestPop extends VerticalFieldManager
            {
                public GuestPop()
                {
                    add(new LabelField("Hi How r u"));
    
                    Timer timer  = new Timer();
                     timer.schedule(new CountDown(), 5000);
                }
    
            }
    
            private class CountDown extends TimerTask {
                public void run() {
                    UiApplication.getUiApplication().invokeLater(new Runnable() {
    
                        public void run() {
                            UiApplication.getUiApplication().popScreen(UiApplication.getUiApplication().getActiveScreen());
    
                        }
                    });
    
                }
            }
    
        }
    }
    

    Here, I've given 5 seconds.

    Thank you.

  • How to make a uiapplication closes not when you close the last screen

    By default, when you close the last screen will come out of the UiApplication, but I want what he requestBackground,

    example: If the last screen is the screen invokeapplication and close() is default, then how in the background?

    It is much easier to understand what you mean if you use the real java involved rather than trying to use the shortcut.  I copy your programs and paste it here too, so you don't get as typos:

    invkoeapplication

    that can confuse us mortals.

    It seems you are trying to call another Application is not your own.  Says Simon, if you don't 'own' Application/screen, you have no control over what he does.

    What I don't understand is that if you call the Messages application, then your Application must not be closed.  Is it?  What did you try to stop?

    It would be perhaps better if you explained exactly what you're trying to do, we are all aware, on what is the problem.

  • I'm working with Acrobat XI and when I try to add text to the geopdf file I get a popup screen that says it is a secure document and editing is not allowed. How can I fix it?

    I'm working with Acrobat XI and when I try to add text to a geopdf file I get a popup screen that says it is a secure document and editing is not allowed. How can I fix it?

    I thought about it... need to use the defined comment tool, not the set of editing tools.

  • How to close the parent page popup and refreshment with click of a button.

    With Aped 4.0, I created a window close popup with this process, I am able to close the popup window after submit. But how do I update the parent page before you close the pop-up window.

    He does ' t work like this, because above JavaScript three calls does not wait for the actions to perform
    Means once the function of the saveChanges method is called, it will run funtions all three with waiting for the first action to perform. This is not the right way.

    Instead, you can use a branch of the page with the guy like branch of PL/SQL procedure with the following code.

    And Point branch: on submit: calculation of before (before the calculation, Validation and treatment)

    Begin
    htp.p('');
    end;
    
  • How to close the task manager full screen?

    How to close the new task manager? There is no close button, just end task, switch or the new task. I want to talk about the program itself?

    Hello

    The Task Manager is running in tiny footprint mode - double-click on the border to return to full mode.

    Tabs in the Manager of tasks and Menu Bar missing or disappear
    http://www.mydigitallife.info/2009/01/17/Task-Manager-tabs-and-menu-bar-missing-or-disappear/

    Small footprint Mode
    http://www.howtogeek.com/wiki/Task_Manager#Tiny_Footprint_Mode

    How to switch between Normal Mode and small footprint in Vista and Windows 7 Task Manager
    http://www.Vistax64.com/tutorials/114377-Task-Manager-small-footprint-mode.html

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • How to prevent the popup dialog closes when you click the commandbutton

    Hello

    The application has a popup with the dialog box Cancel to display a table. Users could select the lines using a checkbox and click a CommandButton to backend processing.

    It displays a message (using addMessage) when he chose nothing.

    I would like to have the popup rest so the user could correct their action, but ADF automatically close the popup.

    Is there a way to avoid this?

    If I put the property AutoCancel to false, the popup rest (or rather re-posted), but the message window is hidden, which is defeat it purposes.

    I saw a discussion archived since 2008, but it doesn't have an answer, that's why I opened this thread.

    Kind regards.

    DjG

    Tried to set partialSubmit for af:button be true?

Maybe you are looking for