> Chakra words reminds me of the interesting idea for components to have
> their independent activation context. That page is not aware of.
I for one don't like this idea, if you consider what onActivate() is, and how 
the activation context is produced. Its an 'EXTERNAL event', a way of invoking 
and configuring a page from the URL (but particularly good for external URL's).

> the component encapsulates the knowledge about specific
> url parameters that it needs
So given the above this appears to me to be paradoxical, if you are going to 
encapsulate the url parameters then you do not need to expose an external event 
method, something you can achieve with parameters for instance. 

Parameters define the 'static structure' that making components so reusable, 
leaving the state to be handled by the containing page, imho this is a good 
design pattern, and where Tapestry is so successful as a component framework 
i.e.: true components that can be configured and reused without coupling to 
state saving logic.

> I wouldn't couple a component so tightly to a specific page. If you need to
> pass certain bits of information you can also use component parameters from
> within the page.
Exactly, and if necessary use mixins to enhance the component behavior when you 
encounter limitations with parameters

thats my 2 cents,
Peter

----- Original Message -----
From: "Sergey Didenko" <sergey.dide...@gmail.com>
To: "Tapestry users" <users@tapestry.apache.org>
Sent: Tuesday, 22 September, 2009 12:01:14 GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: Re: Accessing page context from a component

Chakra words reminds me of the interesting idea for components to have
their independent activation context. That page is not aware of.

In this case the component encapsulates the knowledge about specific
url parameters that it needs. And can be reused on different pages
without altering them. For example imagine a custom pager component
that needs parameter "pageNum".

I use a somewhat similar solution using @Environmental inside Mixins
that stores data in request parameters.
("?pageNum=3&anotherParam=3.333")

On Mon, Sep 14, 2009 at 8:15 PM, Howard Lewis Ship <hls...@gmail.com> wrote:
> Otho is exactly right here.  Each piece of Tapestry has its purpose, and
> pages act as a bridge between the client and the components within the page.
>
> On Mon, Sep 14, 2009 at 4:13 AM, Otho <taa...@googlemail.com> wrote:
>
>> I wouldn't couple a component so tightly to a specific page. If you need to
>> pass certain bits of information you can also use component parameters from
>> within the page.
>>

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


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

Reply via email to