Re: Need some help with WOComponentContent
Re: Need some help with WOComponentContent
- Subject: Re: Need some help with WOComponentContent
- From: "Jerry W. Walker" <email@hidden>
- Date: Mon, 19 Feb 2007 13:57:42 -0500
Hi, Kevin,
Page wrappers can be a bit confusing, since they invert the rendered
HTML hierarchy from the calling hierarchy. That is, the wrapped page
invokes the wrapper page, but the wrapper page wraps the wrapped
page's content.
If you have several pages wrapped by a page wrapper, you typically
create the page wrapper (let's call it Wrapper) with the final
rendered page's fixed content (the stuff you want to stay constant
from page to page, like headers and footers). You add a
WOComponentContent element in Wrapper to expose the content of the
page that wants to be wrapped (let's call it Wrappee).
In Wrappee, you set to Partial Document (as you did) and typically
insert the Wrapper custom element as the top of the HTML hierarchy
for the page so that it encloses all of Wrappee's other content.
When you invoke Wrappee, it calls Wrapper and hands over its content
(that is, the content enclosed by the Wrappee's custom Wrapper
component) so that Wrapper can render its own content and insert
Wrappee's content in the ONE place on Wrapper that you put the
WOComponentContent.
If you do that, then any page you invoke in which you've embedded
Wrapper will render Wrapper's content wrapped around its own content.
In that way, 20 different Wrappees can each call Wrapper to have
their content wrapped by the headers, footers, etc.
Given that situation, it makes no sense to put more than a single
WOComponentContent element inside Wrapper.
Regards,
Jerry
On Feb 19, 2007, at 11:05 AM, Kevin Windham wrote:
I have a layout that I want to use for a template and inside that
layout I have more than one section of content I want to add based
on what page is being viewed. To test if this would work I made two
Components. One is called AWrapper, and the other is called Wrapped.
In AWrapper I have a table with 1 row and two columns. In each cell
I have inserted a WOComponentContent.
Then in Wrapped I set it to Partial Document, and inserted a custom
component. I was given one section labeled AWrapper in which to put
additional content. I simply typed the word "test" in a ran the
project.
What I ended up with with I went to the Wrapped page is a table
with two cells both containing the word "test".
Is there a way to set this up so that I can make a page that wraps
multiple sections of content, or is that just not going to happen?
Thanks,
Kevin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
--
__ 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:
This email sent to email@hidden