• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Returning previously instantiated Main page
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Returning previously instantiated Main page


  • Subject: Re: Returning previously instantiated Main page
  • From: Klaus Berkling <email@hidden>
  • Date: Sat, 14 Mar 2009 20:35:29 -0700


On Mar 13, 2009, at 9:05 PM, Jeff Schmitz wrote:

Here's what I do...


Code in LoginWindow to initialize things:

public void initWindow(Pool pool, MainWindow mainWin) {
  this.mainWin = mainWin;
}


Code MainWindow that invokes LoginWindow:

   LoginWindow loginWin = pageWithClass(LoginWindow.class);
   loginWin.initWindow(this);
   return loginWin;



Code in LoginWindow that returns back to the original MainWindow:

    return this.mainWin;



Yes. I wrote up code similar to this about 30 minutes after sent my email.  Good to know this is not some hack.
Thanks for sharing. :-)



On Mar 13, 2009, at 10:50 PM, Klaus Berkling wrote:

Hi All.

This is probably something obvious (or obviously wrong way of doing it).

I have my Main page, a user logs in an  
  }
d stuff changes on that page.  The user navigates to another page, something gets done there and I return to the Main page with "return pageWithName()".  Problem is that "return pageWithName()" creates another instance of the Main page.  I need my previously instantiated page.

I get the context ID of the Main page using this.context().contextID() before I go to the second page.
Then I tried this when I finish with the second page:
 
return session().restorePageForContextID(returnToPageWithThisContext);

This returns null, going back to the second page.

How do I get my previously instantiated Main page back? (there is no browser back link, I need to do this in the code)

Thanks for any ideas (or the 'duh' solution).



Thanks

kib

"Success is not final, failure is not fatal: it is the courage to continue that counts."
Winston Churchill

Klaus Berkling
Systems Administrator
DynEd International, Inc.
www.dyned.com | www.eskimo.com/~kiberkli





Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Returning previously instantiated Main page
      • From: Jeff Schmitz <email@hidden>
References: 
 >Returning previously instantiated Main page (From: Klaus Berkling <email@hidden>)
 >Re: Returning previously instantiated Main page (From: Jeff Schmitz <email@hidden>)

  • Prev by Date: Re: My embedded .woa is displaying funny characters
  • Next by Date: Re: Returning previously instantiated Main page
  • Previous by thread: Re: Returning previously instantiated Main page
  • Next by thread: Re: Returning previously instantiated Main page
  • Index(es):
    • Date
    • Thread