You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Joe Andolina <jo...@andomation.com> on 2004/09/23 03:12:21 UTC

Duplicate Components and DirectLink handlers

Hello,
	I have two questions that I would love answers to and examples if
anyone is willing.


1) Why cant I have 2 of the same components on the same page? I have a
pagination component that I want at the top and bottom of my search results.
The compiler seems to need that I declare the same component two times in my
.page file. Is this correct?


2) What is the syntax for having a child component call a handler in its
parent container or parent page? Ideally I would like to capture the events
in my pagination component and then pass the cycle to my parent container.



Joe


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


Re: Duplicate Components and DirectLink handlers

Posted by Cyril Godefroy <cy...@ecomposite.fr>.
On Sep 23, 2004, at 3:12 AM, Joe Andolina wrote:

> 1) Why cant I have 2 of the same components on the same page? I have a
> pagination component that I want at the top and bottom of my search 
> results.
> The compiler seems to need that I declare the same component two times 
> in my
> .page file. Is this correct?
>
That is correct. You have to name them differently. Spindle tells you 
so, and Tapestry spec reader also (the compiler is unable to do so)
>
> 2) What is the syntax for having a child component call a handler in 
> its
> parent container or parent page? Ideally I would like to capture the 
> events
> in my pagination component and then pass the cycle to my parent 
> container.

parent page :
this.getPage();

parent component:
this.getContainer();

NB: this is in AbstractComponent documentation.