Hi Marek

setupRender -- beginRender ---- ---- afterRender

are rendering phases i.e. these events occur during rendering of
components/pages.

When an event is triggered, event handling phases occur like
onEventFromComponent() or in case of a form submission, onPrepare(),
onPrepareForSubmit(), onValidate(), onSuccess(), onFailure(),
onSubmit() etc. This are typically followed by rendering phases.

As you are pushing PageParams onto the environment in the rendering
phase, it will not be available in the event handling phase.

On Wed, Aug 17, 2011 at 1:29 AM, Marek Matus <[email protected]> wrote:
> Hi,
>
> I'm using Environmental to passing parameters to nested components. In my
> page there is:
>
>   @SetupRender
>    void onSetupRenderer() {
>        environment.push(IPageParams.class, this.pageParams);
>    }
>
>    @AfterRender
>    void afterRender()
>    {
>        environment.pop(IPageParams.class);
>    }
>
> In my nested components is:
>
>    @Environmental
>    private IPageParams pageParams;
>
> It works fine for page rendering but when a form is submitted then the
> onSetupRenderer is not called and parameters are not passed to nested
> component :-(.
> 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.
>
> Could you advice me how to put parameters to environmental for page
> rendering and form submitting?
>
> Thanks,
>
> Marek
>



-- 
Regards

Taha Hafeez Siddiqi (tawus)
http://tawus.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to