Hard to pinpoint the right choice without seeing the code, sounds to me like 
you need to use onPrepare rather since you are referring to a form, if that is 
not sufficient rethink the design maybe use InjectContainer instead of 
environmental... there is more than one way to do this.

Peter




----- Original Message -----
From: "Marek Matus" <marek.matus...@gmail.com>
To: "Thiago H. de Paula Figueiredo" <thiag...@gmail.com>
Cc: "Tapestry users" <users@tapestry.apache.org>
Sent: Wednesday, 17 August, 2011 08:08:46 GMT +02:00 Athens, Bucharest, Istanbul
Subject: Re: Passing parameters to nested components

Thanks for your response.

If I use PageAttached and PageDetached like this:

@PageAttached
    void onPageAttached() {
        environment.push(IPageParams.class, this.pageParams);
    }

    @PageDetached
    void onPageDetached() {
        environment.pop(IPageParams.class);
    }

Then I receive this error message in nested component:

Render queue error in SetupRender[DashboardSubmitter:edit]: No object of
type com.test.data.*IPageParams *is available from the Environment.
Available types are com.test.data.*IPageParams*,
org.apache.tapestry5.RenderSupport,
org.apache.tapestry5.ValidationDecorator,
org.apache.tapestry5.internal.services.DocumentLinker,
org.apache.tapestry5.services.ClientBehaviorSupport,
org.apache.tapestry5.services.Heartbeat,
org.apache.tapestry5.services.javascript.JavaScriptSupport.

The requested class IPageParams is available but is not load from
enviromental. (I shuld note that I use tapestry 5.2.6.)

Thanks for your help.

Marek


2011/8/17 Thiago H. de Paula Figueiredo <thiag...@gmail.com>

> On Tue, 16 Aug 2011 16:59:19 -0300, Marek Matus <marek.matus...@gmail.com>
> wrote:
>
>  Hi,
>>
>
> Hi!
>
>  I have tried to use @PageAttached and @PageDettached functions which are
>> called for form submission too, but it doesn't work because (I think)
>> there is used different class loader and nested component doesn't load the
>> data
>> from environmental.
>>
>
> @PageAttached and @PageDettached events should work in your case. I'm
> sorry, but your explanation makes little sense. How have you declared your
> event handler methods?
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>

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

Reply via email to