Strings are passed by Reference

Since strings are objects, they are passed by reference. I tested this out:
1.in main(): String str="in main"; creates a new string "in main" and has str point to it.
2.Passed str into changeStr(String str2)
3.in changeStr: str2="in changeStr", since str2 is a reference, it should redirect str to point to the new string "changeStr".
4.Back in main I print out str and get "in main".
Why?

(When you post source code, please put it in CODE tags; there's a button for that above the textarea.)
Don't think of references as memory addresses; that makes them sound like C pointers, when in fact they're fundamentally different: a pointer points to a memory location, while a reference points to an Object. C lets you dereference a pointer and replace the data at that memory location with something else. Afterward, any existing variable that referred to the data in that section of memory, will see the new value.
A Java reference lets you access the object to call its methods, examine its variables, and so on. If the object is mutable, you can change itss contents, and all existing variables that refer to that object will see those changes. But you can't replace the whole object with something else. Reassigning the variable that was passed into the method has no effect on the original object or on any other variables that pointed to it.
So stop thinking of references as memory addresses. In fact, stop thinking about memory addresses, period. You never need that information in Java, and for that you should be eternally grateful. The absence of C pointers was one of Java's biggest selling points, way back when.
Edited by: uncle_alice on Feb 27, 2008 7:55 AM
Oh well. :-/ At least I may have done some good by asking the OP to use CODE tags.

Similar Messages

  • How BAPI Tables parameters are passed by reference

    Hi Gurus,
                     I have a genuine doubt regarding BAPI parameters. I would like to point out the genreal rules of bapi like,
    1. BAPI parameters should be passed by value. (Because they are rfc fm's. So both systems will be in different servers. This is the normal scenario.)
    2. But the tables parameters in BAPI can't be passed by value. Instead they are passed by reference.
    3. I know they use some kind of delta mechanism to transfer tables parameters to remote servers.
    So gurus I would like to know what exactly happens when a tables parameter is passed. And also I didn't understand the delta mechanism. Kindly guide me.
    Thanks in advance,
    Jerry Jerome

    You'll see in [SAP Library - RFC - Parameter Handling in Remote Calls|http://help.sap.com/saphelp_nw04s/helpdata/en/22/042551488911d189490000e829fbbd/frameset.htm] that tables are not passed by reference when you use RFC. It also explains the delta.
    When you make a remote function call, the system handles parameter transfer differently than it does with local calls.
    TABLES parameters
    The actual table is transferred, but not the table header. If a table parameter is not specified, an empty table is used in the called function.
    The RFC uses a delta managing mechanism to minimize network load during parameter and result passing. Internal ABAP tables can be used as parameters for function module calls. When a function module is called locally, a parameter tables is transferred u201Cby reference". This means that you do not have to create a new local copy. RFC does not support transfer u201Cby referenceu201D. Therefore, the entire table must be transferred back and forth between the RFC client and the RFC server. When the RFC server receives the table entries, it creates a local copy of the internal table. Then only delta information is returned to the RFC client. This information is not returned to the RFC client every time a table operation occurs, however; instead, all collected delta information is passed on at once when the function returns to the client.
    The first time a table is passed, it is given an object-ID and registered as a "virtual global table" in the calling system. This registration is kept alive as long as call-backs are possible between calling and called systems. Thus, if multiple call-backs occur, the change-log can be passed back and forth to update the local copy, but the table itself need only be copied once (the first time).

  • Arrays are passed by reference or value ?

    Hi peoples,
    I have something interesting here which I need to know. Look into the following classes :
         public class example1 {
         int i[] = {0};
         public static void main(String args[]) {
         int i[] = {1};
         change_i(i);
         System.out.println(i[0]);
         public static void change_i(int i[]) {
         i[0] = 2;
         i[0] *= 2;
         public class example2 {
         int i[] = {0};
         public static void main(String args[]) {
         int i[] = {1};
         change_i(i);
         System.out.println(i[0]);
         public static void change_i(int i[]) {
         int j[] = {2};
         i = j;
    Among the above classes, the class named 'example1' returns the value 4 whereas, the class named 'example2' returns the value 1.
    Any explanations to this one please....
    Cheers,
    Rasmeet

    minglu, you are not doing right.
    i just don't get it why you have i[] as instance variable but never use it ( i[] is declared in every method so each i you refer to in the method is a local varable not member variable that can be shared for the object ).
    your first solution work. but that i = j line is not needed because it has no effect you still cannot change the referrence of i to other int[]. your first soultion just need to be
    public static int[] change_i(int i[]) {
    int j[] = {2};
    return j;
    }anyway, using this solution, the method name will be misleading because the method didnot change i in anyway. i is changed because you assign the return array (j) to i.
    for that second solution also, you didn't use your member variable i at all. what you change is the content of i you pass so the result is correct. but then how is this method different from the first method the original poster posted?
    moreover, java never pass argument to the method by reference it ALWAYS pass by copy.i suppose you define passing by reference in the same way C++ does. all object variable in java is a refernce to Object so passing the variable to method is surely passing the reference to the method but that's not passing by reference. it's passing by copy because what is passed is the copy of the reference to the object, not the reference to the reference to Object. if it is really passing by refernce, then you will be able to change your reference to object to point anywhere because you have the access the address of the reference. but since you don't (you only know where the passed reference is pointing to (you have the COPY of value of reference) but you don't know where the refernce store its value) you can only change the content of the pointed object but not changing the pointed object.
    let me restate this, java always pass by reference.

  • Pass by reference and String

    public class Test {
        static void method(String str) {
            str = "String Changed";
        public static void main(String[] args) {
            String str = new String("My String");
            System.out.println(str);
            method(str);
            System.out.println(str);
    }The output is
    My String
    My String
    How this is possible when objects are passed by reference ?

    > How this is possible when objects are passed by reference ?
    All parameters to methods are passed "by value." In other words, values of parameter variables in a method are copies of the values the invoker specified as arguments. If you pass a double to a method, its parameter is a copy of whatever value was being passed as an argument, and the method can change its parameter's value without affecting values in the code that invoked the method. For example:
    class PassByValue {
        public static void main(String[] args) {
            double one = 1.0;
            System.out.println("before: one = " + one);
            halveIt(one);
            System.out.println("after: one = " + one);
        public static void halveIt(double arg) {
            arg /= 2.0;     // divide arg by two
            System.out.println("halved: arg = " + arg);
    }The following output illustrates that the value of arg inside halveIt is divided by two without affecting the value of the variable one in main:before: one = 1.0
    halved: arg = 0.5
    after: one = 1.0You should note that when the parameter is an object reference, the object reference -- not the object itself -- is what is passed "by value." Thus, you can change which object a parameter refers to inside the method without affecting the reference that was passed. But if you change any fields of the object or invoke methods that change the object's state, the object is changed for every part of the program that holds a reference to it. Here is an example to show the distinction:
    class PassRef {
        public static void main(String[] args) {
            Body sirius = new Body("Sirius", null);
            System.out.println("before: " + sirius);
            commonName(sirius);
            System.out.println("after:  " + sirius);
        public static void commonName(Body bodyRef) {
            bodyRef.name = "Dog Star";
            bodyRef = null;
    }This program produces the following output: before: 0 (Sirius)
    after:  0 (Dog Star)Notice that the contents of the object have been modified with a name change, while the variable sirius still refers to the Body object even though the method commonName changed the value of its bodyRef parameter variable to null. This requires some explanation.
    The following diagram shows the state of the variables just after main invokes commonName:
    main()            |              |
        sirius------->| idNum: 0     |
                      | name --------+------>"Sirius"       
    commonName()----->| orbits: null |
        bodyRef       |______________|At this point, the two variables sirius (in main) and bodyRef (in commonName) both refer to the same underlying object. When commonName changes the field bodyRef.name, the name is changed in the underlying object that the two variables share. When commonName changes the value of bodyRef to null, only the value of the bodyRef variable is changed; the value of sirius remains unchanged because the parameter bodyRef is a pass-by-value copy of sirius. Inside the method commonName, all you are changing is the value in the parameter variable bodyRef, just as all you changed in halveIt was the value in the parameter variable arg. If changing bodyRef affected the value of sirius in main, the "after" line would say "null". However, the variable bodyRef in commonName and the variable sirius in main both refer to the same underlying object, so the change made inside commonName is visible through the reference sirius.
    Some people will say incorrectly that objects are passed "by reference." In programming language design, the term pass by reference properly means that when an argument is passed to a function, the invoked function gets a reference to the original value, not a copy of its value. If the function modifies its parameter, the value in the calling code will be changed because the argument and parameter use the same slot in memory. If the Java programming language actually had pass-by-reference parameters, there would be a way to declare halveIt so that the preceding code would modify the value of one, or so that commonName could change the variable sirius to null. This is not possible. The Java programming language does not pass objects by reference; it passes object references by value. Because two copies of the same reference refer to the same actual object, changes made through one reference variable are visible through the other. There is exactly one parameter passing mode -- pass by value -- and that helps keep things simple.
    -- Arnold, K., Gosling J., Holmes D. (2006). The Java� Programming Language Fourth Edition. Boston: Addison-Wesley.
    ~

  • Calrification on Pass by reference

    Hi All,
    In java, if we are passing an object to a function actually we are passing the reference. So, if the function is doing any manipulation on the Object reference, it will affect the passing object.
    For example,
    class Ob1
         int i=0;
    public class Ref
         public static void main(String a[])
              Ob1 o=new Ob1();
              System.out.println("Before calling :"+o.i);
              call(o);
              System.out.println("After calling :"+o.i);
         static void call(Ob1 o)
              o.i++;
    Is it possible to get the original value of i(object Ob1) after calling call()?
    Thanks in advance
    +Sha                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    > In java, if we are passing an object to a function
    actually we are[b] passing the reference.
    By value.
    Is it possible to get the original value of i(object
    Ob1) after calling call()?
    Store the original value in a local variable.
    And please note the following:
    All parameters to methods are passed "by value." In other words, values of parameter variables in a method are copies of the values the invoker specified as arguments. If you pass a double to a method, its parameter is a copy of whatever value was being passed as an argument, and the method can change its parameter's value without affecting values in the code that invoked the method. For example:
    class PassByValue {
        public static void main(String[] args) {
            double one = 1.0;
            System.out.println("before: one = " + one);
            halveIt(one);
            System.out.println("after: one = " + one);
        public static void halveIt(double arg) {
            arg /= 2.0;     // divide arg by two
            System.out.println("halved: arg = " + arg);
    }The following output illustrates that the value of arg inside halveIt is divided by two without affecting the value of the variable one in main:before: one = 1.0
    halved: arg = 0.5
    after: one = 1.0You should note that when the parameter is an object reference, the object reference -- not the object itself -- is what is passed "by value." Thus, you can change which object a parameter refers to inside the method without affecting the reference that was passed. But if you change any fields of the object or invoke methods that change the object's state, the object is changed for every part of the program that holds a reference to it. Here is an example to show the distinction:
    class PassRef {
        public static void main(String[] args) {
            Body sirius = new Body("Sirius", null);
            System.out.println("before: " + sirius);
            commonName(sirius);
            System.out.println("after:  " + sirius);
        public static void commonName(Body bodyRef) {
            bodyRef.name = "Dog Star";
            bodyRef = null;
    }This program produces the following output: before: 0 (Sirius)
    after:  0 (Dog Star)Notice that the contents of the object have been modified with a name change, while the variable sirius still refers to the Body object even though the method commonName changed the value of its bodyRef parameter variable to null. This requires some explanation.
    The following diagram shows the state of the variables just after main invokes commonName:
    main()            |              |
        sirius------->| idNum: 0     |
                      | name --------+------>"Sirius"       
    commonName()----->| orbits: null |
        bodyRef       |______________|At this point, the two variables sirius (in main) and bodyRef (in commonName) both refer to the same underlying object. When commonName changes the field bodyRef.name, the name is changed in the underlying object that the two variables share. When commonName changes the value of bodyRef to null, only the value of the bodyRef variable is changed; the value of sirius remains unchanged because the parameter bodyRef is a pass-by-value copy of sirius. Inside the method commonName, all you are changing is the value in the parameter variable bodyRef, just as all you changed in halveIt was the value in the parameter variable arg. If changing bodyRef affected the value of sirius in main, the "after" line would say "null". However, the variable bodyRef in commonName and the variable sirius in main both refer to the same underlying object, so the change made inside commonName is visible through the reference sirius.
    Some people will say incorrectly that objects are passed "by reference." In programming language design, the term pass by reference properly means that when an argument is passed to a function, the invoked function gets a reference to the original value, not a copy of its value. If the function modifies its parameter, the value in the calling code will be changed because the argument and parameter use the same slot in memory. If the Java programming language actually had pass-by-reference parameters, there would be a way to declare halveIt so that the preceding code would modify the value of one, or so that commonName could change the variable sirius to null. This is not possible. The Java programming language does not pass objects by reference; it passes object references by value. Because two copies of the same reference refer to the same actual object, changes made through one reference variable are visible through the other. There is exactly one parameter passing mode -- pass by value -- and that helps keep things simple.
    -- Arnold, K., Gosling J., Holmes D. (2006). The Java� Programming Language Fourth Edition. Boston: Addison-Wesley.

  • JCS operation arguments, pass by reference or copy?

    Can I assume that objects passed from JPF into JCS, or between JCS arguments are passed by reference?
    [email protected] (replace MASK with '_')

    I'm asking this because the JCS may be in its own project independent of the web project, I wonder if it will still be pass by reference vs copy.
    If it is pass by copy, I'll need to return beans passed into JCS operations as follows:
    formBean = myControl.actionA(formBean);
    [email protected] (replace MASK with '_')

  • How to Identify the count , If multiple parameters are passed using Pipe Delimited string

    Hi,
    We are passing Pipe delimited string to the parameter and I want to know how many values we are passing to the parameter.
    Here is the example
    Parameter.Grant: 24|34|54|67
    I am using below expression, but it is not giving the right values. Please let me know if  I am missing anything or is it possible.
    =iif(parameters!Grant.Count>1,"Multiple value selected",parameters!Grant.Value)

    Hi NaveenCR,
    According to your description, you used pipe delimited multi-value parameter in the report, you want to know how many values passed to the parameter. If that is the case, please refer to the following steps:
    In Design view, click Text Box in the Toolbox.
    On the design surface, click and then drag a box to the desired size of the text box.
    Right-click inside of the text box, then click Expression.
    In Expression text box, type the expression like below:
    =iif(split(Parameters! Grant.Value,"|").Length>1," Multiple value selected",Parameters!Grant.Value)
    The following screenshots are for your reference:
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    If you have any feedback on our support, please click
    here.
    Wendy Fu
    TechNet Community Support

  • Are Calendar Objects passed by reference?

    Consider the following bit O' code:
    TimeZone CST = TimeZone.getTimeZone("America/Chicago");
    GregorianCalendar g = new GregorianCalendar(CST);
    DateFormat D= DateFormat.getDateTimeInstance(DateFormat.MEDIUM,DateFormat.MEDIUM);
    D.setTimeZone(CST);
    System.out.println(D.format(g.getTime()));
    GregorianCalendar g2 = new GregorianCalendar(CST);
    g2=g;
    g2.add(Calendar.DATE,400);
    System.out.println(D.format(g.getTime()));
    Note that the last println prints g, not g2. The result is:
    Apr 21, 2002 7:11:04 PM
    May 26, 2003 7:11:04 PM
    So advancing g2 affected g. Why? This doesnt happen with objects like strings.
    How can I copy the contents of g into g2 then modify g2 without affecting g?

    Try     g2=(GregorianCalendar)g.clone();Passing by reference has nothing to do with this problem.
    When you assign g2 to g, g2=g;then both variables (references) reference the same object. The object that you created in GregorianCalendar g2 = new GregorianCalendar(CST); has gone to the Garbage Collector.
    This doesnt happen with objects like stringsStrings are immutable and don't have any methods to change the contents, so the behavior is very different.
    Dave

  • How do you pass vi references from one event to another

    I have a vi which gets vi references (thereby loading the vi's into memory) for all the vi's in a given directory when a user clicks a button on the front panel. To do this I use an event structure. My question is whether it is possible to have another event (user button on the front panel) which unloads the vi's from memory. I have tried passing the vi references that are initially generated to the close reference function but whenever I do I get a 'vi reference invalid' error. Does this have to do with trying to pass the vi references between one event and another? If I use a local variable simply pass a reference to another indicator and then probe it, the originally-generated refnum and the local vari
    able refnum match up. However once I try to wire that same indicator to the close reference function I get the 'vi reference invalid' error. Is there a different/better way to unload the vi's from memory based on a user button click? Any suggestions would be welcome.
    Jason
    Attachments:
    Load_Directory_of_vi's.vi ‏57 KB

    Several problems with your code:
    1... Bad idea to use lights as buttons. Yes it can be done, but it's not "natural".
    2... If you've gotta do that, set their mechanical action to "LATCH WHEN RELEASED"
    3... Because of #2, you are getting TWO copies of every array when you click the LOAD VIs light (er... button).
    4... No need for the conversion from path to string and back - use BUILD PATH to append each file name to he folder path.
    5... Set the BROWSE OPTIONS on your PATH control to EXISTING DIRECTORY to allow browsing of directories, not files.
    6... Your code doesn't care whether the file is a .VI file, or a .ZIP file, or a .TXT file, or what. Use the PATTERN input on the LIST function to discriminate.
    7... Your code is only storing the latest refer
    ence, not the array of references.
    8... An ERROR DIALOG on the OPEN REFERENCE function will tell you that you're getting an error. Why? You are asking to prepare a non-reentrant VI for reentrant execution (why use options = 8?)
    9... Because of #8, the latest VI reference is invalid.
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

  • Confused about passing by reference and passing by valule

    Hi,
    I am confuse about passing by reference and passing by value. I though objects are always passed by reference. But I find out that its true for java.sql.PreparedStatement but not for java.lang.String. How come when both are objects?
    Thanks

    Hi,
    I am confuse about passing by reference and passing
    by value. I though objects are always passed by
    reference. But I find out that its true for
    java.sql.PreparedStatement but not for
    java.lang.String. How come when both are objects?
    ThanksPass by value implies that the actual parameter is copied and that copy is used as the formal parameter (that is, the method is operating on a copy of what was passed in)
    Pass by reference means that the actual parameter is the formal parameter (that is, the method is operating on the thing which is passed in).
    In Java, you never, ever deal with objects - only references to objects. And Java always, always makes a copy of the actual parameter and uses that as the formal parameter, so Java is always, always pass by value using the standard definition of the term. However, since manipulating an object's state via any reference that refers to that object produces the same effect, changes to the object's state via the copied reference are visible to the calling code, which is what leads some folk to think of java as passing objects by reference, even though a) java doesn't pass objects at all and b) java doesn't do pass by reference. It passes object references by value.
    I've no idea what you're talking about wrt PreparedStatement, but String is immutable, so you can't change its state at all, so maybe that's what's tripping you up?
    Good Luck
    Lee
    PS: I will venture a guess that this is the 3rd reply. Let's see...
    Ok, second. Close enough.
    Yeah, good on yer mlk, At least I beat Jos.
    Message was edited by:
    tsith

  • Pass by reference?  I think not!

    As I understand it, Java code automatically passes everything by reference. The code that I've written seems not to do this though.
         String benefitID = new String();
         String allBenID = new String();
              try
                   benefitInfoDAO.selectIDs(awardCode, i, benefitID, allBenID);
              catch (CMSException e)
                   throw e;
              }The strings benefitId and allBenID are assigned values in the selectIDs method. However, when execution returns to the calling method, their values are "". What's going on?

    You forget that Strings are immutable objects, and when you pass the String into that other method, you are actually passing THAT String object into that method, here is an example.
    class Bob()
    Bob()
    String myString = "Hello";
    doSomething(myString);
    System.out.println(myString); //Still prints out "Hello"
    public void doSomething(String inString)
    System.out.println(inString); //Prints out "Hello"
    inString = "Bye!";
    System.out.println(inString); //Prints out "Bye!"
    Why is this? This is because Java passes everything as pointers, and not as C++ "References". Strings are also special, because they are immutable objects, there is no real way to manipulate a String object's memory once it's created. You can however do this to achieve the result you were looking for:
    class Bob()
    Bob()
    StringBuffer myString = new StringBuffer("Hello");
    doSomething(myString);
    System.out.println(myString.toString()); //Now it prints out "Bye!"
    public void doSomething(StringBuffer inString) //inString is a NEW pointer, you can change where it's pointing, but it will not change where myString in pointing!
    System.out.println(inString.toString()); //Prints out "Hello"
    inString.setLength(0);
    inString.append("Bye!");
    System.out.println(inString.toString()); //Prints out "Bye!"
    }

  • Subroutine Pass by Value, Pass by Reference using xstring

    Hi,
      I am trying to check the difference between pass by value, pass by reference, pass by return value to a subroutine. When I tried integers as parameters the following functionality worked. When I am using xstring as parameters I am not getting desired results.
      Some one please explain me how the xstring's are passed to a subroutine.
    Here I am giving the code and output of the code.
    data : s_passbyref    type xstring,
           s_passbyval    type xstring,
           s_passbyretval type xstring.
    * Pass by Value, Pass by Reference, Pass by return value - STRINGS
    s_passbyref     = 'ABCD'.
    s_passbyval     = 'ABCD'.
    s_passbyretval  = 'ABCD'.
    write : / 'ByRef :', s_passbyref, 20 'By Val :', s_passbyval, 40 'By Return Value : ', s_passbyretval.
    perform call_str_sub using s_passbyref s_passbyval changing s_passbyretval.
    write : / 'ByRef :', s_passbyref, 20 'By Val :', s_passbyval, 40 'By Return Value : ', s_passbyretval.
    form call_str_sub using ps_passbyref value(ps_passbyval) changing value(ps_passbyretval).
      ps_passbyretval = 'XYZ'.
      ps_passbyref    = 'XYZ'.
      ps_passbyval    = 'XYZ'.
    endform.
    OUTPUT
    ByRef  :  ABCD    By Val : ABCD    By Return Value : ABCD
    ByRef  :               By Val : ABCD    By Return Value :
    Thanks in advance
    Naveen

    try this
    write : / 'ByRef :', s_passbyref, 20 'By Val :', s_passbyval, 40 'By Return Value : ', ps_passbyretval.

  • Using string to create object reference?

    How do I use a string to dynamically set an object reference?
    For example, I have a pop up window with a function to set
    the text of a text object in the main application:
    Application.application.t1.text = completeString;
    The "t1" is the object, of course. There are several such
    objects, t2, t3, etc. I'd like to make this a variable item in the
    popup, and pass the reference to WHICH text object (eg, "t1' or
    "t2") from the popup's parent.
    So, if the variable was something like "whichBox" (not sure
    what to type it as), then I'm looking for something like:
    Application.application.
    whichBox.text = completeString;
    Which I cannot get to work... what am I missing here?

    perhaps you can try this...
    Application.application[myParam].text
    where myParam is a String var with the value of 'whichBox' or
    whatever name you wanted.

  • Recursive Function, Pass by "reference"

    I need to create a function and build an Arraylist.
    public void buildList (String s, Arraylist list) {
    ....//code specific to application
    list.add(something);
    buildList(somestring, list);
    public void anotherFunction(){
    buildList(str, myList);
    Will myList contain the values that are added? Is this only a copy of the list?

    Java always passes by value.
    (Now it gets confusing)
    In this case it passes a reference by value.
    The method gets its own variable for storing the reference to the list in.
    ie it is the equivalent of saying
    Arraylist list = myList;
    It doesn't copy the entire list, it just gets a reference to it.
    If you change the contents of the list by calling list.add() then original looks like it was updated, as they point to the same thing.
    If you execute
    list = new ArrayList();
    Then list becomes distinct and seperate from the myList variable in the calling procedure.
    If java was pass by reference, when you execute list = new ArrayList it would also change the value of the variable in the calling procedure. That doesn't happen.
    Hope that clears things up,
    evnafets

  • Passing model reference to a page in a Popup

    Hi all,
    I have a BSP Application with MVC. In a view I want to open a new window when clicking in an input field with a JavaScript function:
    function openCatalog (inputField, inspchar) {
        adresse = "catalog.htm";
        document.formInsertMerkmal.fieldname.value = inputField;
        view = window.open(adresse, "Katalogauswahl", "width=400,height=400,left=100,top=200");
        view.focus();
    The catalog.htm is a bsp page with logic in the same application. Opening and closing this page is no problem.
    But how can I pass the reference to the model from the first view, eg. start.htm to the new page catalog.htm. I want to read data from the model and write data back to model attributes.
    Can I pass the modelreference in the url? And how do I read the model in the new window?
    In start.htm I declared the model in the page attributes and can access data from model.
    What Stepps are necessary to do the same in the new window. I don’t want to raise an event in the controller to go to a next page.
    Please help!

    Hi Raja,
    I just begin to develop with BSP. I don't understand exactly  what I must do :
    "in the method IF_BSP_APPLICATION_EVENTS~ON_START instantiate your model class and pass the instantiate model class reference to a attribute of the application class.
    now this can be referenced in the all the pages with application->applicationclassattribute for model."
    You can do an example source code, please.
    Thanks you very much for help.
    Lionel

Maybe you are looking for

  • Java value objects to fixed-length flat file?

    I am searching for framework or third party API, which can convert a java bean to fixed length record. I want to automate this solution, using some mapping files. (Like hibernate API for java <----> xml conversions) if anybody can give me any url or

  • Downloaded excel files opened in multiple instances

    Whenever I download then open the file from Firefox, it opens in a new Excel instance. Hence I am not able to move data to other workbook I had opened previously, and have to save it first, then reopen within the same instance. How do I force it to o

  • SMTP Send Timeout

    Is it possible to configure a send timeout for outgoing SMTP messages, so that SAP regards the send order as failed if the timeout expires before the remote server accepts the data with "250 OK" ? I test with a MiniSap 710 system. It seems that when

  • Jboss manual deployment

    If I choose to deploy to jboss ALL, as opposed to DEFAULT, it says it is a "manual deployment" What does that mean? Do I need to hack and copy the nitrox-application-service.xml file to the /server/all/deploy directory ?

  • Adding a for loop.

    I need to add a for loop so that it displays all values less than 5.00. Also, I need to display all values that are above the average. Can anyone show me hoe to do this? Here is what I have so far. public class project public static void main(String[