How to retain the java applet generated code when back button is pressed!!

I've a jsp page in which i've wirtten the code which specifies the word which i write in the text box, then through the applet i'm showing the word which is written in the text box. It means my applet is running and it show the words which i've written in the text box. Now when i click on submit it goes to the next page and when i click on browser's back button then except the applet generated code everyone retains its values. Is there any way to find it out when it encounter the back button click then applet should be restarted. so in this way without writing the whole application form and in the applet generated code i can submit it again.
My question is how do i reatin the applet generated code when a click button is being pressed (b'coz for the textbox, textareas everything retains it)
any suggestions or guidance are most welcome.
thanks in advance....

you don't need to navigate explicitly. Just clear the back stack till your specific page and say goback. below is the  code you can use.
 protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs e)
                    e.cancel=true;
                RemoveBackStackTillSpecificPage("page2.xaml");
                GoBack();
public static void RemoveBackStackTillSpecificPage(string pageName)
PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame;
var previousPage = frame.BackStack.FirstOrDefault();
if (previousPage != null && previousPage.Source != null)
                while (!previousPage.Source.ToString().Contains(pageName))
                    frame.RemoveBackEntry();
                    previousPage = frame.BackStack.FirstOrDefault();
        public static void GoBack()
            PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame;
            LastPageUri = frame.Source;
            frame.GoBack();
Please mark this as answer if this answers your question
Purushothama V S

Similar Messages

  • How to retain the work item in inbox of user if user press the icon cancel?

    HI,
    we  are using a text editor in approval section of workflow where the user needs to enter the reason for apporval or rejection.
    the requirement is how to retain the work item in inbox of user if user press the icon cancel? there are two icons in editor,one is ok(tick marg) and cancel(cross mark).
    so when user dont enter any text in the editor and press on cancel icon,then approval/rejection should not authorize and work item will remain in the user's inbox .unless and untill he enters the text.
    i have tried   LEAVE TO TRANSACTION 'SBWP'.leave program etc but nothing is working.
    please guide me.
    thanks
    prsahu

    Hi,
    Go with Sangvir Singh suggestion.
    It also looks neater from a Business Process Modeling perspective. You continue the process flow only when a change has occurred.
    Kind regards, Rob Dielemans

  • How to maximize the java applet?

    Dear all,
    I have an application & when ever i run it, the java applet never comes in a maximum size. so is there a way to make it run in a maximum size?
    best regards,
    Ashraf

    so but htese two lines in the new_form_instancse trigger
    SET_WINDOW_PROPERTY(FORMS_MDI_WINDOW,WINDOW_STATE,MAXIMIZE);
              SET_WINDOW_PROPERTY('WINDOW1',WINDOW_STATE,MAXIMIZE);
    good luck

  • How to compile the Java classes generated in JAXB

    I am using Windows 2000 Operating System. I found a xjc
    batch file on the sun's java forum.
    I used that to generate classes from XML. After generating
    the classes I could not compile
    the classes each depends on other AND THEY REQUIRE BOTH
    CLASS FILES.
    I will attach the schema file and dtd . Can you explaine me the problem.
    #<transactions.dtd>
    <?xml version="1.0" encoding="UTF-8"?>
    <!ELEMENT transactions (cardtocard*)>
    <!ELEMENT cardtocard (tocard, fromcard, fromcardver, amount, transdate, transid)
    >
    <!ELEMENT tocard (#PCDATA)>
    <!ELEMENT fromcard (#PCDATA)>
    <!ELEMENT fromcardver (#PCDATA)>
    <!ELEMENT amount (#PCDATA)>
    <!ELEMENT transdate (#PCDATA)>
    <!ELEMENT transid (#PCDATA)>
    transactions.xjs
    <xml-java-binding-schema>
    <element name="transactions" type="class" root="true"/>
    <element name="cardtocard" type="class"/>
    </xml-java-binding-schema>
    XML file
    ?xml version="1.0" encoding="UTF-8"?>
    <!--Sample XML file generated by XML Spy v4.4 U (http://www.xmlspy.com)-->
    <transactions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="C:\My Documents\Xml\SVTConcord.xsd">
    <cardtocard>
    <tocard>1111222233334444</tocard>
    <fromcard>6666777788889999</fromcard>
    <fromcardver>567</fromcardver>
    <amount>100.00</amount>
    <transdate>2002-06-04 00:00:00.000</transdate>
    <transid>1111222202</transid>
    </cardtocard>
    </transactions>
    the XJC compiler for windows is
    @echo off
    echo JAXB Schema Compiler
    echo --------------------
    if "%JAVA_HOME%" == "" goto errorJVM
    if "%JAXB_HOME%" == "" goto errorJAXB
    set JAXB_LIB=%JAXB_HOME%\lib
    set JAXB_CLASSES=%JAXB_HOME%\classes
    echo %JAVA_HOME%\bin\java.exe -jar %JAXB_LIB%\jaxb-xjc-1.0-ea.jar %1 %2 %3 %4 %5
    %JAVA_HOME%\bin\java.exe -jar %JAXB_LIB%\jaxb-xjc-1.0-ea.jar %1 %2 %3 %4 %5
    goto end
    :errorJVM
    echo ERROR: JAVA_HOME not found in your environment.
    echo Please, set the JAVA_HOME variable in your environment to match the
    echo location of the Java Virtual Machine you want to use.
    echo For example:
    echo set JAVA_HOME=c:\jdk1.4.0_01
    goto end
    :errorJAXB
    echo ERROR: JAXB_HOME not found in your environment.
    echo Please, set the JAXB_HOME variable in your environment to match the
    echo location of the JAXB installation directory.
    echo For example:
    echo set JAXB_HOME=c:\jdk1.4.0_01\jaxb-1.0-ea
    :end

    When you compile the generated classes, be sure to put jaxb-rt-1.0-ea.jar in your classpath!

  • How to go to previous page in windows phone 8 when back button is pressed

    I have a home page or landing page in my windows phone c# based app where user enters login details and upon successful login user is redirected to page2 . Here the user will see a list box with few items . Upon selecting an item from this list box a new
    page called "Threadx" opens.(where x is the each page that opens upon clicking the x item in the list box)
    While user is on this Thread page "Threadx" he may receive the toast notifications and the thread gets updated with new replies or answers on that thread.
    But When user clicks on back button the "ThreadX" page doesn't get closed and instead it goes to its previous state where it has less number of messages , and so on until the app gets closed.
    protected override void OnNavigatedTo(NavigationEventArgs e)
    base.OnNavigatedTo(e);
    if (e.NavigationMode == NavigationMode.Back)
    return;
    I would like to know if this "Threadx" page can be closed upon clicking back button without affecting other "Threadx+1","Threadx+2"..."Threadx+n" pages.
    Any help would be really appreciated.

    you don't need to navigate explicitly. Just clear the back stack till your specific page and say goback. below is the  code you can use.
     protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs e)
                        e.cancel=true;
                    RemoveBackStackTillSpecificPage("page2.xaml");
                    GoBack();
    public static void RemoveBackStackTillSpecificPage(string pageName)
    PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame;
    var previousPage = frame.BackStack.FirstOrDefault();
    if (previousPage != null && previousPage.Source != null)
                    while (!previousPage.Source.ToString().Contains(pageName))
                        frame.RemoveBackEntry();
                        previousPage = frame.BackStack.FirstOrDefault();
            public static void GoBack()
                PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame;
                LastPageUri = frame.Source;
                frame.GoBack();
    Please mark this as answer if this answers your question
    Purushothama V S

  • What to do when 'Back' button is pressed on the browser

    Hi,
    In my APEX application, 2 of my pages have updateable reports.
    When I carry out the following sequence of steps :
    * enter data into the first updateable report page,
    * submit the page
    * branch to the second updateable report page by clicking on a 'next' button
    * click on the 'Back' button in the browser
    * this takes you back to the first updateable report page
    * click on 'next' to branch to the second updateable report page again
    the following error message is encountered :
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-20001: ORA-20001: Current version of data in database has changed since user initiated update process. current checksum = "906775940285549CB76B11266BA4E3FF", item checksum = "D52870AB188799BE563B8BE7E53DB2AF"., update <name of table that updeable report is based on>
    How can I prevent this error message from appearing when the user clicks 'back' and then submits the page?
    Many Thanks.

    Andy,
    Thanks for sticking with it. I read (past tense) the OP's description both ways.
    click on 'next' to branch to the second updateable report page again
    the following error message is encountered :
    Error in mru internal routine: ...Why would that error occur after a redirect from a Next button?
    So I don't know what the exact scenario really is, but it seems to me that if you submit a page and it updates the row and the page branches back to itself, the resulting page now current in the browser is "submittable" whether you submit it at once or navigate (by redirect) away from it and then go back through the browser history to retrieve it and then submit it. That the OP got the error she got makes me think the Next button is an Apply Changes and Fetch Next Row kind of button.
    In any case, I don't think clearing session state is a remedy.
    Scott

  • How to prevent the insertion of rollover code when using a template

    Hi there
    I am designing a site in Dreamweaver using templates. These templates use rollover images. The code that DW uses for the rollover I have abstracted out into a separate javascript file, which is linked to in the header. Further, I am using window.onload() to call the preloader instead of the <body> onload event. All this works fine.
    The problem is that every time I make a change to the template, DW re-inserts the rollover code into the head of the HTML file, and reinserts the preloader code into the <body> tag.
    Now, I have found a solution to the <body> tag problem by changing the preload flag from 1 to 0 in the link created; it seems that DW uses this flag as in indication of whether to insert the onload code into the boday tag.  So that part is fixed.
    But I can't find any way to keep DW from inserting the unecessary and redundant rollover code into the head of the generated HTML files.  Is there a way I can prevent this from happening?
    ...Mike  

    Just don't externalize your js until the very last step before publishing.
    You can let the dev team know about this here -
    http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

  • How to read the java analytical workspace object, when it is being rebuild?

    Hi is there any way to save the OLAP into java object, so that it can be read even though it is being rebuild?
    so when I rebuild the AW(analytical workspace), the other user still can read the old AW object while waiting the new AW object is build
    I even try to create 2 AW, while I create 1 AW I try to read another AW in the same database schema
    but then the reading process for the second AW is hang until the creation of the first AW is finish
    is there any way so that the process can happen simultaneously without waiting the building process is finished?

    A second user should be able to access an AW even while it is being built as long as the two users have different sessions - instances of OracleConnection in jdbc terms. It is not enough to use two Java Threads sharing the same connection.

  • How to retain the format in MS word when creating PDF using arabic fonts.

    I have a word document using Arabic fonts. When I create the PDF, it looses all the formatting. Can someone help me solve this issue. Thank you.

    Hi Ricol -
    Thanks for reporting the issue.
    We would need the files for investigation. Request you to share your email id for correspondence.
    Regards,
    Reetika

  • How to retain the same resolution while croping a tiff image using jai api

    Hi all,
    I have designed a program to crop a tiff image.But after croping the tiff,the resultant file resolution is not the same as the original source file.
    In the program,the source file Nadeshiko_v1_02.tif has the resolution(X) of 1200 DPI and resolution(Y) has 1200 DPI pixels.
    But after croping the resolution of output file is 100 DPI.
    Please give me some idea on how to retain the same resolution.
    <code>
    package jai;
    import java.awt.Frame;
    import java.awt.image.RenderedImage;
    import java.awt.image.renderable.ParameterBlock;
    import java.awt.image.renderable.RenderableImage;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import javax.imageio.*;
    import javax.imageio.stream.ImageOutputStream;
    import javax.media.jai.Interpolation;
    import javax.media.*;
    import javax.media.jai.JAI;
    import javax.media.jai.PlanarImage;
    import javax.media.jai.RenderedOp;
    import javax.media.jai.widget.ScrollingImagePanel;
    import com.sun.media.jai.codec.FileSeekableStream;
    import com.sun.media.jai.codec.SeekableStream;
    import com.sun.media.jai.codec.TIFFEncodeParam;
    import javax.media.jai.OperationDescriptorImpl;
    import java.io.*;
    import java.util.Iterator;
    import javax.media.jai.operator.*;
    // import javax.media.jai.widget.ScrollingImagePanel;
    public class crop {
              /** The main method. */
    public static void main(String[] args) {
    /* Validate input. */
    /* if (args.length != 1) {
    System.out.println("Usage: java JAISampleProgram " +
    "input_image_filename");
    // System.exit(-1);
    float a=(float) 70.3;
    float b=(float) 70.4;
    float c=(float) 3100.3;
    float d=(float) 5522.4;
    * Create an input stream from the specified file name
    * to be used with the file decoding operator.
    String TIFF="TIFF";
    FileSeekableStream stream = null;
    try {
         stream = new FileSeekableStream("D:\\tif images\\Nadeshiko_v1_02.tif");
    // stream = new FileSeekableStream("D:\\tif images\\Nadeshiko_v1_01.jpg");
    } catch (IOException e) {
    e.printStackTrace();
    System.exit(0);
    // Load the source image from a Stream.
    RenderedImage im = JAI.create("stream", stream);
    RenderedImage image2= CropDescriptor.create(im, a, b, c, d, null);
    ScrollingImagePanel panel = new ScrollingImagePanel(image2, 100, 100);
    // Create a frame to contain the panel.
    Frame window = new Frame("JAI Image Cropping");
    window.add(panel);
    window.pack();
    // window.show();
    // Define the source and destination file names.
    // String inputFile = "D:\\tif images\\Nadeshiko_v1_05.tif";
    String outputFile = "D:\\tif images\\Nadeshiko_v1_04.tif";
    // Save the image on a file. We cannot just store it, we must set the image encoding parameters
    // to ensure that it will be stored as a tiled image.
    TIFFEncodeParam tep = new TIFFEncodeParam();
    tep.setWriteTiled(true);
    tep.setTileSize(80,80);
    JAI.create("filestore",image2,outputFile,"TIFF",null);
    try {
                   stream.close();
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    </code>
    Thanks,
    Sanat Meher

    Try the following,
    TIFFEncodeParam tep = new TIFFEncodeParam();
    // Create {X,Y}Resolution fields.
    TIFFField fieldXRes = new TIFFField(0x11A, TIFFField.TIFF_RATIONAL,
                                        1, new long[][] {{DPI_X, 1}});
    TIFFField fieldYRes = new TIFFField(0x11B, TIFFField.TIFF_RATIONAL,
                                        1, new long[][] {{DPI_Y, 1}});
    tep.setExtraFields(new TIFFField[] {fieldXRes, fieldYRes});

  • How to Use the JAVA SCRIPT code in .htm page of the component

    Hi .
    In my requirement i have to use Java Script Function in .htm code ..how to use the java script code and functions in .htm???
    thank you
    B.Mani

    Check this document  [Arun's Blog|http://wiki.sdn.sap.com/wiki/display/CRM/CRMWebClientUI-TalkingwithJava+Script]
    Regards
    Kavindra

  • How to read the Java source code (in Netbeans)

    I use OS X10.5.5, NetBeans 6.1 and JSE 6 on a 64 bit mac.
    When I downloaded NB6.1 it had JSE 5 as it's default (and only) java platform. I ran Software Update to get Java 6 from Apple, used the Java Prefrences utitlity to set JSE6 as default. In NB I added the JDK6 platform, registered the JDK6 javadocs and noticed that I also have the option of registering the Java source code.
    I have three questions:
    1) How do I make JDK6 the default in NetBeans. The JDK5 keeps being default after I did the steps above and I don't see anywhere to change that.
    2) How do I read the Java 6 source code? I can see sun provides [source code| http://download.java.net/jdk6/] for their supported platforms. I dont see Apple doing the same for its JDK port. What would I need to do to get to read the java SE6 sources? or is it actually hiding somewhere in the /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home hierarchy?
    3) Where does the JVM look for the binary code to run when I make a call to, say java.util.ArrayList or any other library. In my naivety I would have assumed it would be a .class file somewhere in the java Home folder, but I don't see anything like it.
    thanks in advance,
    chris

    This is taken from the help included with netbeans. In response to question 1.
    By default, the IDE uses the version of the Java SE platform (JDK) with which the IDE runs as the default Java platform
    for compilation, execution, and debugging. You can view your IDE's JDK version by choosing Help > About and clicking the
    Detail tab. The JDK version is listed in the Java field.
    You can run the IDE with a different JDK version by starting the IDE with the --jdkhome jdk-home-dir switch on the command line
    or in your IDE-HOME/etc/netbeans.conf file. For more information, see IDE Startup Parameters.
    In the IDE, you can register multiple Java platforms and attach Javadoc and source code to each platform. For example, if you
    want to work with the new features introduced in JDK 5.0, you would either run the IDE on JDK 5.0 or register JDK 5.0 as a
    platform and attach the source code and Javadoc to the platform.
    In  , you can switch the target JDK in the Project Properties dialog box. In  , you have to set the target JDK in the Ant script itself,
    then specify the source/binary format in the Project Properties dialog box.
    To register a new Java platform:
    Choose Tools > Java Platforms from the main window.
    Click New Platform and select the directory that contains the Java platform. Java platform directories are marked with a  
    in the file chooser.
    Use the Sources and Javadoc tabs to attach Javadoc documentation and source code for debugging to the platform.
    Click Close.
    To set the default Java platform for a standard project:
    Right-click the project's root node in the Projects window and choose Properties.
    In the Project Properties dialog box, select the Libraries node in the left pane.
    Choose the desired Java platform in the Java Platform combo box.
    Switching the target JDK for a standard project does the following:
    Offers the new target JDK's classes for code completion.
    If available, displays the target JDK's source code and Javadoc documentation.
    Uses the target JDK's executables (javac and java) to compile and execute your application.
    Compiles your source code against the target JDK's libraries.
    If you want to register additional Java platforms with the IDE, you can do so by clicking the Manage Platforms button.
    Then click the Add Platform button and navigate to the desired platform.
    To set the target Java platform for a free-form project:
    In your Ant script, set the target JDK as desired in the javac, java, and javadoc tasks.
    Right-click the project's root node in the Projects window and choose Properties.
    In the Sources panel, set the level of JDK you want your application to be run on in the Source/Binary Format combo box.
    When you access Javadoc or source code for JDK classes, the IDE searches the Java platforms registered in the
    Java Platform Manager for a platform with a matching version number. If no matching platform is found, the IDE's default platform is used instead.
    See Also
    Managing the Classpath
    Declaring the Classpath in a Free-Form Project
    Stepping Through Your Program
    Legal Notices

  • How do I clear all of the java applets that have been downloaded?

    I migrated firefox and other applications to my new mac so that I would not to reenter all of my passwords saved by firefox. However, it appears that the java applets were also transfered and one of these applets does not work with the new intel mac. I was able to get the same applet to work in safari, and I was able to delete the applet from safari as well, but was unable to do so in firefox.
    So, how do I clear all of the previously downloaded applets, or even better, just the one I want to? Clearing all of the recent history didn't work.
    Here is the site:
    http://www.mdbg.net/chindict/chindict.php
    == This happened ==
    A few times a week

    I did that already, and it cleared the applets for Safari, but not for Firefox.

  • How to get the java code of the message mapping

    how to get the java code of the message mapping,
    I mean to ask how to get the background java code of the message mapping(graphical mapping).
    And where to view it?

    Hi Satya,
    The JAVA code for graphical msg mapping is in below folder:
    \usr\sap\<SID>\<DVEBMGS10>\j2ee\cluster\server0\temp\classpath_resolver
    Here all the mapping jars are there in this folder.
    Just decompile these jars and you can see the code.
    Thanks,
    Rajeev Gupta
    Message was edited by:
            RAJEEV GUPTA

  • How do i get the java applet to stop appearing on the dock?

    how do i get the java applet to stop appearing on the dock? it seems to do this for pop-up windows.  also, the text on the popup window is different, how can I change that to normal?   this all started when i loaded MAC OS X 10.6.8

    You could try to block popup windows.
    Safari / Preferences / Security
    Also, go to Safari / Preferences / Extensions and clean out everything there.

Maybe you are looking for

  • Vendor expencess report

    Hi, One of our client requested to prepare report on each vendor wise how much amount spent on cost center and gl account wise. Ex: Take "RE"document as an example, from here we should select RE document ... through GR/IR line item we can go through

  • CS 4 Tabbed view and moving layers b/w documents

    I want to know if it's possible to select a layer from the layer palette start dragging it and move it to another open document while in tabbed view. It is possible when each document is in a separate window. I am on OS X 10.4.11 with CS 4 11.0.1 Tha

  • Urgent - Connectivity between Oracle 8i and Forms5.0

    I have installed Oracle 8i with the Oracle Home as c:\Oracle and Forms 5.0 with the Oracle Home as c:\Orant. But when I run Forms 5.0, it is not connecting with the database. The error is - The ordinal 2 could not be located in the dynamic link libra

  • Multiple legal entities in one Request Set

    Hi, I have a question that hopefully someone can help with. It will make life so much easier here! In our environment on 11.5.9, we have multiple legal entities each a separate set of books. We're trying to create a request set to run multiple financ

  • Mail Message ERROR

    When I try to click a link on my mail, an error message says: "Mail was unable to open the URL 'http://' no associated application could be found.