About web browser's refresh

my code:
<%@ page language="java" contentType="text/html; charset=GBK" %>
<HTML>
<HEAD>
     <META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=gb2312">
     <!--META HTTP-EQUIV="expires" CONTENT="0"-->
     <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
     <TITLE>update</TITLE>
<link rel="stylesheet" type="text/css"
href='<%= request.getContextPath() + "/style/result-set.css" %>'>
</HEAD>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsf/donar/components" prefix="d" %>
<BODY BGCOLOR="white">
<f:loadBundle basename="cn.donar.bundles.Resources" var="bundle"/>
<f:view>
<h:messages globalOnly="true"/>
<h:form id="myform">
<h:panel_grid styleClass="result" columns="1">
<h:panel_group styleClass="hcititle">
<h:output_text value="#{bundle.operatorlist}"/>
</h:panel_group >
<h:panel_group >
<h:data_table id="table"
     headerClass="hcihead"
     rowClasses="rescontent,rescontent_"
     styleClass="result"
     rows="14" binding="#{operatorBean.data}"
     value="#{operatorBean.items}" var="sci">
     <!--
<f:facet name="header">
</f:facet>
-->
<h:column>
<h:selectboolean_checkbox
id="checked"
binding="#{operatorBean.checked}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:output_text value="#{bundle.operator_id}"/>
</f:facet>
<h:output_text id="operator_id" value="#{sci.operatorId}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:output_text value="#{bundle.operator_name}"/>
</f:facet>
<h:output_text id="operator_name" value="#{sci.operatorName}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:output_text value="#{bundle.agency_id}"/>
</f:facet>
<h:output_text id="agency_id" value="#{sci.agencyId}" />
</h:column>
<h:column>
<f:facet name="header">
<h:output_text value="#{bundle.branch_id}" />
</f:facet>
<h:output_text value="#{sci.branchId}" />
</h:column>
<h:column>
<f:facet name="header">
<h:output_text value="#{bundle.city_id}" />
</f:facet>
<h:output_text value="#{sci.cityId}" />
</h:column>
<h:column>
<f:facet name="header">
<h:output_text value="#{bundle.operator_pin}" />
</f:facet>
<h:output_text value="#{sci.operatorPin}" />
</h:column>
<h:column>
<f:facet name="header">
<h:output_text value="#{bundle.operator_role}" />
</f:facet>
<h:output_text value="#{sci.operatorRole}" />
</h:column>
</h:data_table>
</h:panel_group>
<h:panel_grid columns="4" columnClasses=",,colwidth,colwidth" width="100%">
<h:panel_group >
<h:command_button id="create"
action="create"
immediate="true"
          image="../images/add_0.gif"
type="SUBMIT"/>
<h:command_button id="delete"
action="#{operatorBean.delete}"
immediate="true"
          image="../images/delete_0.gif"
type="SUBMIT"/>
<h:command_link id="dlt"
action="#{operatorBean.delete}"
          >
          <h:output_text value="delete" />
          </h:command_link>
<h:command_button id="update"
action="#{operatorBean.update_reset}"
immediate="true"
          image="../images/modify.gif"
type="SUBMIT"/>
<h:command_button id="reset"
action="#{operatorBean.reset}"
          image="../images/reset.gif"
immediate="true"
value="#{bundle.reset}"
type="SUBMIT"/>
</h:panel_group>
<h:panel_group >
<h:output_text value=""/>
</h:panel_group>
<h:panel_group >
<h:command_button id="previous1"
action="#{operatorBean.previous}"
immediate="true"
          image="../images/prevPage.gif"
value="#{bundle.previous}"
               type="SUBMIT" />
<h:command_button id="next1"
action="#{operatorBean.next1}"
          style="text-align: right"
immediate="true"
          image="../images/nextPage.gif"
value="#{bundle.next}"
               type="SUBMIT" />
</h:panel_group>
<h:panel_group style="width: 60px">
<h:output_text value="#{operatorBean.currpage}" /><h:output_text value="/" />
<h:output_text value="#{operatorBean.totalpage}" /><h:output_text value="?" />
</h:panel_group>
</h:panel_group>
</h:panel_grid>
</h:panel_grid>
</h:form>
</f:view>
</BODY>
</HTML>
on this page . I press any command_button, then press web browser's refresh button,
I find previous command_button repeat ed execute
if I press delete command_button , delete one record from database. then press web browser's refresh
button. #{operatorBean.delete} execute again as a result delete two record.
How can I do? press web browser's refresh button . not delete one record.
thank s

try use </redirect> for navigation-case.

Similar Messages

  • Question about web browser block

    "To help protect your security, your web browser has blocked this website from displaying non-secure content."  I get this message when I try to download my VISA statement which is a pdf file -- at least it requires Adobe to read and download.
    I've tried everything I can think of, but nothing works.  Tried disabling my security programs, turning off pop-up blocker, adding the web-site address to the "trusted sites" list, etc, etc.  PC Cleaners says there's a problem with recent Adobe updates.
    Anyone have any ideas about this?  I'm not the computer expert in our family, but my husband is unavailable while he recuperates from surgery.

    I tried saving the link to the pdf -- when I try, I only save the link back to the web-page.  when I right click on the blank page, there's no way to save it as a pdf file (the "Save Target As" command doesn't work)
    Windows 7 Home (Premium, I think)
    Internet Explorer 10

  • Urgent!!! Forms not work on web browser(OAS 10g,Solaris 10 x86).

    Problem discribe:
    1.environment:
    (1)Network: only local network.
    (2)Platforms
    All platforms we use are Solaris 10 for X86.
    (2.1)Server: (intel) Solaris 10 for X86
    Oracle Application Server Forms Services 10.1.2.0.2
    (2.2)Client: Mozolla web browser on (intel) Solaris 10 for X86 .
    Mozolla web browser information:
    (2.2.1)[menu]-[Help]-[About web browser]display:
    Welcome to Mozilla 1.7 for Sun Java(TM) Desktop System
    Mozilla/5.0 (X11; U; SunOS i86pc; zh-CN; rv:1.7) Gecko/20070606
    (2.2.2)[menu]-[Help]-[About Plug-in]display:
    Java(TM) Plug-in 1.5.0_12-b04
    file name: libjavaplugin_oji.so
    Java(TM) Plug-in 1.5.0_12
    MIME type
    application/x-java-vm Java
    application/x-java-applet Java
    application/x-java-applet;version=1.1 Java
    application/x-java-applet;version=1.1.1 Java
    application/x-java-applet;version=1.1.2 Java
    application/x-java-applet;version=1.1.3 Java
    application/x-java-applet;version=1.2 Java
    application/x-java-applet;version=1.2.1 Java
    application/x-java-applet;version=1.2.2 Java
    application/x-java-applet;version=1.3 Java
    application/x-java-applet;version=1.3.1 Java
    application/x-java-applet;version=1.4 Java
    application/x-java-applet;version=1.4.1 Java
    application/x-java-applet;version=1.4.2 Java
    application/x-java-applet;version=1.5 Java
    application/x-java-applet;jpi-version=1.5.0_12 Java
    application/x-java-bean Java
    application/x-java-bean;version=1.1 Java
    application/x-java-bean;version=1.1.1 Java
    application/x-java-bean;version=1.1.2 Java
    application/x-java-bean;version=1.1.3 Java
    application/x-java-bean;version=1.2 Java
    application/x-java-bean;version=1.2.1 Java
    application/x-java-bean;version=1.2.2 Java
    application/x-java-bean;version=1.3 Java
    application/x-java-bean;version=1.3.1 Java
    application/x-java-bean;version=1.4 Java
    application/x-java-bean;version=1.4.1 Java
    application/x-java-bean;version=1.4.2 Java
    application/x-java-bean;version=1.5 Java
    application/x-java-bean;jpi-version=1.5.0_12 Java
    2.Install Config:
    (2.1)formsweb.cfg
    after install,
    /export/home/ias/OraHome_2/forms/server/formsweb.cfg
    include a section :
    # Page displayed to users to allow them to download Sun's Java Plugin.
    # Sun's Java Plugin is typically used for non-Windows clients.
    # (NOTE: you should check this page and possibly change the settings)
    jpi_download_page=http://java.sun.com/products/archive/j2se/1.4.2_06/index.html
    # Parameter related to the version of the Java Plugin
    jpi_classid=clsid:CAFEEFAC-0014-0002-0006-ABCDEFFEDCBA
    # Parameter related to the version of the Java Plugin
    jpi_codebase=http://java.sun.com/products/plugin/autodl/jinstall-1_4_2-windows-i586.cab#Version=1,4,2,06
    # Parameter related to the version of the Java Plugin
    jpi_mimetype=application/x-java-applet;jpi-version=1.4.2_06
    (2.2)run oracle test form and my forms
    http://s216:7777/forms/frmservlet?form=test&userid=scott/tiger@orcl
    (Oracle simple test demo form)
    or
    tttp://s216:7777/forms/frmservlet?form=myform&userid=scott/tiger@orcl
    (2.3)browser dialogue window display:
    [title:Default Plugin]
    This page contains information of a type (application/x-java-applet;jpi-version=1.4.2_06)that can only be viewed with the appropriate Plug-in.
    Click OK to download Plugin.
    when I Click Ok ,display warning :
    File not found:www.sun.com, check filename ,try later.
    (2.4)change formsweb.cfg
    /export/home/ias/OraHome_2/forms/server/formsweb.cfg
    change:
    jpi_mimetype=application/x-java-applet;jpi-version=1.4.2_06
    to:
    jpi_mimetype=application/x-java-applet;
    (2.5)run again oracle test form and my forms
    http://s216:7777/forms/frmservlet?form=test&userid=scott/tiger@orcl
    (Oracle simple test demo form)
    or
    http://s216:7777/forms/frmservlet?form=myform&userid=scott/tiger@orcl
    (2.6)Problem:
    myform and test(Oracle simple test demo form) can run and display,
    but all buttons(when click) not work(no response);
    all meuns not work...........
    How to Solve this problem?
    thanks in advance.

    The currently supported versions with patches installed are as follows:
    <li>10.1.2.3 (10.1.2.0.2 + patch 5983622)
    <li>11.1.1.4 (11.1.1.2 or 11.1.1.3 + patch 11060983 : this also requires WLS 10.3.4)
    Fusion Middleware (FMw) 11 downloads are available from here:
    http://www.oracle.com/technetwork/middleware/weblogic/downloads/index.html
    Patches are only available to customers with access to MyOracleSupport (http://support.oracle.com)
    For Forms/Reports users, look for the FMw download titled "Portal, Forms, Reports and Discoverer". The distribution includes all that is necessary to design and deploy your applications. Note that WebLogic Server is also required and is a separate download (from the same page). Be sure to carefully review the installation instructions before attempting the process. It may also be helpful to review MyOracleSupport note 1073776.1.

  • I use Outlook for my email on the Safari web browser, and about 90% of the time when I want to attach a pdf or jpg file the email message will crash.

    I use Outlook for my email on the Safari web browser, and about 90% of the time when I want to attach a pdf or jpg file it fails and about 50% of the time when I want to send a standard text massage it will also fail and the email massage crashes. The only way I can get my Outlook to work is if I switch to Firefox web browser. I would rather not switch to a new web browser if I don't have to.
    It seems like what ever the problem is that its related the Safari web browser, because it works fine on the Firefox web browser.
    I think its some kind of plug-in failure because it giving me a LOC ERROR:
    LOC ERROR: Unable to locate localized string for resource ID 5007.
    How can I fix this Plug-in?
    And, yes my softwer is conpletly updated…

    That's an Outlook issue. You'll probably get better responses posting on the Office for Mac forums.

  • About solaris 7 web browser

    Hi, fine;
    I just install solaris 7 for x86,system auto into cde interface.I found explorer's name is hostjava and netscape not open when I open web browser. Please tell me how to do about it.
    Thang you

    Hi,
    Netscape is not bundled with Solaris 7.
    I just installed netscape 4.75, downloaded from http://www.sun.com/solaris/netscape
    And restarted CDE, after that it opens netscape as default browser.
    Thanks
    Kalpesh

  • How to recognize web browser refresh command in bsp code

    Hi,
    I have designed a bsp page on my solman system on which there are some buttons. When I refresh the web browser my last button command is executed again. Is there any way to prevent the last bsp command when I refresh the web browser.
    Regards,

    Hello Ekrem,
    I developed standard BSP (Page With Flow Logic) and I checked it behavior.
    From what I saw: when I pressed the Refresh button it didn't get into OnInputProcess method. only to OnIntialization method, so the button doesn't executed again.
    Try to clear event variables after you use it, may be it will help.
    Good Luck
    Eli Steklov
    Please Reward Points If It Helped

  • Why does refreshing my web browser page increment the number of users connected to my Remote Front Panel?

    Hi,
    I'm using LabVIEW 2010 and a cRIO-9118 to broadcast my RT Front Panel on the web with a Web Server.
    I successfully configured the web server to be able to control my Front Panel remotely. However, I have an issue with "Refreshing" the browser.
    When I press "Enter" to search the adress of the web server, the number of users connected seems to increment by one and then tells me that "Too many users are connected to the front panel". Once this has been done, the only way to "unlock" the web server is to reboot the cRIO.
    Is there any solution to avoid this behavior?
    My current web browser is Internet Explorer 8.
    Thank you
    Mathieu Veillette, Ing Jr.
    Solved!
    Go to Solution.

    Hi Mathieu,
    Unfortunately, there currently isn't a very good solution for the problem you are facing. It seems like this is a known issue that R&D is working on. It so happens that in addition to simply refreshing, this issue also occurs if you try to access the Remote Front Panel using a second tab in a tabbed browser. One "fix" would be to invest in a higher count Remote Front Panel license. If that's not feasible, then the current recommendation would be to avoid connecting to the Remote Front Panel from a second tab or refreshing the view in your browser. Once you exceed the number of connections to the Remote Front Panel, you will have to restart the RT controller -- there isn't a way to change this default behavior. You can track any fixes by R&D by keeping note of the CAR (corrective action request) ID for this issue, which is #202702.
    Sanjay C.
    Embedded Software Product Manager| National Instruments

  • Some questions about the limit of memory usage of Adobe flash player in different OS & Web Browser

    Hi Adobe experts,
    I'm from HP, and now using Adobe flash player making some products about massive data displaying.
    For my target, I need to show more than 200 K rows in client web browser, using AdvancedDataGrid.
    And that may needs more than 200M to cache the data in Web browser memory space.
    So, my questions are:
    Does there any memory usage limit in flash player?
    Say, if we have 4G bytes of physical memory in machine, in Windows, how much can I use in flash player?
    Also, if we have 4G bytes of physical memory in Linux, how much can I use in flash player?
    Does it depends on the Web Browser?
    Say, is there any difference between different web browsers?
                    If the limit exists, can we control the limit?
    Say, can we define some parameters in the tag in web page to expand the limitation?
    Or, can we try to control this limitation by the Flash player management which exists in the Windows Control Panel?
    Best Regards
    Huang Haixu
    +86 18616735091
    [email protected]<mailto:[email protected]>

    1. Yes. The Toolkit for CreateJS is an extra downloadable extension for Flash CS6. It will publish html and js files that will provide the animation instead of the swf that you would normally publish. The success or failure of the resulting javascript version of your animation is the result of working within the constraints of the toolkit. You are pretty much constrained to using the timeline in Flash for your animations. If you work only in Actionscript, then the output will be very disappointing.
    2. Edge outputs javascript, css, and html to give you an animation. The user interface allows you to design within the constraints of what Edge can do. You can preview and adjust and tweek your animation as you work. Edge is an html5 tool. It can create html5 animation. It is not a replacement for Flash. It is something that you can use instead of Flash to embed animation in html.
    The problems and benefits of each are unique. Neither is a good substitute to learning javascript, css and html5. If you don't understand the code that is created from each of these tools, you can easily end up with huge, bloated, files that perform poorly. I'm very biased toward actually knowing what is going on. If I need to edit something, I want to be able to go into the code and make a change, not add an additional chunk of code to work around what was there. I don't use the timeline at all, and so nothing that I have will publish using CreateJS. Well, it will publish, but nothing happens because there is nothing on the timeline to translate.
    You can download a trial of Flash CS6 and try the Toolkit for yourself. Edge is still in free preview, you can get a copy at http://labs.adobe.com and try it to see how it works.
    Also, if you're not using the Greensock Animation Platform with Flash, have a look at that. It has recently been extended to provide Javascript analogues for most of the Libraries. http://www.greensock.com/

  • Open about:config on web browser

    I would like to open the advanced configuration on my web browser for Firefox OS. I have tried typing about:config into the Awesome bar, and then either keying 'enter' or using the Go arrow, to no result.
    The following answer seems to imply that this is possible in Firefox for Android:
    https://support.mozilla.org/en-US/questions/960501#answer-440285

    The about:config "page" definitely exists in both desktop and Android versions of Firefox. However, when I search for about:config in the Firefox OS source code site, I don't find anything but a single comment. It sounds as though that particular page is not used on Firefox OS. Maybe there's a new name for it?

  • About install netscape6 web browser

    Hi,fine:
    I already install netscape 6 on my solaris 7 for x86 system.But
    I open web browser appear "hot java"browser through CDE environment.
    Now I hope my web browser is netscape 6 browser .Please tell me
    how to to it.
    Thank again.

    Make sure the command "netscape" can be found in your $PATH.
    When you click on the "Web-Browser" icon, CDE runs the shell
    script /usr/dt/bin/sdtwebclient to start the web browser. This
    script searches your $PATH for the commands "netscape", "sdthotjava"
    and "hotjave". The scripts starts the first one it finds.

  • About the terrible web browser..

    Hi.
    I just discovered two problems with web browser. First, we can't open new tabs.
    Second, I can't use this board : http://forums.jeuxonline.info/forumdisplay.php?f=189 I don't know how to describe the problem.. When I type, the words don't appear above the keyboard. Then, when I send the message, there is an error telling i typed no words..
    Anyone capable of solving the first or the other problem?
    Thanks

    Possible answer to the first problem. Does anyone know a website with a link opening an almost blank(=leading to a rapid loading page) new tab?

  • Question about private web browsing and Spotlight

    I was browsing personal webpages on a work computer using Safari's 'Private Web Browsing', but although Safari doesn't remember the pages, Spotlight does which is a little concerning!
    I have excluded webpages from Spotlight searches but that doesn't mean the pages have gone. I have tried clearing my history in Safari and Resetting it, to no avail. Can someone tell me how to delete the webpages from Spotlight?
    Thanks and regards

    Hi Rapidness,
    I checked on my computer and do not have this issue. And I have no website located somewhere on my machine, after cleaning / or resetting the browser.
    In the "Safari" - Menu > below the "Private Surfing" > is "Safari Reset"
    Maybe you should try this...
    You can also use "Onyx" to reset the browser. See the link below:
    http://www.titanium.free.fr/pgs2/english/download.html

  • Where is documentation about Adobe Reader web-browser plugin API?

    When Adobe Reader is chosen as plugin to open PDF's inside a web-browser it reacts to some javascript commands in the web page that hosts the <object> tag like "goToPage" or similar. I would like to know which other javascript commands (and events: something like "onPageChanged", for example) are available. Where can I find documentation?
    Thanks

    Microsoft hasn't updated its Windows Media Player plugin for Firefox for a while, so 3-year-old documentation may be current. I recommend using MSDN as a resource, and particularly articles indicating which features work in Firefox.
    You also can work out development issues on a forum more focused on that, the unofficial [http://forums.mozillazine.org/viewforum.php?f=25 mozillaZine Web Development board]. It's a separate site (with separate registration).

  • Very slow GUI in web browser application

    Hello,
    I am trying to write a web browser application and I have a problem with the GUI. When the page is being loaded and set on the JEditorPane the GUI becomes very slow (actually it freezes). I don't know if this happens because of my swing implementation or because I am not using threads properly.
    I use the SwingWorker class. I created a worker thread which loads the web page and then sets it to the JEditorPane.
    Could you give me some ideas please? Below are some parts of my code.
    Thank you
    public class BrowserFrame extends javax.swing.JFrame {
        /** Creates new form BrowserFrame */
        public BrowserFrame() {
            initComponents();
            loadUrlsFromHistoryFile();
        private class RetrievePageTask extends SwingWorker<Void, URL> {
            private String address = null;
            RetrievePageTask(String address) {
                this.address = address;
                pageLoadProgressBar.setIndeterminate(true);
            protected Void doInBackground() {
                URL url = null;
                try {
                    url = new URL(address);
                    publish(url);
                catch(MalformedURLException exc) {
                    System.out.println(exc);
                catch(IOException exc) {
                    System.out.println(exc);
                return null;
            protected void process(List<URL> url) {
                try {
                    pageEditorPane.setPage(url.get(url.size() - 1));
                catch(IOException exc) {
                    System.out.println(exc);
                String url_str = url.get(url.size() - 1).toString();
                addressComboBox.setSelectedItem(url_str);
                addUrlToAddressComboBox(url_str);
        private void addressComboBoxItemStateChanged(java.awt.event.ItemEvent evt) {                                                
            // Get the affected item
            Object item = evt.getItem();
            if(evt.getStateChange() == java.awt.event.ItemEvent.SELECTED) {
                // Item was just selected
                if(item.toString().equalsIgnoreCase(""))
                    return;
                RetrievePageTask retrievePageTask = new RetrievePageTask(item.toString());
                retrievePageTask.execute();
            else if(evt.getStateChange() == java.awt.event.ItemEvent.DESELECTED) {
                // Item is no longer selected
                System.out.println("\nItem: " + item + " is no longer selected");           
        private void addressComboBoxActionPerformed(java.awt.event.ActionEvent evt) {                                               
            if ("comboBoxEdited".equals(evt.getActionCommand())) {
                // User has typed in a string; only possible with an editable combobox
                goButtonActionPerformed(evt);
            else if ("comboBoxChanged".equals(evt.getActionCommand())) {
                // User has selected an item; it may be the same item
                System.out.println("\nSpot TWO");
        private void goButtonActionPerformed(java.awt.event.ActionEvent evt) {
             RetrievePageTask retrievePageTask = new RetrievePageTask(address);
             retrievePageTask.execute();
        private void pageEditorPaneHyperlinkUpdate(javax.swing.event.HyperlinkEvent evt) {                                              
            if(evt.getEventType() == javax.swing.event.HyperlinkEvent.EventType.ACTIVATED) {
                 RetrievePageTask retrievePageTask = new RetrievePageTask(evt.getURL().toString());
                retrievePageTask.execute();
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    BrowserFrame surfRider = new BrowserFrame();
                    surfRider.setVisible(true);
    }

    Now it is all.
    package webbrowser;
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import javax.swing.*;
    public class BrowserFrame extends javax.swing.JFrame {
        /** Creates new form BrowserFrame */
        public BrowserFrame() {
            initComponents();
            loadUrlsFromHistoryFile();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc=" Generated Code ">                         
        private void initComponents() {
            addressLabel = new javax.swing.JLabel();
            goButton = new javax.swing.JButton();
            jScrollPane1 = new javax.swing.JScrollPane();
            pageEditorPane = new javax.swing.JEditorPane();
            jButton1 = new javax.swing.JButton();
            jButton2 = new javax.swing.JButton();
            jButton3 = new javax.swing.JButton();
            homeButton = new javax.swing.JButton();
            refreshButton = new javax.swing.JButton();
            addressComboBox = new javax.swing.JComboBox();
            jLabel1 = new javax.swing.JLabel();
            statusLabel = new javax.swing.JLabel();
            pageLoadProgressBar = new javax.swing.JProgressBar();
            menuBar = new javax.swing.JMenuBar();
            fileMenu = new javax.swing.JMenu();
            openFileMenuItem = new javax.swing.JMenuItem();
            exitMenuItem = new javax.swing.JMenuItem();
            viewMenu = new javax.swing.JMenu();
            historyMenuItem = new javax.swing.JMenuItem();
            pageSourceMenuItem = new javax.swing.JMenuItem();
            toolsMenu = new javax.swing.JMenu();
            preferencesMenuItem = new javax.swing.JMenuItem();
            helpMenu = new javax.swing.JMenu();
            aboutMenuItem = new javax.swing.JMenuItem();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            setTitle("Surf Rider");
            setName("browserFrame");
            addWindowListener(new java.awt.event.WindowAdapter() {
                public void windowClosing(java.awt.event.WindowEvent evt) {
                    formWindowClosing(evt);
            addressLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
            addressLabel.setText("Address:");
            goButton.setText("GO");
            goButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    goButtonActionPerformed(evt);
            pageEditorPane.setEditable(false);
            pageEditorPane.setContentType("text/html");
            pageEditorPane.addHyperlinkListener(new javax.swing.event.HyperlinkListener() {
                public void hyperlinkUpdate(javax.swing.event.HyperlinkEvent evt) {
                    pageEditorPaneHyperlinkUpdate(evt);
            jScrollPane1.setViewportView(pageEditorPane);
            jButton1.setText("Back");
            jButton1.setEnabled(false);
            jButton2.setText("Forth");
            jButton2.setEnabled(false);
            jButton3.setText("Stop");
            jButton3.setEnabled(false);
            homeButton.setText("Home");
            homeButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    homeButtonActionPerformed(evt);
            refreshButton.setText("Refresh");
            refreshButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    refreshButtonActionPerformed(evt);
            addressComboBox.setEditable(true);
            addressComboBox.addItemListener(new java.awt.event.ItemListener() {
                public void itemStateChanged(java.awt.event.ItemEvent evt) {
                    addressComboBoxItemStateChanged(evt);
            addressComboBox.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    addressComboBoxActionPerformed(evt);
            jLabel1.setText("Browser status: ");
            statusLabel.setText("Current status");
            pageLoadProgressBar.setBorder(javax.swing.BorderFactory.createEtchedBorder());
            fileMenu.setText("File");
            fileMenu.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    fileMenuActionPerformed(evt);
            openFileMenuItem.setLabel("Open File...");
            openFileMenuItem.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    openFileMenuItemActionPerformed(evt);
            fileMenu.add(openFileMenuItem);
            exitMenuItem.setLabel("Exit");
            fileMenu.add(exitMenuItem);
            menuBar.add(fileMenu);
            viewMenu.setText("View");
            viewMenu.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    viewMenuActionPerformed(evt);
            historyMenuItem.setLabel("History");
            viewMenu.add(historyMenuItem);
            pageSourceMenuItem.setLabel("Page Source");
            viewMenu.add(pageSourceMenuItem);
            menuBar.add(viewMenu);
            toolsMenu.setText("Tools");
            preferencesMenuItem.setLabel("Preferences");
            toolsMenu.add(preferencesMenuItem);
            menuBar.add(toolsMenu);
            helpMenu.setText("Help");
            aboutMenuItem.setLabel("About");
            helpMenu.add(aboutMenuItem);
            menuBar.add(helpMenu);
            setJMenuBar(menuBar);
            org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                    .add(jButton1)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(jButton2)
                    .add(6, 6, 6)
                    .add(refreshButton)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(jButton3)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(homeButton)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(addressLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 56, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(addressComboBox, 0, 568, Short.MAX_VALUE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(goButton))
                .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1008, Short.MAX_VALUE)
                .add(layout.createSequentialGroup()
                    .addContainerGap()
                    .add(jLabel1)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(statusLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 339, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 470, Short.MAX_VALUE)
                    .add(pageLoadProgressBar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
            layout.setVerticalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(layout.createSequentialGroup()
                    .addContainerGap()
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(goButton)
                        .add(jButton1)
                        .add(jButton2)
                        .add(homeButton)
                        .add(jButton3)
                        .add(refreshButton)
                        .add(addressLabel)
                        .add(addressComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 601, Short.MAX_VALUE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(jLabel1)
                            .add(statusLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .add(pageLoadProgressBar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
            java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
            setBounds((screenSize.width-1016)/2, (screenSize.height-724)/2, 1016, 724);
        }// </editor-fold>                       
        private class RetrievePageTask extends SwingWorker<Void, URL> {
            private String address = null;
            RetrievePageTask(String address) {
                this.address = address;
                pageLoadProgressBar.setIndeterminate(true);
            public String getAddress() {
                return address;
            public void setAddress(String newAddress) {
                address = newAddress;
            protected Void doInBackground() {
                URL url = null;
                try {
                    url = new URL(address);
                    publish(url);
                catch(MalformedURLException exc) {
                    System.out.println(exc);
                catch(IOException exc) {
                    System.out.println(exc);
                return null;
            protected void process(List<URL> url) {
                try {
                    System.out.println("\nBefore setting the editorPane");
                    pageEditorPane.setPage(url.get(url.size() - 1));
                catch(IOException exc) {
                    System.out.println(exc);
                String url_str = url.get(url.size() - 1).toString();
                url_str = url_str.toLowerCase(); // URL string is turned in lower case
                addressComboBox.setSelectedItem(url_str);
                addUrlToAddressComboBox(url_str);
                pageLoadProgressBar.setIndeterminate(false);
        private void openFileMenuItemActionPerformed(java.awt.event.ActionEvent evt) {                                                
    // TODO add your handling code here:
        private void viewMenuActionPerformed(java.awt.event.ActionEvent evt) {                                        
    // TODO add your handling code here:
        private void fileMenuActionPerformed(java.awt.event.ActionEvent evt) {                                        
    // TODO add your handling code here:
        private void refreshButtonActionPerformed(java.awt.event.ActionEvent evt) {                                             
        // Action performed when homeButton's Action Listener listens to an event. This
        // event is passed here as a parameter (evt). The selected item of the addressComboBox is
        // set to be the homePage. The browser goes to the home page.
        private void homeButtonActionPerformed(java.awt.event.ActionEvent evt) {                                          
            addressComboBox.setSelectedItem(homePage);
        // This method loads the URL history from the history.txt file into the vector and into the
        // addressComboBox.
        private void loadUrlsFromHistoryFile() {
            BufferedReader inputStream = null;
            addressComboBox.setSelectedItem(homePage);
            try {
                inputStream = new BufferedReader(new FileReader("history.txt"));
                String tmp;
                while((tmp = inputStream.readLine()) != null) {
                    // Adding url to history_mem vector
                    historyMem.add(tmp);
                    // Adding url to addressComboBox
                    addressComboBox.addItem(tmp);
            catch(IOException exc) {
                System.out.println(exc);
        private void addressComboBoxItemStateChanged(java.awt.event.ItemEvent evt) {                                                
            // Get the affected item
            Object item = evt.getItem();
            if(evt.getStateChange() == java.awt.event.ItemEvent.SELECTED) {
                // Item was just selected
                System.out.println("\nItem: " + item + " was just selected");
                if(item.toString().equalsIgnoreCase(""))
                    return;
                RetrievePageTask retrievePageTask = new RetrievePageTask(item.toString());
                retrievePageTask.execute();
            else if(evt.getStateChange() == java.awt.event.ItemEvent.DESELECTED) {
                // Item is no longer selected
                System.out.println("\nItem: " + item + " is no longer selected");           
        // Action performed when an event occurs in the addressComboBox (eg Pressing enter
        // after typing the address).
        private void addressComboBoxActionPerformed(java.awt.event.ActionEvent evt) {                                               
            if ("comboBoxEdited".equals(evt.getActionCommand())) {
                // User has typed in a string; only possible with an editable combobox
                goButtonActionPerformed(evt);
            else if ("comboBoxChanged".equals(evt.getActionCommand())) {
                // User has selected an item; it may be the same item
        // Action performed when goButton's Action Listener listens to an event. This
        // event is passed here as a parameter (evt). When a valid URL is inserted, the
        // pageEditorPane is set to that URL.
        private void goButtonActionPerformed(java.awt.event.ActionEvent evt) {                                        
            // 6 spaces added to the address. This is done for control reasons. Below we
            // use substring which causes exception when those spaces do not exist.
            String address = addressComboBox.getSelectedItem() + "      ";
            if(addressComboBox.getSelectedItem() == null || address.equalsIgnoreCase("      ") || address.equalsIgnoreCase("http://      ")) {
                JOptionPane.showMessageDialog(null, "No address specified.", "No address", javax.swing.JOptionPane.ERROR_MESSAGE);
            else {
                if(!address.substring(0, 7).equalsIgnoreCase("http://"))
                    address = "http://" + address;
                    RetrievePageTask retrievePageTask = new RetrievePageTask(address);
                    retrievePageTask.execute();
        // Action performed when closing the form window
        private void formWindowClosing(java.awt.event.WindowEvent evt) {                                  
            try {
                addUrlsToHistoryFile(historyMem);
            catch(IOException exc) {
                System.out.println(exc);
        /* This method is used to handle the case in which the user clicks on a hyperlink.
         In this case the pageEditorPane must present the contents of the URL that was
         clicked. This URL is retrieved from the evt object (which is a parameter to this
         method) with the method getURL().
        private void pageEditorPaneHyperlinkUpdate(javax.swing.event.HyperlinkEvent evt) {                                              
            if(evt.getEventType() == javax.swing.event.HyperlinkEvent.EventType.ACTIVATED) {
                 RetrievePageTask retrievePageTask = new RetrievePageTask(evt.getURL().toString());
                retrievePageTask.execute();
        // This method adds the visited URLs to the addressComboBox's item list. It takes as a
        // parameter the URL which is going to be added. If the URL is already in the list, then
        // it is not added again.
        private void addUrlToAddressComboBox(String url_str) {
            // number of items in the combo box's list
            int itemCount = addressComboBox.getItemCount();
            for(int i = 0; i < itemCount; i++) {
                if(url_str.equalsIgnoreCase((String)addressComboBox.getItemAt(i)))
                    return;
            addressComboBox.addItem(url_str);
            historyMem.add(url_str);
        // This method adds the visited URLs to the history file. It takes as a parameter the URL
        // which is going to be added.
        private void addUrlsToHistoryFile(Vector url_history) throws IOException {
            PrintWriter outputStream = null;
            try {
                outputStream = new PrintWriter(new FileWriter("history.txt"));
                for(int i = 0; i < url_history.size(); i++)
                    outputStream.println((String)url_history.get(i));
            finally {
                if(outputStream != null) {
                    outputStream.close();
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    BrowserFrame surfRider = new BrowserFrame();
                    surfRider.setVisible(true);
        // Variables declaration - do not modify                    
        private javax.swing.JMenuItem aboutMenuItem;
        private javax.swing.JComboBox addressComboBox;
        private javax.swing.JLabel addressLabel;
        private javax.swing.JMenuItem exitMenuItem;
        private javax.swing.JMenu fileMenu;
        private javax.swing.JButton goButton;
        private javax.swing.JMenu helpMenu;
        private javax.swing.JMenuItem historyMenuItem;
        private javax.swing.JButton homeButton;
        private javax.swing.JButton jButton1;
        private javax.swing.JButton jButton2;
        private javax.swing.JButton jButton3;
        private javax.swing.JLabel jLabel1;
        private javax.swing.JScrollPane jScrollPane1;
        private javax.swing.JMenuBar menuBar;
        private javax.swing.JMenuItem openFileMenuItem;
        private javax.swing.JEditorPane pageEditorPane;
        private javax.swing.JProgressBar pageLoadProgressBar;
        private javax.swing.JMenuItem pageSourceMenuItem;
        private javax.swing.JMenuItem preferencesMenuItem;
        private javax.swing.JButton refreshButton;
        private javax.swing.JLabel statusLabel;
        private javax.swing.JMenu toolsMenu;
        private javax.swing.JMenu viewMenu;
        // End of variables declaration                  
        // Variables decleration - able to modify
        private Vector<String> historyMem = new Vector<String>();
        private String homePage = "http://www.kaissa.gr";
        // End of variables decleration
        // PUBLIC METHODS
        // Get and Set methods for the private variables declared above
        public Vector getHistoryMem() {
            return historyMem;
        public void setHistoryMem(Vector<String> newHM) {
            historyMem = newHM;
        public String getHomePage() {
            return homePage;
        public void setHomePage(String newHP) {
            homePage = newHP;
    }

  • Could not web-browsing via my N95

    Last night, when I try to use my N95 for web-browsing via wireless network, I discovered that whatever how many times I try to click on the "world icon" from my cell, it can't show up the web-browsing mode anymore.
    Eventually, I hv tried to switch off my cell, and re-start it again. But still, the problem is still here.
    So does anyone have this experience before? Or the only way to fix this problem is update the firmware to V12?
    Thanks
    MikeMessage Edited by mikechan929 on 11-Oct-200710:12 PM
    Message Edited by mikechan929 on 11-Oct-200710:14 PM

    What kind of VPN software are you using on your Nokia N73 phone?
    Chances are that you are using:
    - SymVPN from www.telexy.com
    - or NCP VPN from www.ncp-e.com
    - or Nokia Mobile VPN (mVPN) from www.nokia.com
    I am successfully using SymVPN on Nokia 5800 for Web browsing, MailForExchange, connecting Intranet and making VoIP calls over VPN.
    About your problem with WEB browsing over VPN connection. I saw a comment in FAQ section for SymVPN, saying that for some Nokia phones and firmware versions, users need to make some kind of refresh for web page after first usage of standard WEB browser with VPN connection, after that all should be fine. Probably this trick will work for you too.
    Couple weeks ago I have tried Opera Mini over VPN and didn't notice any problem.
    On Nokia 5800 I can access VPN Access Point via Destination folder where I keep my VPN connections created in SymVPN. I guess there is no Destinations on your Nokia N73 and VPN Access Point should be available for selection in the same place where regular Access Points are.

Maybe you are looking for

  • Materials with multiple plants and wm views

    Hello, we are migrating materials to an environment where we have multiple plants, sales org., warehouse numbers. When we create the WM view we set a plant and warehouse number. As WM view is not really connected to a plant (table MLGN) we have the p

  • What Macbook would be perfect for me? What would best suit my activity/needs?

    I currently have a Toshiba L650 Satellite. I'm an 18 year old female, and I want to buy my very first macbook. As Macbooks are expensive, I want to get the perfect one for me. I use my laptop for: -Photoshop (I edit a lot of pictures/gifs/etc) -Photo

  • Running multiple VI's from one data source

    Hello, I am newer to Labview, and currently stuck on a problem. I have created a program to serial read from an RS232 port and extracted multiple points of the string and display it to the web. I would like to create a second VI from the same RS232 p

  • Unable to download apps with creative cloud installer

    Trying to download an app, I get a window that reads Installer wants to make changes type password to allow, after carefully typing in the correct password the installer window does not work. Why isn't the installer working?

  • Formula - Crystal Report

    Hello all, I have report a for Sales by Sales Employees. The Sales Column is less VAT and I have used the formula (OINV.DocTotal/1.16) to get sales figure. NB. VAT = 16% However, I want to come up with a conditional formula to exclude invoices with z