How to open a new window from submit button &dialog page in current window?

We have a requirement, wherein we have a OAF search page for PO lines with search criteria, Go button to search ,result region (table layout) and a submit button(Create new expedite).
1. Now user can select some lines from result region and click on Submit button.
2. On click of submit button we need to pop up a window or may be a dialog page asking that " Do you want open supplier web link portal or not?".
3. If user clicks yes(in Dialog page) then first fetch the URL from a look up maintained in Oracle EBS on the basis of supplier of the lines selected and then open that URL in a new window and side by side we need to open a dialog page in search page asking "whether user has updated the expedite info in supplier portal or not?". On basis of this we need to updated some count in custom tables.
So in step 3 i am facing problem, that how to open an URL in a new window through a submit button and side by side want to open a dialog page in the current window also.
Hope a quick response from you all.
Note:- To open a custom page we can have a link or button(button of type button and not submit button) on base page with destination url property as following javascript:
javascript:var a = window.open('OA.jsp?page=/XXX/oracle/apps/xxx/......&retainAM=Y', 'a','height=500,width=900,status=yes,toolbar=no,menubar=no,location=no'); a.focus();
So the question is how to do the same for submit button on OAF page???

Antriksh,
You just need to attach a submit action in button bean and not submit button bean, based on the output of confirm type of alert in javascript.
Here is code u need to put in destination url of the button:
//replace <confirm message> by message you want to show.
javascript:input=confirm('<confirm message>');if(input==true){submitForm('DefaultFormName',0,{XXX:' abc'});}" Now in the process request of the base page CO, u can get parametre 'XXX' from the pagecontext....so
if((("abc").equals(pageContext.getParameter("XXX"))))
{/// custom LOGIC }
The same i have replied in your mail. I hope this resolves the issue.
--Mukul

Similar Messages

  • How do I close window on opening a new one from a button on the first window

    I want to close my existing window when opening a new one. I
    have used
    a roll-over from Fireworks and the page is created using
    Macromedia
    Dreamweaver. I'd like to close the page that I am coming from
    and open
    a new one in its place.
    Thanks for looking.
    authorblue

    how to use iTunes to sync is in the
    http://www.apple.com/support/itunes
    For MacBook Pro community and OS X
    MacBook Pro
    https://discussions.apple.com/community/notebooks/macbook_pro 
    https://discussions.apple.com/community/mac_os?view=discussions
    http://www.apple.com/support/macbookpro
    While it isn't as easy to just use a Mac iDevice as media storage as Android and Windows, you can add documents and such like Word, PDF and others manually in iTunes to have them sync as well.
    http://support.apple.com/kb/HT1386
    http://support.apple.com/kb/HT1351
    They are all there searchable from Bing, Google or every Mac product has a support page.
    http://www.apple.com/support/

  • How to open a new browser from applet

    I have a Applet that run in a browser. How I can open the second broswer from the Applet. Make sure the first browser for Applet is still existing. Thanks anybody help!!

    I think you might do something like this:
    try {
    getAppletContext().showDocument(new URL("http://web.com", "_blank");
    } catch (MalformedURLException me) {
    System.out.println(me.getMessage());
    Hope this work out for you...
    /Tomas

  • Opening a new form from a button places it behind the calling form.

    From the sales order form clicking a schedule button opens up a new non modal window . On this window I need to add a new button to open a new form(SOO.fmb) .
    I tried using the FND_FORM.EXECUTE function, the new form opens but it is positioned behind the sales order form. I tried using call_form , even this positions the new form behind the sales order form.
    How do I open the new form as the active form ?
    thanks
    satya

    Please clarify what you are talking about. Is this an Oracle Applications (i.e. E-Business) form or is this a form/application you created? What product versions are you using? Do not provide product names like 10g, 11g, etc. Please provide product versions.
    That said, if you are opening new form or browsers using WEB.SHOW_DOCUMENT, there is a known Sun bug which causes this problem when using the Sun JRE 1.6.0_xx. This issue can be worked around by disabling the JRE setting "Enable the next generation Java Plugin...". This setting is found on the Advanced tab of the JRE Control Panel under "Java Plugin". This bug is expected to be fixed in Sun 1.6.0_18. This version is not available to the public at this time.

  • How to open a new window from the login window?

    hi,
    can someone tell me how to open a new window from an existing window, here by window i mean frame. The case is i hv two java files - oracle.java and FDoptions.java. The first frame is in the Login.java. The oracle.java file has a button "Login", when it is clicked, i want to open the next frame which is in the file FDoptions.java. Can some one help me with this? I m giving the code below -
    oracle.java
    import java.awt.BorderLayout;
    import java.awt.FlowLayout;
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import javax.swing.AbstractAction;
    import javax.swing.BorderFactory;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JPasswordField;
    import javax.swing.JTextField;
    * The application's main frame.
    public class oracle {
        private JFrame frame;
        private JPanel logInPanel;
        private JButton clearButton;
        private JButton logInButton;
        private JButton newuserButton;
        private JButton forgotpasswordButton;
        private JTextField userNameTextField;
        private JPasswordField passwordTextField;
        public oracle() {
            initComponents();
        private final void initComponents() {
            JLabel userNameLabel = new JLabel("User name: ");
            JLabel passwordLabel = new JLabel("Password: ");
            userNameTextField = new JTextField();
            passwordTextField = new JPasswordField();
            JPanel userInputPanel = new JPanel(new GridLayout(2, 2, 5, 5));
            userInputPanel.setBorder(BorderFactory.createEmptyBorder(10, 20, 10, 20));
            userInputPanel.add(userNameLabel);
            userInputPanel.add(userNameTextField);
            userInputPanel.add(passwordLabel);
            userInputPanel.add(passwordTextField);
            logInButton = new JButton(new LogInAction());
            clearButton = new JButton(new ClearAction());
            newuserButton = new JButton(new NewUserAction());
            forgotpasswordButton = new JButton(new ForgotPassword());
            JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
            JPanel buttonPanel1 = new JPanel(new FlowLayout(FlowLayout.RIGHT));
            buttonPanel.add(logInButton);
            buttonPanel.add(clearButton);
            buttonPanel1.add(newuserButton);
            buttonPanel1.add(forgotpasswordButton);
            logInPanel = new JPanel(new BorderLayout());
            logInPanel.add(userInputPanel, BorderLayout.NORTH);
            logInPanel.add(buttonPanel, BorderLayout.CENTER);
            logInPanel.add(buttonPanel1,BorderLayout.SOUTH);
            frame = new JFrame("FD Tracker");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setSize(500, 500);
            frame.setContentPane(logInPanel);
            frame.pack();
            frame.setVisible(true);
        private void performLogIn() {
            // Log in the user
            System.out.println("Username: " + userNameTextField.getText());
            char[] password = passwordTextField.getPassword();
            System.out.print("Password: ");
            for(char c : password) {
                System.out.print(c);
            System.out.println();
        private void performClear() {
            // Clear the panel
            System.out.println("Clearing the panel");
            userNameTextField.setText("");
            passwordTextField.setText("");
        private final class LogInAction extends AbstractAction {
            public LogInAction() {
                super("Log in");
            @Override
            public void actionPerformed(ActionEvent e) {
                performLogIn();
        private final class ClearAction extends AbstractAction {
            public ClearAction() {
                super("Clear");
            @Override
            public void actionPerformed(ActionEvent e) {
                performClear();
        private final class NewUserAction extends AbstractAction{
             public NewUserAction(){
                 super("New User");
             @Override
             public void actionPerformed(ActionEvent e){
                 JFrame newuser = new JFrame("NewUser");
        private final class ForgotPassword extends AbstractAction{
            public ForgotPassword(){
                super("Forgot Password");
            @Override
            public void actionPerformed(ActionEvent e){
                JFrame forgotpassword = new JFrame("Forgot Password");
        public static void main(String args[]) {
            new oracle();
         FDoptions.java
    import java.awt.FlowLayout;
    import java.awt.BorderLayout;
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import javax.swing.AbstractAction;
    import javax.swing.BorderFactory;
    import javax.swing.JPanel;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    public class Fdoptions{
        private JFrame fdoptions;
        private JPanel fdoptpanel;
        private JButton enterfdbutton;
        private JButton viewfdbutton;
        public Fdoptions() {
            initComponents();
        private final void initComponents(){
            fdoptpanel = new JPanel(new BorderLayout());
            fdoptpanel.setBorder(BorderFactory.createEmptyBorder(80,50,80,50));
            enterfdbutton = new JButton(new EnterFDAction());
            viewfdbutton = new JButton(new ViewFDAction());
           JPanel enterbuttonpanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
           JPanel viewbuttonpanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
            enterbuttonpanel.add(enterfdbutton);
            viewbuttonpanel.add(viewfdbutton);
            fdoptpanel.add(enterbuttonpanel,BorderLayout.NORTH);
            fdoptpanel.add(viewbuttonpanel,BorderLayout.SOUTH);
            fdoptions = new JFrame("FD Options");
            fdoptions.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            fdoptions.setSize(1000,1000);
            fdoptions.setContentPane(fdoptpanel);
            fdoptions.pack();
            fdoptions.setVisible(true);
        private void performEnter(){
        private void performView(){
        private final class EnterFDAction extends AbstractAction{
            public EnterFDAction(){
                super("Enter new FD");
            public void actionPerformed(ActionEvent e){
                performEnter();
        private final class ViewFDAction extends AbstractAction{
            public ViewFDAction(){
                super("View an existing FD");
            public void actionPerformed(ActionEvent e){
                performView();
        public static void main(String args[]){
            new Fdoptions();
    }

    nice day,
    these lines..., despite the fact that this example is about something else, shows you two ways
    1/ modal JDialog
    2/ two JFrame
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    * Parent Modal Dialog. When in modal mode, this dialog
    * will block inputs to the "parent Window" but will
    * allow events to other components
    * @see javax.swing.JDialog
    public class PMDialog extends JDialog {
        private static final long serialVersionUID = 1L;
        protected boolean modal = false;
        private WindowAdapter parentWindowListener;
        private Window owner;
        private JFrame blockedFrame = new JFrame("No blocked frame");
        private JFrame noBlockedFrame = new JFrame("Blocked Frame");
        public PMDialog() {
            noBlockedFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            noBlockedFrame.getContentPane().add(new JButton(new AbstractAction("Test button") {
                private static final long serialVersionUID = 1L;
                @Override
                public void actionPerformed(ActionEvent evt) {
                    System.out.println("Non blocked button pushed");
                    blockedFrame.setVisible(true);
                    noBlockedFrame.setVisible(false);
            noBlockedFrame.setSize(200, 200);
            noBlockedFrame.setVisible(true);
            blockedFrame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
            blockedFrame.getContentPane().add(new JButton(new AbstractAction("Test Button") {
                private static final long serialVersionUID = 1L;
                @Override
                public void actionPerformed(ActionEvent evt) {
                    final PMDialog pmd = new PMDialog(blockedFrame, "Partial Modal Dialog", true);
                    pmd.setSize(200, 100);
                    pmd.setLocationRelativeTo(blockedFrame);
                    pmd.getContentPane().add(new JButton(new AbstractAction("Test button") {
                        private static final long serialVersionUID = 1L;
                        @Override
                        public void actionPerformed(ActionEvent evt) {
                            System.out.println("Blocked button pushed");
                            pmd.setVisible(false);
                            blockedFrame.setVisible(false);
                            noBlockedFrame.setVisible(true);
                    pmd.setVisible(true);
                    System.out.println("Returned from Dialog");
            blockedFrame.setSize(200, 200);
            blockedFrame.setLocation(300, 0);
            blockedFrame.setVisible(false);
        public PMDialog(Dialog parent, String title, boolean isModal) {
            super(parent, title, false);
            initDialog(parent, title, isModal);
        public PMDialog(Frame parent, String title, boolean isModal) {
            super(parent, title, false);
            initDialog(parent, title, isModal);
        private void initDialog(Window parent, String title, boolean isModal) {
            owner = parent;
            modal = isModal;
            parentWindowListener = new WindowAdapter() {
                @Override
                public void windowActivated(WindowEvent e) {
                    if (isVisible()) {
                        System.out.println("Dialog.getFocusBack()");
                        getFocusBack();
        private void getFocusBack() {
            Toolkit.getDefaultToolkit().beep();
            super.setVisible(false);
            super.pack();
            super.setLocationRelativeTo(owner);
            super.setVisible(true);
            //super.toFront();
        @Override
        public void dispose() {
            owner.setEnabled(true);
            owner.setFocusableWindowState(true);
            super.dispose();
        @Override
        @SuppressWarnings("deprecation")
        public void hide() {
            owner.setEnabled(true);
            owner.setFocusableWindowState(true);
            super.hide();
        @Override
        public void setVisible(boolean visible) {
            boolean blockParent = (visible && modal);
            owner.setEnabled(!blockParent);
            owner.setFocusableWindowState(!blockParent);
            super.setVisible(visible);
            if (blockParent) {
                System.out.println("Adding listener to parent ...");
                owner.addWindowListener(parentWindowListener);
                try {
                    if (SwingUtilities.isEventDispatchThread()) {
                        System.out.println("EventDispatchThread");
                        EventQueue theQueue = getToolkit().getSystemEventQueue();
                        while (isVisible()) {
                            AWTEvent event = theQueue.getNextEvent();
                            Object src = event.getSource();
                            if (event instanceof ActiveEvent) {
                                ((ActiveEvent) event).dispatch();
                            } else if (src instanceof Component) {
                                ((Component) src).dispatchEvent(event);
                    } else {
                        System.out.println("OUTSIDE EventDispatchThread");
                        synchronized (getTreeLock()) {
                            while (isVisible()) {
                                try {
                                    getTreeLock().wait();
                                } catch (InterruptedException e) {
                                    break;
                } catch (Exception ex) {
                    ex.printStackTrace();
                    System.out.println("Error from EDT ... : " + ex);
            } else {
                System.out.println("Removing listener from parent ...");
                owner.removeWindowListener(parentWindowListener);
                owner.setEnabled(true);
                owner.setFocusableWindowState(true);
        @Override
        public void setModal(boolean modal) {
            this.modal = modal;
        public static void main(String args[]) {
            new PMDialog();
    }

  • When I choose to open a new tab from a website, such as facebook, it always opens it in a new window. How do I change this to just opening a new tab. I tried changing the tab settings but it did not work

    When I choose to open a new tab from a website, such as facebook, it always opens it in a new window. How do I change this to just opening a new tab. I tried changing the tab settings but it did not work. I did not have the problem until I started using firefox 4.

    It is probably a JavaScript link.
    You can probably force it where you want it with a keyboard shortcut
    either "Ctrl+click" or "Ctrl+Shift+click". see
    * Firefox and other Browser Keyboard Shortcuts (Comparison Table)<br>http://dmcritchie.mvps.org/firefox/keyboard.htm
    ''Did that work?''
    Some styles that provide a warning as to the type of link:
    * No Follow links, mouseover id of other links - userstyles.org<br>http://userstyles.org/styles/10987
    * Change cursor on some links with JS. - userstyles.org<br>http://userstyles.org/styles/233
    * Link Warning - Themes and Skins for Mozilla - userstyles.org<br>http://userstyles.org/styles/1301
    * Link warning (cursor hover) - various filetypes - userstyles.org<br>http://userstyles.org/styles/2538
    * Red hand cursor for .pdf links - userstyles.org<br>http://userstyles.org/styles/553

  • How do you open a new document from the template chooser?

    Hi There,
    Since upgrading to Yosemite, I can't find the option to open a new document from the template chooser. When I type in "template" in the help box it shows it under "file" But when I click on "File" I don't see that option.
    Basically, I'm trying to ask how do you access the templates in the new pages?
    Thanks so much

    Check your preferences and make sure Show Template Chooser is selected:
    Then just choose New from the File menu.

  • How do I open a new tab from address line?

    How do I open a new tab from address line?

    You Will have to hold down the Alt key and press Enter to make the link open in a new tab without using an extension.
    By default links always open in the same tab.
    You can search the Add-ons website for an extension if you want to change this default behavior.

  • How to open attachments in email from windows users

    How to open attachments in email from windows users.

    That would be totally dependent on what type of file has been sent. What is the windows user sending to you?

  • How to create a new connection from SAPGUI to Test drive?

    Hi,
    I have installed Sap Netweaver Test drive on a linux virtual machine (windows host). The installation was successful and I was able to start the instance (application server and the database), yet I don't know how to create a new connection from my SAPGUI client (7.20) to this server. The static IP address of the server is 192.168.1.160.
    I entered the following values for my new connection entry
    Description: SAP Netweaver
    Application server: 192.168.1.160
    Instance number: 01
    System ID: DB2
    SAProuter: /H/192.168.1.160/S/3201/H/
    But it does not work. Any idea about the values needed  for creating a new entry?
    Thanks in advance,
    Dariyoosh

    >
    Dibya R Das wrote:
    > Why are you entering a router string? Can't you reach a box directly from your machine?
    >
    > Doesn't a ping to that host & a "telnet <host/ip address> 3201" work from your machine to the SAP System.
    >
    > Remove the router string you wont need if the above works.
    >
    > - Regards, Dibya
    Hello there,
    Thank you very much for your answer which solved my problem. In fact there was no need of providing router string.
    Kind Regards,
    Dariyoosh

  • How to display a new view from a nib ?

    how to
    display a new view from a nib in the main window after clicking on a button.
    When I click a the button named for example "goToGokyo", the link to my procedure
    runs correctly because I see my NSLog message "goToGokyo button pressed".
    My nib, which name is "GokyoViewController" does exist.
    I did as follow for the moment but I'm stuck now, my nib  :
    - (IBAction)goToGokyo:(id)sender
        NSLog(@"goToGokyo button pressed");
      //[self stopSound];
      if (gokyoViewController == nil)
            GokyoViewController *aGokyoViewController = [[GokyoViewController alloc]
                                                         initWithNibName:@"GokyoViewController" bundle:nil];
            self.gokyoViewController = aGokyoViewController;
            //[aGokyoViewController release];
        [self GokyoView:gokyoViewController animated:YES completion: nil];
    Thanks in advance for your advice.
    Cheers

    I did that now :
    - (IBAction)btnLoadMyViewController:(id)sender
        NSViewController *viewController = [[NSViewController alloc] initWithNibName:@"MyView" bundle:nil];
        NSView *view = [viewController view];
        [_myWindowController.window setContentView:view];
        //view addSubview:view];
        //[self.myView addSubview:view];
    Using
    "_myWindowController.window setContentView:view];"
    or
    "[self.myView addSubview:view];"
    does not an error but does nothing !
    Would you help me one more times please ?
    Thanks in advance

  • How to open a new tab in case of exception in one tab

    I have created a custome exception class which extends JBP EXCEPTION class..
    ANd I am fetching data by calling procedure in my app module.If i have any exception in my db call i am throwing cusatom exception .
    Oo UI level I am using dynamic shell and in case of exception i am able to see the exception on the page fragment.But when i try to open a new tab
    I am not able to open or i should say i am not able to perform any action after the exception...
    SO just wanted to knwo what can be done in this case?
    Can i remove the exception some how? Or is there any other way that even we have an exception on one tab i can move to next tab?

    After further looking inti this issue i found that this scenario occurs if i have an error in my first tab.
    FOr example
    I have 3 tabs - I opened first tab ,opened second and click on submit on second page an exception occurs .. I am able to open a third tab ...
    I have 3 tabs I opened first tab click on submit an exception occurs now i will not be able to open any other tab ... now i will not able to do anything in the application.
    Any idea??

  • How to open in new tab in safari?

    Hi
    I'm trying to open link in a new tab by clicking Command + trackpad_click, but nothing happenes. While opening via "Open in new tab" from context menu - nothing happenes also. LInk is highlighted, but not opened.
    Any ideas?
    Thank you

    http://support.apple.com/kb/PH11921
    Note: If you deselect “⌘-click opens a link in a new tab” in Safari Tabs preferences, the Command (⌘) key shortcuts open new windows instead of tabs.

  • Create or open a new browser from a servlet

    Hi everybody(sorry my english is so terrible), i have one problem .It`s possible to create ,instance or open a new browser from a servlet without javascript?.

    Hi everybody(sorry my english is so terrible), i have
    one problem .It`s possible to create ,instance or
    open a new browser from a servlet without javascript?.Well, sorta. You have to create a link with a target to "_blank" that the user clicks on. For example:
    Some Page
    will open somePage.jsp in a new browser window. There would be no way, other then js to do it automatically (and often those are blocked, now-a-days with pop-up blockers), flash (can be blocked as well, requires a plugin to use, costs money to get the developement kit), or an applet (java program embeded in web page, requires a plugin, can be blocked). Or some other client-side script/application. (ie servlets run on the server so they can't interact with the client's computer. You need something on the client's computer to do the job).

  • How to open an new Garageband file in Garageband '09?

    How to open an new Garageband file in Garageband '09?

    GarageBand iPad Song files can only be opened on the desktop with GarageBand 11 or later.
    Hope that helps
    Edgar Rothermich
    http://DingDingMusic.com/Manuals/
    'I may receive some form of compensation, financial or otherwise, from my recommendation or link.'

Maybe you are looking for