Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sava a page in session



Kranthi,

There are several ways of doing this. Chances are I am going to tell you the "bad" ways, but others will jump in and suggest more correct alternatives.

Method one is to create session objects (ones defined in your session class) to store this information. You can then access and set these from any of your pages. I would say to do this only if the information really is related to a session (something that you want to have globally available to all/most pages while that user is active.

Second option is to pass the data between pages. You can do this by the following (skeleton help here):
In page A, have the data stored in local variables. In page B & C have accessor methods and variables to hold a page object. When you are ready to move on to page B, create it using pageWithName("B") and then call setOriginalPage(A) - or whatever you called the accessor method you created - before returning page B. This means that the new page B will keep a reference to your first page A.


Do the same thing for travelling from B->C, passing page B to C. When you want to return to B (and subsequently to A) instead of creating a new page, just return the one stored in the variable. C will return the B that you were previously in, and this B will hold and return the original page A.

You should then have all your information they had previously entered.

Anyone else got other suggestions?

Ray.

On Wednesday, Nov 26, 2003, at 04:13 Pacific/Auckland, Kranthi Sagar Borra wrote:

I have a page A in which I enter few fields but will not save, instead I will click on a button which will take me to a page B.I shall do some transactions here which will load another page C and finally come back to page B.Now I need to go from page B to page A on click of a button/link.But now I cannot load page A by calling the method "pageWithName("A");" , this will reload my entire page "A" again and I will loose any information that I entered in "A" before.So is there any way by which I can store the page "A" in some session/cache and reload it again when i click on the link.Thanks in advance.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.