You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Henri Dupre <he...@gmail.com> on 2007/11/29 08:08:09 UTC

retrieve outer component reference from inner component

In my page I have a
@Border component
and inside a @ImageSubmit that should update (with ajax) a component outside
@Border.
I did some searches here, the only method that was suggested is to pass
component references though parameters but this would be quite ugly because
there is quite a bit of complex nesting involved. What other methods could I
use?

Thanks

Henri Dupre
Actualis Center

Re: retrieve outer component reference from inner component

Posted by Jesse Kuhnert <jk...@gmail.com>.
You could use IPage.getNestedComponent() by calling
getPage().getNestedComponent()
(http://tapestry.apache.org/tapestry4.1/apidocs/src-html/org/apache/tapestry/IPage.html#line.111)

Other than passing the component around as a parameter,  is there a
reason why you need the reference to it at all?   Could you not just
call ResponseBuilder.updateComponent(String componentId)  ?

On Nov 29, 2007 2:08 AM, Henri Dupre <he...@gmail.com> wrote:
> In my page I have a
> @Border component
> and inside a @ImageSubmit that should update (with ajax) a component outside
> @Border.
> I did some searches here, the only method that was suggested is to pass
> component references though parameters but this would be quite ugly because
> there is quite a bit of complex nesting involved. What other methods could I
> use?
>
> Thanks
>
> Henri Dupre
> Actualis Center
>



-- 
Jesse Kuhnert
Tapestry / OGNL / Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

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