• 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: disposing components
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: disposing components


  • Subject: Re: disposing components
  • From: Sacha Mallais <email@hidden>
  • Date: Fri, 10 Jun 2005 10:17:44 -0700

On Jun 10, 2005, at 7:25 AM, Florijan Stamenkovic wrote:

I have certain big components that use a private editing context, and are used to add a variable amount of records. Those components are however partial documents that use a PageWrapper that is also a navbar. So, it is possible for a user to go to another part of the app in the middle of adding records by using links/buttons in the PageWrapper. I can use the actions in the PageWrapper to call a method in my components to discard the ec and all it's contents, but don't know if that is necessary. So, is there some behavior of WO that would require such handling?


I use this mechanism:

private void disposeParent()
{
WOComponent parent = this.parent();
if(parent instanceof AddRecordsPage)
{
((AddRecordsPage)parent).disposePage(); //disposePage () method does the disposing of the ec and records
}
}

Your method will work. Of course, you don't have to discard the EC or its contents. Just let the EC, its contents and the page reside in the page cache until the page gets expired out of the cache, at which point the EC will be disposed of automatically. This method allows user backtracking (edit stuff on page A, visit page B in the middle of editing, go back and hit submit on page A).


Of course, if you're using the session EC, this method will not work.


sacha

_______________________________________________
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: disposing components
      • From: Florijan Stamenkovic <email@hidden>
References: 
 >disposing components (From: Florijan Stamenkovic <email@hidden>)

  • Prev by Date: Re: WebObjects feedback forum
  • Next by Date: Trouble Connecting to Database with WO 5.3
  • Previous by thread: disposing components
  • Next by thread: Re: disposing components
  • Index(es):
    • Date
    • Thread