Button- opens new window- updates original window

I have been going crazy with this one. I have created a row of jlabels based upon data in an object. at the end of the row is an edit button that opens a new window to edit the data. in the new window is a submit button. every thing almost works how i want it to. the data is updated but is not showing up again unless hit the edit button again (I think that the thread is just not finishing but it could be a logic error: I have an action listener nested in an action listener). I tried moving data update calls to inside the action performed area of submit edit but that only slowed label updating further. any ideas would be great.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
import java.util.*;
import java.math.*;
class Bill {
     String VendorName = new String();                    //ACTUAL DATA
     String DueDate = new String();
     String Comment = new String();
     String Amount = new String();
     JLabel vendorNamedLabel = new JLabel();                    //LABELS THAT SHOW DATA
     JLabel dueDatedLabel = new JLabel();
     JLabel commentedLabel = new JLabel();
     JLabel amountedLabel = new JLabel();
     JButton edit = new JButton("edit");
     JTextField vendorNameField = new JTextField(15);          //TEXTFIELDS FOR EDITING DATA
     JTextField dueDateField = new JTextField(15);
     JTextField commentField = new JTextField(15);
     JTextField amountField = new JTextField(15);
     JButton submitButton = new JButton("Submit");
     JLabel vendorNameLabel = new JLabel("Vendor Name");          //LABELS FOR TEXTFIELDS
     JLabel dueDateLabel = new JLabel("Due Date");
     JLabel commentLabel = new JLabel("Comments");
     JLabel amountLabel = new JLabel("Amount Due");
     public Bill() {}
     public Bill(Vendor vendor, String dueDate, String comment, String amount) {          
          VendorName = vendor.getName();                    //VENDOR HAS A STRING ACCESSED BY GETNAME
          DueDate = dueDate;
          Comment = comment;
          Amount = amount;
     /**CREATES A SINGLE ROW OF JLABELS THAT SHOW BILL DATA FOLLOWED BY AN EDIT BUTTON*/
     public Container showBill(Container container) {
          /**CREATING THE GUI COMPONENTS*/
          vendorNamedLabel.setText(VendorName);
          dueDatedLabel.setText(DueDate);
          commentedLabel.setText(Comment);
          amountedLabel.setText(Amount);
          /**SETTING UP THE CONTAINER*/
          //LAYOUT
          GridBagLayout layout = new GridBagLayout();
          GridBagConstraints c = new GridBagConstraints();
          container.setLayout(layout);
          //SHARED CONSTRAINTS
          c.fill = GridBagConstraints.BOTH;
          c.gridy = 0;
          c.weighty = 1.0;
          c.weightx = 1.0;
          //ADDING COMPONENTS WITH INDIVIDUAL CONSTAINTS
          c.gridx = 0;
          container.add(vendorNamedLabel, c);
          c.gridx = 1;
          container.add(dueDatedLabel, c);
          c.gridx = 2;
          container.add(commentedLabel, c);
          c.gridx = 3;
          container.add(amountedLabel, c);
          c.gridx = 4;
          container.add(edit, c);
          edit.addActionListener(new EditBill(VendorName, DueDate, Comment, Amount));
          return container;
     /**CREATES A JFRAME THAT HAS TEXTFIELDS WITH LABELS WITH A SUBMIT BUTTON*/
     class EditBill implements ActionListener {
          JFrame frame = new JFrame();
          JPanel panel = new JPanel();
          public EditBill (String vendorName, String dueDate, String comment, String amount) {
               vendorNameField.setHorizontalAlignment(JTextField.RIGHT);//SUPPLIES CURRENT NAME
               vendorNameField.setText(vendorName);
               dueDateField.setHorizontalAlignment(JTextField.RIGHT);//SUPPLIES CURRENT DATE
               dueDateField.setText(dueDate);
               commentField.setHorizontalAlignment(JTextField.RIGHT);//SUPPLIES CURRENT COMMENT
               commentField.setText(comment);
               amountField.setHorizontalAlignment(JTextField.RIGHT);//SUPPLIES CURRENT AMOUNT
               amountField.setText(amount);
          public void actionPerformed(ActionEvent e) {
               /**LAYING OUT THE COMPONENTS*/
               frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
               //BORDER
               Border border = BorderFactory.createTitledBorder("Bill Information Editor");
               panel.setBorder(border);
               //SETTING UP LAYOUT
               GridBagLayout layout = new GridBagLayout();
               GridBagConstraints c = new GridBagConstraints();
               panel.setLayout(layout);
               //SIMILAR CONSTRAINTS
               c.insets = new Insets(2, 2, 2, 2);
               c.fill = GridBagConstraints.BOTH;
               c.weighty = 1.0;
               //ADDING COMPONENTS WITH INDIVIDUAL CONSTRAINTS
               c.gridy = 0;                         //ROW ONE
               c.gridx = 0;                         //NAME
               c.weightx = 0.4;
               panel.add(vendorNameLabel, c);
               c.gridx = 1;
               c.weightx = 0.6;
               panel.add(vendorNameField, c);
               c.gridx = 2;                         //DUE DATE
               c.weightx = 0.4;
               panel.add(dueDateLabel, c);
               c.gridx = 3;
               c.weightx = 0.6;
               panel.add(dueDateField, c);
               c.gridy = 1;                         //ROW TWO
               c.gridx = 0;                         //COMMENT
               c.weightx = 0.4;
               panel.add(commentLabel, c);
               c.gridx = 1;
               c.weightx = 0.6;
               panel.add(commentField, c);
               c.gridx = 2;                         //AMOUNT
               c.weightx = 0.4;
               panel.add(amountLabel, c);
               c.gridx = 3;
               c.weightx = 0.6;
               panel.add(amountField, c);
               c.gridx = 0;
               c.gridy = 2;
               c.gridwidth = 4;
               c.fill = GridBagConstraints.NONE;
               panel.add(submitButton, c);               //SUBMIT BUTTON
               submitButton.addActionListener(new SubmitEdit(     vendorNameField.getText(),
                                             dueDateField.getText(),
                                             commentField.getText(),
                                             amountField.getText()
                                     );          //SENDS INFORMATION FOR ACTION
               frame.add(panel);
               frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
               frame.pack();
               frame.setVisible(true);
          /**SUBMITS THE INFORMATION TO THE PROPER OBJECTS*/
          class SubmitEdit implements ActionListener {
               /**UPDATES BILL TO USER INPUT DATA RETREIVED FROM THE BILLEDIT FRAME*/
               public SubmitEdit (String vendorName, String dueDate, String comment, String amount) {
                    VendorName = vendorName;
                    vendorNamedLabel.setText(VendorName);
                    DueDate = dueDate;
                    dueDatedLabel.setText(DueDate);
                    Comment = comment;
                    commentedLabel.setText(Comment);
                    Amount = amount;
                    amountedLabel.setText(Amount);
               public void actionPerformed(ActionEvent e) {
                    frame.dispose();
/**TEST CODE FOR THE BILL, EDITBILL, SUBMITEDIT CLASS*/
class BillTest {
     public static void createAndShowGUI() {
          Vendor vendor = new Vendor( "AT&T", "800.585.7928", "81773296563228",
               "PO Box 630047", "Dallas", "Texas", "75263-0047",
               "Telephone", "lily1830", "password");
          Bill bill = new Bill(vendor, "09.07.2006", "September Bill", "192.07");
          JFrame frame = new JFrame("Simple display of bill info");
               JFrame.setDefaultLookAndFeelDecorated(true);
               frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          JPanel panel = new JPanel();
               bill.showBill(panel);
               frame.add(panel);
          frame.pack();
          frame.setVisible(true);
     public static void main (String[] args) {
          javax.swing.SwingUtilities.invokeLater(new Runnable() {
               public void run() {
                    createAndShowGUI();
}

hey zadok, I'll send the other 5 dukes to any response from you to this question and I won't harp on any answer. I am new to programming and have been studying for about 6-9 months on my own. This is really my first complete program that I am working on. I have read that getters and setter undermine the object oriented approach as per:
Why getter and setter methods are evil written by Allen Holub at javaworld.com
http://www.javaworld.com/javaworld/jw-09-2003/jw-0905-toolbox.html
am i overreading into it when I try to contain the problem into an object so that i don't have to write about a dozen getters and setters.

Similar Messages

  • Iview - back button opens new window

    hi,
    i have an standard-iview in the portal (ESS-travelmanagement).
    when i push the 'back' button in portal OR the 'leave' button from a step in the iview a NEW windows opens. but i don't want that, i want to stay on the same window.
    any ideas how to do this ? i have this behaviour only on this one iview.
    reg, Martin

    Hi Martin,
    It looks like the check WorkProtect Popup feature is configured on your portal, that allows us to choose our actions when we are trying to navigate from unsaved object.
    By default the mode is set to 1: When you open object for editing, edit the object and navigate to another entry point without saving a new window will open with the new navigated entry point and the original window will stay with the edited object.
    To change the default setting or more information please attend to SAP Note 734861 - WorkProtect Mode - Global Settings
    The end user can also personalize the WorkProtect mode for his login:
    Click on the personalize link in the right up corner of the portal. Navigate to WorkProtect mode tab. Change to mode - open page in same window.
    Save changes & Close this window.
    Log-off from the portal, re-login and check if the changes are effective.
    Hope this helps.
    Regards,
    Anagha

  • Firefox homepage button opens new window instead of new tab

    When I hit the homepage button on the Firefox toolbar, it now opens a whole new window instead of a new tab. It used to work until I upgraded to Firefox 9. Any suggestions as to how to fix this?

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • How do I make Button Open new window in flash?

    Hi every one,
    i have this modelling site im working on, and when you click
    on photo i want to open a new window with the girls profile in it.
    but i dont want a new IE window, just a little flash movie, i tried
    "on (release) {
    //load Movie Behavior
    if(this == Number(this)){
    loadMovieNum("TWtester.swf",this);
    } else {
    this.loadMovie("TWtester.swf");
    //End Behavior"
    and it goes to that swf file, but its not in NEW window? does
    this make sense to any one?

    this is the as3 forum. you're using as2.
    and you need to clarify your terms. a new window means a new
    browser window. if you want to load your swf in the current window,
    load it into a target movieclip or _level.

  • Worst update ever! On my Vista everything is wrong! Back button never active; If I want open pages as new tab it opens new window; FF starts with blank page instead of Google; No url address shown on status bar when I move mouse arrow on the link etc

    Worst update ever! On my Vista everything is wrong! Back button never active; If I want open pages as new tab it opens new window; FF starts with blank page instead of Google; No url address shown on status bar when I move mouse arrow on the link etc.. Please Help!

    Try the Firefox SafeMode to see how it works there. <br />
    ''A troubleshooting mode, which disables most Add-ons.'' <br />
    ''(If you're not using it, switch to the Default Theme.)''
    * You can open the Firefox 4.0+ SafeMode by holding the '''Shft''' key when you use the Firefox desktop or Start menu shortcut.
    * Or use the Help menu item, click on '''Restart with Add-ons Disabled...''' while Firefox is running. <br />
    ''Don't select anything right now, just use "Continue in SafeMode."''
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shft key) to open it again.''
    '''''If it is good in the Firefox SafeMode''''', your problem is probably caused by an extension, and you need to figure out which one. <br />
    http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes
    ''When you figure out what is causing that, please let us know. It might help other user's who have that problem.''

  • Button on page opens new window, session times out in old window

    Hi,
    I've created a custom page and added a button through personalizations in Oracle that opens the new custom page in a new window. When this happens, though, the original window throws the following error when a user attempts to use any functionality in that page:
    Error: Cannot Display Page
    You cannot complete this task because you accessed this page using the browser's navigation buttons (the browser Back button, for example).
    More specifically, the new button has been added to a LOV page in Oracle. Navigation would be: Create timecards page, click on Task LOV button (this opens new window for Task LOV), new button is on this Task LOV page. The new button then opens the custom page, and when the user returns to the Task LOV page to select a task they receive the error.
    How do I prevent this error when the new custom page opens from the button?
    Thanks in advance for your help,
    Suzanne

    I have an update to this issue:
    I found that adding the value &retainAM=Y to the button URL for my custom page resolves the issue of the time-out in the Task LOV page. However, when I make the task selection in the LOV page and return to the main create timecard page, I find that the session has timed out on that page.
    Any suggestions?
    Thanks,
    Suzanne

  • When a pop up window comes up it is - search bookmarks and history window! I cannot log into my bank as login button should open new window to log in but I get the search page. I cannot see larger images as again I get the search bookmarks and history pa

    When a pop up window comes up it is - search bookmarks and history window! I cannot log into my bank as login button should open new window to log in but I get the search page. I cannot see larger images as again I get the search bookmarks and history page etc. Happens on all options that should open new page. I am so frustrated, this has been happening since Firefox updated itself 2 days ago to Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 ( .NET CLR 3.5.30729; .NET4.0C) was fine before that. using windows vista. Can you please advise what I should do? Also can you go back to previous version? Error console eg
    Warning: Error in parsing value for 'cursor'. Declaration dropped.
    Source File: https://ib.nab.com.au/nabib/styles/menu_nab.css?id=009
    Line: 116
    ib.nab.com.au : server does not support RFC 5746, see CVE-2009-3555 and Warning: Selector expected. Ruleset ignored due to bad selector.
    Source File: https://ib.nab.com.au/nabib/styles/nabstyle.css?id=014
    Line: 837
    == This happened ==
    Every time Firefox opened
    == 2 days ago after update.

    Do you have that problem when running in the Firefox SafeMode?
    [http://support.mozilla.com/en-US/kb/Safe+Mode]
    ''Don't select anything right now, just use "Continue in SafeMode."''
    If not, see this:
    [http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes]

  • Opening new window on button click from pdf without loosing session

    Hi,
    In my Java web applicaion on click of a link, we are opening a new window in which we are displaying a pdf. There are 5 buttons on this pdf.
    On clicking of this button again we are opening a application link in new window. But in this window we are not gettting our session, which is there in first two window.
    For opening new window from pdf button click we are using
    var dynamicUrl3 = myappurl;
    app.launchURL(dynamicUrl, true); 
    How can i open new window with the same sesion from the pdf button.
    Please help for the same.
    Thanks,
    Abhijit Mohite.

    Yes, with target="_blank" in a link or a form.Thanks for ur valuable suggestion. I changed the button to link.
    Its working fine now without JavaScript.
    Now i got another requirement. When user select some items and press a button in the new popup window, the window must close on button click and the parent window must refresh. This must also be done without using JavaScript.
    Is this possible? Please give me an idea to do this.
    Thanks.

  • Safari opens new windows 1/3 the size of the original window.

    Safari opens new windows 1/3 the size of the original window. How do I make it open fullscreen?

    HI,
    Drag the bottom right corner out as far as it will go. Relaunch Safari. It should remember window position.
    Carolyn

  • Using Struts, On submit button in child window, its opening new window.

    We are developing a project using Struts and BC4J. I am opening a child window(window.showmodaldialog) from main window using struts action. Actually Child window is a search kind of page. User will enter the search criteria and press the sumbit button. I want to display the search result in the same window using datatable when jboevent="submit". But its opening new window and displaying the result in that. However in <html:form>, Even I tried the target="_self".
    I am not sure wether the associated action in the <html:form> is forcing to open a new window.
    Similar kind of thing I am able to achieve in other similar search page, it its not a child window.
    Please let me know what I am missing.
    Thanks,
    Arvind

    So you want the search window to submit back to itself so you see the search field and a result list..?
    In pure Struts terms either using "_self" or the name of the popup window in the <html:form> tag will do the trick
    You need to make sure that the inital window that you created as the popup search window has a name in the first place - can you specify this with showModalDialog()?
    BTW isn't showModalDialog an IE only feature...

  • How do I forces FF 23 to open maximized, not full screen, but maximized, both on start up and when opening new windows?

    Firefox 23 does not open maximized nor does it open new windows maximized. As such I have to manually maximize each window.
    Run is set to maximized in the shortcut properties, yet it still opens in a normal or less than normal size window.
    Older versions open maximized with no problem. I have Profile manager configured so that I can run multiple versions at the same time and everything opens maximized except FF 23.
    is there some setting in the about:config interface or is this a genuine BUG in the latest version? Any help would be appreciated greatly.
    Also can you tell me how to modify the title bar text/icon/etc as well as where to find the icon or portable network graphic (png) file for the main-window.ico or direct me to appropriate knowledge base articles for modifying both.

    My localstore.rdf file was fine. The problem was caused by two plug-ins that Mozilla shows as being compatible with Firefox 23, when in fact they both cause undesired side effects.
    Maybe the employees of Mozilla should actually test plug-ins before they allow them to be available for download or worse yet, recommend them.
    And if any of the in-house developers had a clue they would stop removing old lines of code from Mozilla products so that new versions of Firefox would still be compatible with older plug-ins and extensions people would still like to use.
    I had to remove recommended extensions and copy code from older versions of FF and NS and modify settings in about:config to allow older extensions to work to correct the problems and get Firefox to work the way I need it to. All in all I have over forty hours invested in modding FF at this point just to have it function the way it used to.
    Unfortunately, since I still can't get buttons designed to open .URL links from the toolbar to work as they did in the past I have a feeling I'll be returning to older code sources to find more answers.
    Lucky for me that I have every browser going back to NCSA Mosaic available to me, so every bit of code from the present till back before Mozilla existed is include in my knowledge base. It's a shame Mozilla doesn't keep such a reference available for it's users or apparently it's in house developers and staff.
    Maybe I'll even re-enable the splash screen for Firefox since the only available plug-in for that doesn't appear to work with Version 23 either, even though once again the compatibility adviser says it does
    It's truly sad that the result of Marc Andreessen's and James Clark's work and Netscape in general became the spawning Mozilla. What used to be a great browser and an acceptable replacement for Netscape, has become a joke. So much for all the hard work and effort made by Dave Hyatt and Blake Ross as well.
    I guess that's what one should expect from the developers that are a part of generations X, Y, and Me. The attitudes associated with those generations show in the lack of thought, consideration, and ingenuity that have been a part the last several versions of FF, not to mention, the copying of features from Chrome.
    When the only original idea to come out of Mozilla of late is to remove or disable features people have used and counted on for decades, the I don't care, I don't know, and me, me, me attitudes of so many from the aforementioned generations is truly evident in the last twenty incarnations of Firefox. Not to mention the attitudes and unhelpful nature of the responses users encounter when asking for help.

  • My computer suddenly stopped allowing me to open new windows in firefox, how do I reset it to do this

    last week my computer (a thinkpad) stopped letting me open new windows by pushing the + key in a window, so now when I search it replaces the open window. what happened and how do I fix it?

    The suggestion by TonyE will remove the toolbar from Firefox.
    To remove the Ask Toolbar completely from your entire system, see:
    *http://about.ask.com/apn/toolbar/docs/default/faq/en/ff/index.html#na4
    <br />
    <br />
    '''Other issues needing your attention'''
    The information submitted with your question indicates that you have out of date plugins with known security and stability issues that should be updated. To see the plugins submitted with your question, click "More system details..." to the right of your original question post. You can also see your plugins from the Firefox menu, Tools > Add-ons > Plugins.<br />
    <br />
    *Adobe PDF Plug-In For Firefox and Netscape
    **Current versions are 9.4.2 and 10.0.1 (Reader X)
    **More info about version 10.0.1 (Reader X)
    ***New Adobe Reader X (version 10) with Protected Mode was released 2010-11-19
    ***See: http://www.securityweek.com/adobe-releases-acrobat-reader-x-protected-mode
    *Shockwave Flash 10.0 r32
    **Very old version
    #'''''Check your plugin versions''''' on either of the following links':
    #*http://www.mozilla.com/en-US/plugincheck/
    #*https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    #*'''Note: plugin check page does not have information on all plugin versions'''
    #'''Update Adobe Reader (PDF plugin):'''
    #*From within your existing Adobe Reader ('''<u>if you have it already installed</u>'''):
    #**Open the Adobe Reader program from your Programs list
    #**Click Help > Check for Updates
    #**Follow the prompts for updating
    #**If this method works for you, skip the "Download complete installer" section below and proceed to "After the installation" below
    #*Download complete installer ('''if you do <u>NOT</u> have Adobe Reader installed'''):
    #**Use the links below to avoid getting the troublesome "getplus" Adobe Download Manager and other "extras" you may not want
    #**Use Firefox to download and SAVE the installer to your hard drive from the appropriate link below
    #**Click "Save to File"; save to your Desktop (so you can find it)
    #**After download completes, close Firefox
    #**Click the installer you just downloaded and allow the install to continue
    #***Note: Vista and Win7 users may need to right-click the installer and choose "Run as Administrator"
    #**'''<u>Download link</u>''': ftp://ftp.adobe.com/pub/adobe/reader/
    #***Choose your OS
    #***Choose the latest #.x version (example 9.x, for version 9)
    #***Choose the highest number version listed
    #****NOTE: 10.x is the new Adobe Reader X (Windows and Mac only as of this posting)
    #***Choose your language
    #***Download the file, SAVE it to your hard drive, when complete, close Firefox, click on the installer you just downloaded and let it install.
    #***Windows: choose the .exe file; Mac: choose the .dmg file
    #*Using either of the links below will force you to install the "getPlus" Adobe Download Manager. Also be sure to uncheck the McAfee Scanner if you do not want the link forcibly installed on your desktop
    #**''<u>Also see Download link</u>''': http://get.adobe.com/reader/otherversions/
    #**Also see: https://support.mozilla.com/en-US/kb/Using+the+Adobe+Reader+plugin+with+Firefox (do not use the link on this page for downloading; you may get the troublesome "getplus" Adobe Download Manager (Adobe DLM) and other "extras")
    #*After the installation, start Firefox and check your version again.
    #'''Update the [[Managing the Flash plugin|Flash]] plugin''' to the latest version.
    #*Download and SAVE to your Desktop so you can find the installer later
    #*If you do not have the current version, click on the "Player Download Center" link on the "'''Download and information'''" or "'''Download Manual installers'''" below
    #*After download is complete, exit Firefox
    #*Click on the installer you just downloaded and install
    #**Windows 7 and Vista: may need to right-click the installer and choose "Run as Administrator"
    #*Start Firefox and check your version again or test the installation by going back to the download link below
    #*'''Download and information''': http://www.adobe.com/software/flash/about/
    #**Use Firefox to go to the above site to update the Firefox plugin (will also install plugin for most other browsers; except IE)
    #**Use IE to go to the above site to update the IE ActiveX
    #*'''Download Manual installers'''.
    #**http://kb2.adobe.com/cps/191/tn_19166.html#main_ManualInstaller
    #**Note separate links for:
    #***Plugin for Firefox and most other browsers
    #***ActiveX for IE

  • How to open new window and generate oracle report from apex

    Hi,
    I had created an application that generates PDF files using Oracle Reports, following this Guide.
    http://www.oracle.com/technology/products/database/application_express/howtos/howto_integrate_oracle_reports.html
    And I followed 'Advanced Technique', so that users can't generate PDF file by changing URL and parameters. This is done for security reasons.
    But in this tutorial, when 'Go' button is pressed, the PDF file is displayed on the same window of apex application. If so, user might close the window by mistake. In order to avoid this, another window have to be opened.
    So, I put this code in the BRANCH - URL Target. (Note that this is not in Optional URL Redirect in the button property, but the branch which is called by the button.)
    javascript:popupURL('&REPORTS_URL.quotation&P2100_REP_JOB_ID.')
    But if the button is pressed, I get this error.
    ERR-1777: Page 2100 provided no page to branch to. Please report this error to your application administrator.
    Restart Application
    If I put the code 'javascritpt ....' in the Optional URL Redirect, another window opens successfully, but the Process to generate report job is not executed.
    Does anyone know how to open new window from the Branch in this case?

    G'day Shohei,
    Try putting your javascript into your plsql process using the htp.p(); procedure.
    For example, something along these lines should do it:
    BEGIN
    -- Your other process code goes here...
    htp.p('<script type="javascript/text">');
    htp.p('popupURL("&REPORTS_URL.quotation&P2100_REP_JOB_ID.")');
    htp.p('</script>');
    END;
    What happens is the javascript is browser based whereas your plsql process is server based and so if you put the javascript into your button item Optional URL Redirect it is executed prior to getting to the page plsql process and therefore it will never execute the process. When you have it in your branch which normally follows the processes, control has been handed to the server and the javascript cannot be executed and so your page throws the error "Page 2100 provided no page to branch to"... By "seeding" the plsql process with the embedded javascript in the htp.p() procedure you can achieve the desired result. You could also have it as a separate process also as long as it is sequenced correctly to follow your other process.
    HTH
    Cheers,
    Mike

  • What is the correct way to open new window with launchDialog & returnDialog

    Hi,
    JDev : 11.1.1.1.2.0
    My current page url is http://127.0.0.1:7101/ThruputApplication/faces/Test.jspx?_afrLoop=21785535204821&_afrWindowMode=0&_adf.ctrl-state=d1x4f8z6p_9 and
    From this page, I trying to open new browser window using command button's action method with below code
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ViewHandler viewHandler =
    facesContext.getApplication().getViewHandler();
    StringBuilder strBuilder = new StringBuilder();
    UIViewRoot dialog =
    viewHandler.createView(facesContext, strBuilder.append("/reports/LPLReport.jsp?").append(sURL).toString());
    Map properties = new HashMap();
    properties.put("width", Integer.valueOf(500));
    properties.put("height", Integer.valueOf(300));
    AdfFacesContext afConetxt = AdfFacesContext.getCurrentInstance();
    afConetxt.launchDialog(dialog, properties, null, true, null);
    New browser window is getting open successfully but after opeing this new window if I do any operation such like selecting item from selectOneChoice or checkbox selection from the screen from which I have launce new browser window then is giving me below message.
    Are you sure you want to navigate away from this page ?
    There are one or more dependent dialogs open. Navigation from this page will invalidate any open dialogs.
    Press OK to continue, or Cancel to stay on the current page.
    I have also tried AdfFacesContext.getCurrentInstance().returnFromDialog(null, null); to return dialog but its giving me below error:
    <DialogServiceImpl><returnFromDialog> No 'DialogUsedRK' key available for returnFromDialog to do the right thing!
    <Reports><generateReports> Exception
    java.lang.IllegalStateException: popView(): No view has been pushed.
         at org.apache.myfaces.trinidadinternal.context.DialogServiceImpl.popView(DialogServiceImpl.java:88)
         at org.apache.myfaces.trinidadinternal.context.DialogServiceImpl.returnFromDialog(DialogServiceImpl.java:182)
         at org.apache.myfaces.trinidadinternal.context.RequestContextImpl.returnFromDialog(RequestContextImpl.java:132)
         at oracle.adfinternal.view.faces.context.AdfFacesContextImpl.returnFromDialog(AdfFacesContextImpl.java:318)
         at com.enbridge.forecasting.tps.backing.reports.Reports.generateMsgRptGenerated(Reports.java:2602)
         at com.enbridge.forecasting.tps.backing.reports.Reports.generateReports(Reports.java:1212)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
         at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:812)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:292)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:326)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Please give me the solution so that I can stay on the screen and can continue with that screen after opening new browser window.
    Currently after opening new window as mentioned above, I can't do anything. If I press ok button then it will give me login page and if I press cancel button then my screen component's state become invalid.
    Regards,
    devang

    Thanks Frank,
    We have resolved the issue. Cookies max age was set as current browser seeion in websphere.
    After changing it as some max seconds, it is working fine.
    Mohanraj M

  • 'Open New Windows In A New Tab' is not working when the popup is invoked by Flash

    I surf a lot of porn sites. And some of them invoke a popup if you click the play button of their Flash player. Even though I have FF set to 'Open New Window In A New Tab', this isn't working if a window is invoked by a Flash object. For example, if I want to watch porn clip on tnaflix<i></i>.com and click the Play button, then a popup window of livejasmin<i></i>.com comes up. But it doesn't open in a new tab. It opens in a new window, even though I've set the above mentioned option. This is very annoying. Please, fix it.

    Thanks for the responses and sorry for taking a while to get back. I have been looking around but not sure where is the "about: config page." When I click on Firefox "about" there is nothing to configure. What do I click on? TIA

Maybe you are looking for