Re: Switch Component question...
Re: Switch Component question...
- Subject: Re: Switch Component question...
- From: Ken Anderson <email@hidden>
- Date: Thu, 27 Apr 2006 10:11:31 -0400
I was about to write what Jerry wrote - so just consider this a
nod :) Of course, since Jerry and I have worked together on a number
of projects, this is no surprise!
Ken
On Apr 27, 2006, at 9:44 AM, Jerry W. Walker wrote:
Hi, James,
On Apr 27, 2006, at 9:29 AM, 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?
Or is what I am doing just wrong?
Whether it's "...just wrong" or not, I think there's a better way
to do it.
* Make your page wrapper a full component
* Where you would put the page's content in your page wrapper,
instead add a WOComponentContent element
* Make all of your other pages partial components
* Start each of your other pages with a PageWrapper custom
component (presuming that's what you named your page wrapper)
* Add the rest of the page's content between the PageWrapper tag
and its end tag.
If you have a page title or some other wrapper content that has to
change with each page, you can add bindings to the page wrapper and
bind to them from the pages like any other subcomponent.
What makes this anti-intuitive is the fact that though the page
wrapper is a subcomponent, the component that references it is
embedded in it on the page. It really tends to invert your thinking
the first couple times you use it. After a while, it feels like
second nature.
HTH.
Regards,
Jerry
--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial
Strength Internet Enabled Systems
email@hidden
203 278-4085 office
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40anderhome.com
This email sent to email@hidden
_______________________________________________
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