You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Mike Oestereter <mi...@gmail.com> on 2006/11/17 15:08:28 UTC

handle on component's enclosed components

Hi

Say I've got the following on a template page where Main and Sub are
components..

<span jwcid="main@Main" . . . >

   <p>html</p>

   <!-- maybe even a @For here??  -->
   <span jwcid="sub1@Sub" . . ./>
   <span jwcid="sub2@Sub" . . ./>

   <p>more html</p>

</span>


Is there a way to get in Main's class a handle on all the Sub
components enclosed by Main without adding an explicit reference in
each Sub to Main?

Many thanks

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: handle on component's enclosed components

Posted by D&J Gredler <dj...@gmail.com>.
AbstractComponent#getBody( ) maybe?

On 11/17/06, Mike Oestereter <mi...@gmail.com> wrote:
>
> Yes,yes I know Tapestry has an API - I just don't know it that well!
>
> I am NOT looking for the nested or the contained components of a
> page/component.
>
> I'm specifically looking for only the components that is in the body
> part of a surrounding component (rendered by a @RenderBody of Main
> using my example).
>
>
>
> On 11/17/06, Karthik N <ka...@gmail.com> wrote:
> > Look at the API docs
> >
> > http://tapestry.apache.org/tapestry4/tapestry/apidocs/index.html
> >
> > AbstractPage has getNestedComponent
> >
> > AbstractPage extends AbstractComponent that has getComponents()
> >
> > HTH
> >
> > On 11/17/06, Mike Oestereter <mi...@gmail.com> wrote:
> > >
> > > Hi
> > >
> > > Say I've got the following on a template page where Main and Sub are
> > > components..
> > >
> > > <span jwcid="main@Main" . . . >
> > >
> > >    <p>html</p>
> > >
> > >    <!-- maybe even a @For here??  -->
> > >    <span jwcid="sub1@Sub" . . ./>
> > >    <span jwcid="sub2@Sub" . . ./>
> > >
> > >    <p>more html</p>
> > >
> > > </span>
> > >
> > >
> > > Is there a way to get in Main's class a handle on all the Sub
> > > components enclosed by Main without adding an explicit reference in
> > > each Sub to Main?
> > >
> > > Many thanks
> > >
> > > Mike
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> >
> > --
> > Thanks, Karthik
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: handle on component's enclosed components

Posted by Mike Oestereter <mi...@gmail.com>.
Yes,yes I know Tapestry has an API - I just don't know it that well!

I am NOT looking for the nested or the contained components of a page/component.

I'm specifically looking for only the components that is in the body
part of a surrounding component (rendered by a @RenderBody of Main
using my example).



On 11/17/06, Karthik N <ka...@gmail.com> wrote:
> Look at the API docs
>
> http://tapestry.apache.org/tapestry4/tapestry/apidocs/index.html
>
> AbstractPage has getNestedComponent
>
> AbstractPage extends AbstractComponent that has getComponents()
>
> HTH
>
> On 11/17/06, Mike Oestereter <mi...@gmail.com> wrote:
> >
> > Hi
> >
> > Say I've got the following on a template page where Main and Sub are
> > components..
> >
> > <span jwcid="main@Main" . . . >
> >
> >    <p>html</p>
> >
> >    <!-- maybe even a @For here??  -->
> >    <span jwcid="sub1@Sub" . . ./>
> >    <span jwcid="sub2@Sub" . . ./>
> >
> >    <p>more html</p>
> >
> > </span>
> >
> >
> > Is there a way to get in Main's class a handle on all the Sub
> > components enclosed by Main without adding an explicit reference in
> > each Sub to Main?
> >
> > Many thanks
> >
> > Mike
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Thanks, Karthik
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: handle on component's enclosed components

Posted by Karthik N <ka...@gmail.com>.
Look at the API docs

http://tapestry.apache.org/tapestry4/tapestry/apidocs/index.html

AbstractPage has getNestedComponent

AbstractPage extends AbstractComponent that has getComponents()

HTH

On 11/17/06, Mike Oestereter <mi...@gmail.com> wrote:
>
> Hi
>
> Say I've got the following on a template page where Main and Sub are
> components..
>
> <span jwcid="main@Main" . . . >
>
>    <p>html</p>
>
>    <!-- maybe even a @For here??  -->
>    <span jwcid="sub1@Sub" . . ./>
>    <span jwcid="sub2@Sub" . . ./>
>
>    <p>more html</p>
>
> </span>
>
>
> Is there a way to get in Main's class a handle on all the Sub
> components enclosed by Main without adding an explicit reference in
> each Sub to Main?
>
> Many thanks
>
> Mike
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Thanks, Karthik