How to reimplement the handleUnload javascript method ?

Hi all,
we are facing an issue here with a generated BPS application(using BPS_WB) which is integrated in another BSP application (cProjects). In fact, often, users are clicking on another tab in cProjects, and they are losing the data they were creating in the BPS application.
They want to have a popup window that tell them that data will be lost, and have somehow the choice to cancel or save the data.
I managed to make this work by redefining the handleUnload() javascript method which is generated in the page when doing the customizing in BPS_WB transaction (i went in the generated BSP application in SE80 to do this).
But the problem is that each time they will change something in BPS_WB, my changes are lost ! So what is the recommandation to avoid this problem ?
Thank you in advance,
Xavier

hi Xavier
I'm afraid I don't know how to avoid this.
I just want to know what javascript you have written to manage the popup window?
Thank you!
Best Regards,
delma

Similar Messages

  • How to call the screen in methods could u please explain

    hi,
    how to call the screen in methods could u please explain clearly with example

    HI ,
    CALL SCREEN - Call a screen
    Basic form
    CALL SCREEN scr.
    Addition:
    ... STARTING AT x1 y1 ... ENDING AT x2 y2
    Effect
    Calls the screen scr; scr is the number of a screen of the main program. You use SET SCREEN 0. or LEAVE SCREEN. to define the return from the CALL screen.
    Note
    Please consult Data Area and Modularization Unit Organization documentation as well.
    Addition
    ... STARTING AT x1 y1  ENDING AT x2 y2
    Effect
    The coordinates x1, y1 (start column and start line in the window) and x2, y2 (end column and end line in the window) define the size and position of the CALL screen ("top left - bottom right"). Besides these coordinates, you can also see the contents of the primary window, but cannot perform any action there.
    Note
    If "ENDING AT ..." is not specified, suitable values are substituted for x2 and y2, taking into account the size of the called screen.
    Exceptions
    Non-Catchable Exceptions
    Cause: No further screen level (call screen); the maximum number of nested screen levels is restricted to 50 at present.
    Runtime Error: DYNP_TOO_MANY_CALL_SCREENS
    THX

  • Reg - how to find the purpose of methods in a class

    hi everyone,
               can u plz help me with how to find the purpose of methods in a class???????
    a description abt the methods in a class??????
                        thx in advance,
    regards,
    balaji.s

    Hi Balaji
    Pls find some stuff.
    reward pts if help.
    The following statements define the structure of a class:
    ·        A class contains components
    ·        Each component is assigned to a visibility section
    ·        Classes implement methods
    The following sections describe the structure of classes in more detail.
    Class Components
    The components of a class make up its contents. All components are declared in the declaration part of the class. The components define the attributes of the objects in a class. When you define the class, each component is assigned to one of the three visibility sections, which define the external interface of the class. All of the components of a class are visible within the class. All components are in the same namespace. This means that all components of the class must have names that are unique within the class.
    There are two kinds of components in a class - those that exist separately for each object in the class, and those that exist only once for the whole class, regardless of the number of instances. Instance-specific components are known as instance components. Components that are not instance-specific are called static components.
    In ABAP Objects, classes can define the following components. Since all components that you can declare in classes can also be declared in interfaces, the following descriptions apply equally to interfaces.
    Attributes
    Attributes are internal data fields within a class that can have any ABAP data type. The state of an object is determined by the contents of its attributes. One kind of attribute is the reference variable. Reference variables allow you to create and address objects. Reference variables can be defined in classes, allowing you to access objects from within a class.
    Instance Attributes
    The contents of instance attributes define the instance-specific state of an object. You declare them using the DATAstatement.
    Static Attributes
    The contents of static attributes define the state of the class that is valid for all instances of the class. Static attributes exist once for each class. You declare them using the CLASS-DATA statement. They are accessible for the entire runtime of the class.
    All of the objects in a class can access its static attributes. If you change a static attribute in an object, the change is visible in all other objects in the class.
    The technical properties of instance attributes belong to the static properties of a class. It is therefore possible to refer in a LIKE addition to the visible attributes of a class – through the class component selector or through reference variables, without prior creation of an object.
    Methods
    Methods are internal procedures in a class that define the behavior of an object. They can access all of the attributes of a class. This allows them to change the data content of an object. They also have a parameter interface, with which users can supply them with values when calling them, and receive values back from them The private attributes of a class can only be changed by methods in the same class.
    The definition and parameter interface of a method is similar to that of function modules. You define a method meth in the definition part of a class and implement it in the implementation part using the following processing block:
    METHOD meth.
    ENDMETHOD.
    You can declare local data types and objects in methods in the same way as in other ABAP procedures (subroutines and function modules). You call methods using the CALL METHOD statement.
    Instance Methods
    You declare instance methods using the METHODSstatement. They can access all of the attributes of a class, and can trigger all of the events of the class.
    Static Methods
    You declare static methods using the CLASS-METHODSstatement. They can only access static attributes and trigger static events.
    Special Methods
    As well as normal methods, which you call using CALL METHOD, there are two special methods called constructor and class_constructor that are automatically called when you create an object or when you first access the components of a class.
    reward pts if help.
    deepanker

  • How to call the backing bean method through javascript by closing window?

    Hi all,
    What I want to do is:
    I open a new page by clicking <t:commanLink.../> from the first page. Then I close the new page. By closing the new page I will call a function in the backing bean such as myBean.doSomething() to do something. Such like:
    <body onUnload=jsFunction()..../>
    ...

    So far I understand, I should write following code
    in my second page:
    <html>
    <head>
    <script type="txet/javascript">
    function jsFunction()
    {>
    ocument.forms[0].action="#{myBean.doSomething}";
    document.forms[0].submit();
    </scrip>
    </head>
    <body onunload="jsFunction()">
    <ui:composition>
    <h:form id="myForm">
    <t:commandLink id="myLink" immediate="true"
    action="#{myBean.doSomething}"
    value=""></t:commandLink>
    </h:form>
    </ui:composition>
    Is that right? I am not sure if I've the javascript
    in the right position.I am sorry! That solution will not work. My Bad.
    You can try this.
    1) Have a invisible command button on your first page with the action attribute set to "#{myBean.doSomething}" as below
    <t:commandButton style="width:0px;height:0px" id="myButton" immediate="true"
    action="#{myBean.doSomething}"
      value=""></t:commandButton>2) Your JS onunload method on the second page should look like
    <script type="txet/javascript">
       function jsFunction()
    var buttonObject= window.parent.document.getElementById("formname:myButton");
    buttonObject.click(); // This would help in submitting the first page
    // to submit to the needed action method
    </script>Karthik

  • How to use the VBS MoveFolder methode in DIAdem without any error message?

    Hi,
    I want to move folders with the VBS MoveFolder methode, but in DIAdem I run in problems. When I use the following comman    fso.MoveFolder(project_folder & test_folder, project_folder & test_folder & "\" & test_ & " " & test_count) 
    I get error message
    "During call a sub routine no parentheses are allowed!"
    When I remove the brackets and use    fso.MoveFolder project_folder & test_folder, project_folder & test_folder & "\" & test_ & " " & test_count 
    I get the error message
    "Invalid sub routine call."
    How I have to use the command right?
    (the text of error messages is free translated from German Version of DIAdem 11.0! Take only the sense, not the exact wording!)
    Thanks for help.
    Regards
    Sven

    Hello Sven!
    Just add a 'Call' at the beginning of your first line will solve the syntatic error. I recommend always to use 'Call' and parenthesis.
    But there is a fundamental problem in your code: MoveFolder moves a folder from a source to a new destination and the old source folder will be deleted. You try to move a folder to a location below the same folder. If the MoveFolder wouldn't recognize these situtation and throws an error all of your data would be deleted!
    Just print out your paths in a Messagebox to clearify the situation.
    Matthias
    Matthias Alleweldt
    Project Engineer / Projektingenieur
    Twigeater?  

  • How good is the Collections.shuffle() method?

    Hello
    I have an ArrayList which I want to bootstrap from. I did not find any method to randomly select an entry from the ArrayList, so I use the shuffle method first, and then get the first entry (which should be random after each shuffle). However, I do get some strange results from this. On average the numbers gotten when I sample small series is lower then the ones I get sampling longer series. There is no aspect with the data that should imply such behavoiur. Does anyone know how good my way of sampling is (using shuffle), and if the shuffle method really is a good way to randomize?
    Regards
    JT

    I think the API docs probably give the best answer to this question. Notice the word "approximately" In the shuffle(List) method. Also note that shuffle.(List, Random) depends on how "good" Random is.
    I guess you'd have to construct some form of test to see if either shuffle was good enough for your requirements.
    Cheers
    DB

  • Want to know how to debug the Business Object Method called from CRM

    Hi all,
    I have to debug a Method of a custom Business Object. This is being called when a certain action is performed
    on the CRM  ( CIC0 screen). I can not see an option to set an external break point in the Program of the Business Object
    Method.
    This Business Object calls a standard SAP FM. I tried setting an external break point in that FM and tried executing that.
    But it  is not stopping there.
    Can any one please let me know how I can debug this when triggered from CRM?
    Thanks  in advance.
    Thanks & regards,
    Y Gautham

    Hi,
    I have tried checking the option 'IP MATCHING' option. I have given my user id and also the 'WEBUSER' as well.
    But still I am unable to debug the application.
    Can you please let me know if I am missing anything further.
    Thanks & regards,
    Y Gautham

  • How to change the extractor's method?

    Hi all,
    I get a problem by extracting data from r3 to bw. When I transfer the data, the system told me that the extractor's method "v" is not acceptable. So I want to change the extractor's method in the sap r3 system. Is it possible? And how can I do it?
    Thanks a lot!!!
    Oliver

    The solution is simple. You need not chage the POST method at all for your requirement.
    In the step where you give the work item to the user i.e. CHANGE method of FIPP, make sure that the 'Advance with dialog' is checked in the 'details' tab of the activity step.
    Then in the step where you execute the POST method just assign an agent (using rule or role or organizational unit or job or position or etc.............) and run it in the foreground. Do not check 'Background processing' in the task's 'basic data' tab. For this step also make sure that the 'Advance with dialog' is checked in the 'details' tab of the activity step. Make sure that the task that runs the POST method is classified as a General task in 'agent assignment'.
    If you follow this you wont have two separate work items being sent to the user. The user will just receive one work item, he verifies the details and clicks the post and the document gets posted under the user's id. Also if you had noticied, if you POST in the background the USNAM field in table BKPF will have the value WF-BATCH. But if you follow this and process it in the foreground it will hold the user's id.
    Let me know if you have any doubts.

  • How to execute the InDesign Javascript from outside in MAC

    Hi All,
    I need to execute the InDesign Javascript from outside in MAC machine.
    Anyone can help me.
    Thanks in advance.
    Regards,
    Ramkumar

    If you just want to imitate double clicking a file, use execute() method, e.g.:
    var myJavaScriptFile = new File("~/Desktop/Test.jsx");
    myJavaScriptFile.execute();
    At the top of your .jsx file type #target indesign to make the script run in InDesign.
    And I want to add to what Harbs said in the previous post: when you use do script command, you can also send parameters and get back values. See DoScriptParameters and DoScriptReturnValues sample scripts from InDesign CS3 Guide Scripts for details.

  • How to find the property and method easily?

    Like msdn, jdk, it's easy to search. Or like Eclipse, Visual Studio etc. IDE auto popup the property or method, any question just press F1 then get help. But it's not easy to do in Flash Professional CS6. Sometime it popups the method/property in some class but many are not. Please advise. Thanks.

    Usually if you have the property/method in the code you can right click and choose Help.  The result should be that the help documentation for the class that the property belongs to will open.

  • How to call the backing bean method through javascript

    Hi
    I have a command button associated with actionListener . Action Listener method associated with backing bean methods.
    I want to fire the event on command button and backing bean method should be invoked from javascript dynamically.
    can anybody help me asap

    JSF<h:form id="formId">
        <h:commandButton id="buttonId" value="submit" actionListener="#{myBean.action}" />
    </h:form>JSdocument.getElementById('formId:buttonId').click();

  • How to access the JAXB generated methods of Complex element

    Hi all,
    I am generating the java classes from the a XSD file which contains the Complex element , which again contains the simple elements. JAXB is generating the interface and public static class for the inner Complex element. But i not able to create the object of this inner class using the Object factory class. Then without object how can i access the setter and getter methods contained in this complex element.
    My XSD file looks like -
    <xs:element name="SSDecisionActivity">
    <xs:complexType >
    <xs:sequence>
    <xs:element name="Id" type="xs:ID"/>
    xs:element name="ConditionFlow">
         <xs:complexType>
         <xs:sequence>
         <xs:element name="Condition" type="xs:string"/>
         <xs:element name="DecisionCriteria" type="xs:string" minOccurs="2" maxOccurs="unbounded"/>
    How shall i access the methods from the ConditionFlow (Complex element) like setCondition(....),getCondition().
    If anybody knows plz tell me the way.
    Ravi

    I'm a bit confused about this design approach.
    [Bindable] public var storyList:IdmlStory = null; 
    The reason why the above line fails to compile in StoryList.mxml is that a variable of the same name already exists. You have specified a List with an id of storyList. The translation process will yield:
    var storyList:List = new List();
    and then fill in the properties.

  • How to determine the get/set methods of an element from the schema

    Is there a way that I can obtain the java method call to an element using only the schema (maybe using SchemaTypeSystem, SchemaType, SchemaComponent)? For instance, as I traverse the schema is there a method that I can call that will return:
    "getPurchaseOrder().getCustomer().getName()"
    for the name element in the form of a string or some other representation?
    Thanks in advance.
    Joey

    Sorry Manoj,
    but i didn´t find out, why these programs should be able to solve my issue. They just display a picture using the CL_GUI_PICTURE control.
    I am looking fo a way to resize a given control to the very maximum, so that it fills the whole SAPGUI window!
    Thanks anyway...
    MIKE

  • How to access the application module4s methods.

    I have deployed my business components to OAS and I am trying to use from the applet class the remote appMod. In local mode the connection returns moduleimpl, but now the return is a remoteinterface. How to use that as a moduleimpl??
    Code is like this:
    String ejbUrl = "oas://vader:8889/ProjectOAS/Project/ProjectModule";
    // Setup the environment
    Hashtable environment = new Hashtable();
    // Turn JNDI on to OAS
    environment.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, "oracle.oas.naming.jndi.RemoteInitCtxFactory");
    // Lookup the URL
    Project.common.oas.ProjectModuleHome homeInterface = null;
    try {
    System.out.println("Creating an initial context");
    Context ic = new InitialContext(environment);
    System.out.println("Looking for the EJB published as 'ProjectOAS/Project/ProjectModule'");
    homeInterface = ( Project.common.oas.ProjectModuleHome )javax.rmi.PortableRemoteObject.narrow(ic.lookup(ejbUrl), Project.common.oas.ProjectModuleHome.class);;
    catch (CommunicationException e) {
    System.out.println("Communication exception! Unable to connect: " + ejbUrl);
    e.printStackTrace();
    System.exit(1);
    catch (NamingException e) {
    System.out.println("Naming exception occurred!");
    System.out.println("Cause: This may be an unknown URL, or some" +
    " classes required by the EJB are missing from your classpath," +
    " or your OAS host is short of resources");
    System.out.println("Suggestion: Check the components of the URL," +
    " and make sure your project includes a library containing the" +
    " EJB .jar files generated by the deployment utility.");
    e.printStackTrace();
    System.exit(1);
    // That's it!
    try {
    System.out.println("Creating a new EJB instance");
    Project.common.oas.RemoteProjectModule remoteInterface = homeInterface.create();
    return remoteInterface;
    catch (Exception e) {
    System.out.println("Module failed : " + e.getMessage());
    e.printStackTrace();
    return null;
    } // End getGenericAppMod(platform)

    I am guessing that u r declaring inner class b as a member inner class in class a
    in class c u have to instantiate class b
    But objects of class b should always be bound with objects of class a
    you can do it in this way
    a obja = new a();
    a.b objb = obja.new a.b();
    and then call objb.area();
    If the inner class is a static one then u can instatiate it
    a.b objb = new a.b();
    *No need to bind it with outer class's object.
    Anoop

  • ANN: article how to use the CSS Sprites method with the TIP technique

    http://www.tjkdesign.com/articles/how-to_use_sprites_with_my_image_replacement_technique.a sp
    Thierry
    Articles and Tutorials:
    http://www.TJKDesign.com/go/?0
    http://www.divahtml.com/products/scripts_dreamweaver_extensions.php
    - divaGPS - Add "you are here" highlighting to virtually any
    menu
    - divaFAQ - Create FAQ pages that toggle (show/hide) the
    answers
    - divaPOP - Easy, clean, standards-compliant popup windows.

    Sorry, no knowledge of FW themes, but it would seem easier to adjust the positioning code
    than to try redo your sprite image.

Maybe you are looking for

  • Inactive Trade Lines - Close or let it ride til the Creditor closes it?

    Hello all: Thanks to the advice of the forum I have had great advances in my credit worthiness. At this juncture there are several trade lines that I am not using and expect to go inactive. I know that the creditors decide when they stop reporting an

  • Photo and iphoto create albums?!??

    I downloaded iphoto with the misunderstanding that it would let me organize my photos, something i have been waiting for since i have started using the ipad2.  I went through support and found that you must go through just plain Photo to do so.  Okay

  • Bbm messenger not showing on bridged playbook

    hi everyone im a newbie when it comes to blackberry, but my problem is when i bridge my playbook with my curve, the bbm messenger icon does not appear on the playbook,any ideas on how i can fix it? Solved! Go to Solution.

  • Load Balance Configuration for OCS 10g

    Hi guys, A few question on the load balancer requirement and setup for a OCS 10g cluster. 1. Can Pound be used as the load balancer for the OCS cluster. (pound is an application for load balancer and reverse proxy). 2. Basically the load balancer wil

  • File IO question

    Hi Could anyone tell me if there is a way to, when a file is created, always append a certain string to that file? For example, let's say my app allows the user to create a file called app.txt, and allows another file with the same name but in anothe