Re: Switch Component question...
Re: Switch Component question...
- Subject: Re: Switch Component question...
- From: Jean-François Veillette <email@hidden>
- Date: Thu, 27 Apr 2006 09:49:55 -0400
This inverse the role-responsabilities of the component as proposed by
James.
This model work great when the wrapper is mostly static, or doesn't
interact directly with the actual content shown.
The other model proposed by James, is more appropriate (at least for
me) when your 'wrapper' also act as a controller of the content.
I guess the final decision would depend on what kind of wrapper is it
and what is the level of interaction (dependencies) between the wrapper
and the content.
- jfv
Le 06-04-27, à 09:44, Jerry W. Walker a écrit :
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:
email@hidden
This email sent to email@hidden
http://www.freeiPods.com/?r=21419063
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
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