How to open a new window by clicking the string in the text field ?

Hi
is it possible to do this ?
Some string value is retrieved from database and it is placed in the text field. [ done with this part ]
i have to provide link to that string to open a new window. [ yet to do ]
Please help me in this.
Note : if this is not possible , give me some other idea to do this.
-Arun

whether this is useful ?
I am using string field here.
public StringField(java.lang.String name,
java.lang.Object listener,
java.lang.String callback,
java.lang.String value)Constructs a StringField
Parameters:
name - Name of field
listener - Listener to update
callback - Callback of listener
value - Value of field
-Arun

Similar Messages

  • How to open a new window on click of a button, for printing stuffs in adf

    Hi ADF Experts,
    Jdeveloper 11.1.1.7.0 version.
    I am having a Print Button. On click of this I want to open a new window? how is it possible. Note it should not be a popup or panelwindow.
    Please suggest.
    Thanks,
    Roy

    Check out Frank's article http://www.oracle.com/technetwork/developer-tools/adf/learnmore/95-printable-pages-1501392.pdf which come with a sample at http://www.oracle.com/technetwork/developer-tools/adf/learnmore/95-printable-pages-1501393.zip
    Timo

  • 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();
    }

  • Nautilus doesn't open a new window when clicked

    For a while now, I have been experiencing an annoying issue.
    Whenever I open Nautilus either by clicking the icon in the drawer (example: http://i.imgur.com/uZc3n7S.png) or by hitting "Super" (the Windows key) and typing nautilus+enter, Nautilus doesn't create a new window anymore. Instead, it just shows "Files" in the top bar, as seen here: http://i.imgur.com/Ho2nJhv.png
    I can open a Nautilus window by clicking on the "Files" item in the top bar and clicking "New Window", as seen here: http://i.imgur.com/7IrWqvr.png
    Also, whenever my desktop is focused, the "Files" item is visible in the top bar. In the drawer, the Nautilus icon is always highlighted as well. This leads me to believe that GNOME thinks Nautilus is already open, while it is not.
    Note that I have enabled my desktop to be managed by Nautilus, so I can have icons on my desktop. I'm not sure, but if I recall correctly, this problem started ever since the one time I ran gnome-settings-daemon manually, to test if a certain bug still exists.
    Has anyone experienced a similar issue? How could I track down why this is happening?
    Last edited by Gerry (2014-02-12 20:59:18)

    Gnome-shell issue. You can disable desktop management as a temporary fix, but the next gnome-shell update will fix the problem.
    https://bbs.archlinux.org/viewtopic.php?id=175993
    https://bugzilla.gnome.org/show_bug.cgi?id=722510
    https://bugzilla.gnome.org/show_bug.cgi?id=722690

  • Problem with openning a new window when click news tiltle link

    After create a news item using News form created by XML form builder, i try to click title link, It always opens a new window, what i want is keep it in same window when i click the title link, not open a new one. Is there anyone know how to do that? thanks

    Hi,
       I think its not possible in case of XML Form Builder. Bcoz,
    <b>Edit Form</b>:it is for authoring like creating News
    <b>Render list Form</b>:It is for Publishing the News
    <b>Show Form</b>:It is for showing the whole content of the News
    In XML Form Builder, by default when you create a new form these forms ie. Edit Form (You will design the Form here, only authorised person or the owner only view this).
    The Second Form(Render List Item) is the one will be shown to everyone with brief information.
    The Third Form(Show Form) is the one when you click on the News page, it will show you one more screen, there you can see the detailed description about the News.
    So, when you click on the Rendered List Item Title, it will open only in the separate window.
    Regards,
    Venkatesh. K

  • Hyperlink to open in new window on clicking via crystal client

    Hi,
    How to call hyperlink in new window via crystal client.
    I have main report. In that ,for two-three columns, I have made the hyperlink and I want that when user click on that column, it should open in new window.
    But I am unable to open the below link in new window.
    Hyperlink code :
    'http://epint1ent1.jpmorganchase.com/vps/docViewer?invoiceIndexKey='
    &columnname
    I am using crystal client XI R2.
    Please let me know any solution.
    Thanks in advance

    Vishal,
    In your Hyperlink add in the parameter for
    sWindow=New
    i.e. 'http://epint1ent1.jpmorganchase.com/vps/docViewer?sWindow=New&invoiceIndexKey='.....
    You obviously need to complete the Hyperlink fully.
    This should do the trick

  • Opening a new window when clicking on object links

    Hi,
      I have installed business package for crm and configured the object links, but when i click on object links, it is opening a new window, but i want it to be opened in the same window form which that link was activated.
    could you please help me in this regard
    Thank you

    Hello Koduru,
    you should have a look at the work protect modus settings of the user.
    Regards
    Gregor

  • List-Items (Type=URL) - how to open in New Window

    I use a List for deliver information in a region.
    The list consist of some URLs.
    I would like to open a new Window (not use the active Window), if one element was clicked.
    With html-text-region I could user "target=...", but this is not usable in the List entries, it should be a simple URL.
    Have we any attributes for such a behavior?

    Lutz,
    You can achieve what you want in a list template. For example the sample application uses the following fragment in the Standard Unordered List template:
    <li>#TEXT#</li>
    Simple change that to
    <li><a target="new" href="#LINK#" style="font-weight:bold;" class="list">#TEXT#</a></li>
    or something similar.
    Sergio

  • Open a new window by clicking on a HTMBL tableview row

    Hello
    I want to navigate to another BSP page in a new window by clicking on a row in a HTMLB TABLEVIEW.
    I also want to pass value for a tableview table field for the selected row index.
    This field is not defined by a tableviewcolumn tag for the tableview in the layout
    I want to do this stateless.
    Is this possible ?
    Thanks and regards
    Christian

    hi Christian
    For this you need to do .......
    in the table tag populate this event
    <b>onRowSelection = "<OnSelect>"</b> this event.
    Now use a flag, let it be SHOW_POPUP.
    Now in the event handling capture the selection event of the table.
    IF EVENT->EVENT_NAME = 'tableView' AND
    EVENT->EVENT_SERVER_NAME = 'onSelect'.
    TV ?= CL_HTMLB_MANAGER=>GET_DATA( REQUEST = REQUEST
    NAME = 'tableView'
    ID = '<tableID' ).
    IF TV IS NOT INITIAL.
    TABLE_EVENT = TV->DATA.
    ROWINDEX = TABLE_EVENT->ROW_INDEX.
    READ TABLE <Table Name> INDEX ROWINDEX into WA.
    Key = WA-<VALUE>.
    clear SHOW_POPUP.
    IF Key IS NOT INITIAL.
    SHOW_POPUP = 'X'.
    ENDIF.
    ENDIF.
    ENDIF.
    Now in the LayOut Page Write This Script In Between Form Tag in the begning only.
    <%
    if SHOW_POPUP EQ 'X'.
    %>
    <script>
    function call_help(name)
    var result = window.open(name,"helpWindow", "status=no, menubar=no width=730,height=550");
    result.moveTo(100,40);
    </script>
    <%
    endif.
    %>
    And in between <FORM> Tag Call This Function Like
    <script>
    call_help("<page Name.htm>?Key=<%= Key %>");
    </script>
    Do not use these code as u were using earlier
    onCellClick = "onCellClick"
    <htmlb:link id = "link"
    onClientClick = "return popitup('mat_move.do?key=11')">
    </htmlb:link>
    Do Remember to clear the SHOW_POPUP Flag on request of the page at each time.
    <b>What I am trying to do is , On click of the table control i will trigger a server event.
    i the server event i will set the flag SHOW_POPUP and navigate the data that is required on the popup window through navigate->setparameter().
    now when the layout will be refreshed it will check the SHOW_popup Flag. If it is set, it will define the javascript fuction, otherwise skip that code.</b>
    I think This will definitely help you , If you find any problem do revert back....

  • Opening in new window after clicking on h:commandLink

    hi,
    Please help to display jsp in new window after clicking on <h:commandLink>.
    This is what I have written.
    <h:commandLink value="Image" action="#{ImageBean.displayActualImage}" target="_blank"/>
    So Because of that I am able to display in the jsp in same window. displayActualImage() is function that is redirected to another jsp. But I want to disply it in new window. So can any one please help me.
    Thanks.

    Hello Koduru,
    you should have a look at the work protect modus settings of the user.
    Regards
    Gregor

  • If Firefox is set as the default browser, and any application attempts to open a new window, this fails and I get the error "Firefox is already running..."

    Here is what I am running:
    Microsoft Windows 7, Service Pack 1, Fully updated to 4/10/2012
    Fresh Install of Firefox 11. No add-ons enabled as a result of troubleshooting.
    I am a user with administrator rights
    UAS is disabled.
    To begin, this has been going on Since Firefox 10 or so. A few months now.
    I am able to open Firefox. My add-ons worked (ABP, Flashblock, ABP Element Hiding Helper, IETAB2, Downthemall, Greasemonkey, 4chan extension) had no problems. Firefox is set and has been set for the last two years as my default web browser.
    However Since approximately Firefox 10 or so, maybe before that, If I have a Firefox session open, and any other application attempts to open a session in a new window, I get the Firefox is already running, but not responding error."
    I attempted to follow troubleshooting advice already posted (look for parent.lock files left behind [none present], multiple sessionstore.js files [none present], create a new user profile, attempted to clear out the "read-only" permission in windows 7, however as soon as it is cleared, the read only permission returns.)
    As a last resort, I deleted the Firefox folder, the %APPDATA%/Mozilla directory in its entirety, then utilized CCleaner to remove any and all references to Firefox in the windows registry, then did a full re-install, no extensions installed right now.
    I checked preferences and have the option "open new windows in a new tab" checked off. The problem persists regardless if this option is checked on or off. This problem persists in or out of safe mode, even with the brand new install.
    Test Cases:
    All cases:
    Firefox is selected as the default browser for windows 7
    Case 1: Open a firefox session. Utilize any other program that attempts to open a link to their website in a new browser window or new browser session. Experience "Firefox is already running" error
    Case 2: Open a firefox session. Right click on Firefox on the task bar. Select "open in new window". Experience "Firefox is already running" error
    Case 3: Open a firefox session. Select the Firefox Menu > New tab > New Window. A new window will actually open.
    This is the only method of opening a new window in the same browser session or profile that actually works on my system. Attempting to open a browser session from the task bar "open new window dialog" or opening a new window while a current window/session is running will not open firefox in a new window or a new tab in the current session. The "Firefox is already running, but is not responding" error will occur every time.

    Cor-el's suggestion resolved my problem. Apparently the MOZ_NO_REMOTE variable was set to 1 on my system variables. I never made it, and really have no idea how it got there, but deleting this variable and restarting firefox has resolved the issue. Thanks Cor-el!
    Marking case: Solved
    Solution: Verify the MOZ_NO_REMOTE variable is NOT set to 1. This can be achieved by simply deleting this variable.

  • Having multiple tabs open in one window, and then opening a new window and closing it, will close the newly opened window, but it will want to close the other original window with the multiple tabs as well.

    This only happens if the original window has multiple tabs, and the new window has only ONE tab at the moment you close it.
    Also, the problem only occurs when TWO windows of firefox are open. So opening up a 3rd window, and then closing it, will not give you any problems. The interaction occurs between two windows of firefox only.

    This can happen if you drag a tab slightly down in the browser window while clicking.
    Firefox has a feature called tear-off tabs
    You can detach a tab from the current window and open it in a new window by dragging a tab in the browser window.
    You can also do this via the right-click context menu of a tab: Move to New Window
    You can drag that tab back to the tab bar in the original window to undo that detaching.
    * https://addons.mozilla.org/firefox/addon/bug489729-disable-detach-and-t

  • "Move To New Window" Does Not Work in Version 5. It opens a new window, but it's blank, and the tab I wanted as the new window stays where it is. Is this a bug?

    Right mouse-clicking on a tab and selecting "Move To New Window" should open the contents of the tab in a new window, and then close the original tab on the original instance of FF. But in Version 5, that action simply spawns a new window that is totally blank, and the tab I wanted opened in a new window stays attached to the original window.

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    You can use "Disable all add-ons" on the ''Safe mode'' start window.
    You have to close and restart Firefox after each change via "File > Exit" (on Mac: "Firefox > Quit")

  • How can we open a New Window on click of a button

    Dear All,
    Please can anyone guide me how to open a page in A new pop up window.
    Application Express 4.0.1.00.03
    Thanks & regards
    Arif Khadas

    Assalamwalkeum Tauceef,
    Thanks for your reply.
    For the second query where you want to refresh parent window and close the popup window,
    Create a html region and give a condition to this region that it should display on a particular request and pass that request on your button click and write this javascript code in your Region SourceAccordingly I created a Region on the Calling Page and have the condition Request = REFRESH.
    Now my problem is on the pop-up window how can I pass the Request as the action when button pressed is Submit and I am using an SQL Insert Action.
    For such an action for button click the Request field is hidden.
    Also please help me through this one for setting the Item values in the pop up window:
    I have the following in Execute When Page Loads
      var total = 0;
      var inv   = '';
      var selected_inv = '';
      total        = opener.document.getElementById('P24_PAY_AMOUNT');
      selected_inv = opener.document.getElementById('P24_PAY_INV');
      $s('P23_RCP_AMOUNT_PAID', total);
      //setSessionValue ('P23_RCP_AMOUNT_PAID', total);
      $s('P23_INVOICES', selected_inv);
      //setSessionValue ('P23_INVOICES', selected_inv);The value that I am getting for the above Items is "     [object HTMLInputElement]" in Mozilla Firefox and "[object]" in Internet explorer, not sure why?
    Please guide.
    Thanks & Regards
    Arif Khadas
    Edited by: Arif Khadas on Apr 27, 2011 9:51 AM

  • 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

Maybe you are looking for