• 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: Switch Component question...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Switch Component question...


  • Subject: Re: Switch Component question...
  • From: Patrick Middleton <email@hidden>
  • Date: Thu, 27 Apr 2006 15:14:33 +0100


On 27 Apr 2006, at 14:29, James Cicenia wrote:

Hello -

I am developing a new website and decided correctly or incorrectly, to have my wrapper page(s) be the main page and then swap out the content in the wrapper with the switch component.

My question is.. normally I have code like nextPage.setEC(ec), etc.,

How do I do this with my architecture as the wrapper really is the next page?

Implement a new abstract subclass of WOComponent called something like WrapperArchitectureComponent. Add an ivar and accessors for the editing context etc. Override a couple of significant methods, eg awake(), appendToResponse(), takeValuesFromRequest() and invokeAction (), to call another method -- wrapperHelper() maybe? -- and then call super.


wrapperHelper() should look something like this:

public void wrapperHelper() {
    if (ec==null) setEC((WrapperArchitectureComponent)parent().ec());
}

Make all your wrapped components and the wrapper inherit from WrapperArchitectureComponent, and in the wrapper page class itself, override
wrapperHelper():


public void wrapperHelper() {}

This isn't the only way of dealing with this, but all the good ways seem to involve making an abstract subclass of WOComponent to encapsulate as much of the plumbing as possible.


Or is what I am doing just wrong?

Almost certainly!

-- Patrick

_______________________________________________
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


References: 
 >Switch Component question... (From: James Cicenia <email@hidden>)

  • Prev by Date: Re: Switch Component question...
  • Next by Date: Re: Switch Component question...
  • Previous by thread: Re: Switch Component question...
  • Next by thread: Re: Switch Component question...
  • Index(es):
    • Date
    • Thread