I have a "Holder" page that I store about 125 components.  That page is never 
viewed.  When I want to display one, I render it on a different page.  

However, the missing link might be that components are not like java 
components.  They exist in a pool, 1-to-n of each kind.  They are cycled into 
and out of the pool onto a page.  While in the pool they have no values.  
Proper components are supposed to re-initialize themselves.  When it doesn't 
happen correctly, you see the data of the last user of the component.  So, 
components exist outside of pages, but they have no identity.  Once you put 
them on a page then they have values and real existence.  Kind of a 
metaphysical thing.

So, unless you are displaying a component, there is no need to access it.  
Especially, since Tapestry controls which one will be displayed.  Only at  the 
time of rendering it in a page can you affect or access it.

hth,

Mark

Name: Mark J. Stang
Title: Senior Engineer/Architect
office: +1 303.468.2900
mobile: +1 303.507.2833
Ping Identity



-----Original Message-----
From: Richard Kirby [mailto:[EMAIL PROTECTED]
Sent: Thu 9/7/2006 10:56 AM
To: Tapestry users
Subject: Re: Retrieving Tapestry 4 components from outside Tapestry
 
Hi Dan,

Conceptually, component instances do not exist outside of pages. This is 
just how Tapestry works. If you want to access your component, you will 
need to place it on a dummy page and access it via that page as you suspect.

Is there any particular reason why you don't want a dummy page?

Cheers

Richard

Dan Williams wrote:
> Hi,
> Thanks for responding!
>
> That's true, but my component is not part of any page - just an isolated
> component.
>
> In my original post I used the example of a page (instead of a component) to
> highlight how easy it is to do this if your 'component' is a page.  But if 
> your
> component is an actual component - and not injected into any page - retrieving
> it in a non-tapestry class becomes problematic.
>
> I'm a little confused (and still convinced I'm missing something obvious!) 
> since
> I have understood throughout using Tapestry that everything is a component
> (including pages), which makes it confusing why pages are so easy to retrieve
> this way (via the requestcycle as you pointed out), but Components are not.
>
> Regards,
> Dan
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to