You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Gunnar Eketrapp <gu...@gmail.com> on 2009/10/11 10:40:07 UTC

Page methods guidelines ...

Hi!

I have been porting a web app to T5 for some weeks now and have some
questions on how you folks do!

I started fresh with using ... onActivate() as method for preparing data for
the template code.

Some times onActivate(ctx) + ctx onPassivate().

Actions where handled in onActionFromFoo() or onActionFromBar() methods.

Form processing in onSuccess()

Fine so far ....

Then I read
http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/navigation/onactivateandonpassivate/3
that disencourage using onActivate() as the setup methtod.

I also just realised that onActivate() is called prior to onSuccess() ...
which makes some of code run twice ....

I then thought that ...

public void setupRender()

... would be a better place to do my page preparements but then I am not
able to navigate to another page.


Is onActivate() really such as a bad place do the the preparements? If not
how do I distinguish between the case
where a form is submitted or a normal page rendering.

Thanks in advance,
Gunnar Eketrapp

Re: Page methods guidelines ...

Posted by Kalle Korhonen <ka...@gmail.com>.
On Wed, Oct 14, 2009 at 10:23 PM, Gunnar Eketrapp
<gu...@gmail.com> wrote:
> It ought to be linked from the T5 site!

Right there on the home page... http://tapestry.apache.org/

Kalle


> 2009/10/14 Sergey Didenko <se...@gmail.com>
>
>> May be this will help you:
>>
>> http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/navigation/whatiscalledandwhen
>>
>> On Sun, Oct 11, 2009 at 11:40 AM, Gunnar Eketrapp
>> <gu...@gmail.com> wrote:
>> > Hi!
>> >
>> > I have been porting a web app to T5 for some weeks now and have some
>> > questions on how you folks do!
>> >
>> > I started fresh with using ... onActivate() as method for preparing data
>> for
>> > the template code.
>> >
>> > Some times onActivate(ctx) + ctx onPassivate().
>> >
>> > Actions where handled in onActionFromFoo() or onActionFromBar() methods.
>> >
>> > Form processing in onSuccess()
>> >
>> > Fine so far ....
>> >
>> > Then I read
>> >
>> http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/navigation/onactivateandonpassivate/3
>> > that disencourage using onActivate() as the setup methtod.
>> >
>> > I also just realised that onActivate() is called prior to onSuccess() ...
>> > which makes some of code run twice ....
>> >
>> > I then thought that ...
>> >
>> > public void setupRender()
>> >
>> > ... would be a better place to do my page preparements but then I am not
>> > able to navigate to another page.
>> >
>> >
>> > Is onActivate() really such as a bad place do the the preparements? If
>> not
>> > how do I distinguish between the case
>> > where a form is submitted or a normal page rendering.
>> >
>> > Thanks in advance,
>> > Gunnar Eketrapp
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
> --
> [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
> Allévägen 2A, 132 42 Saltsjö-Boo
>

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


Re: Page methods guidelines ...

Posted by Gunnar Eketrapp <gu...@gmail.com>.
Yea thanks!

I discovered the jumpstart app after this quuestion was raised and it's a
great source for T5 newbies.

It ought to be linked from the T5 site!


2009/10/14 Sergey Didenko <se...@gmail.com>

> May be this will help you:
>
> http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/navigation/whatiscalledandwhen
>
> On Sun, Oct 11, 2009 at 11:40 AM, Gunnar Eketrapp
> <gu...@gmail.com> wrote:
> > Hi!
> >
> > I have been porting a web app to T5 for some weeks now and have some
> > questions on how you folks do!
> >
> > I started fresh with using ... onActivate() as method for preparing data
> for
> > the template code.
> >
> > Some times onActivate(ctx) + ctx onPassivate().
> >
> > Actions where handled in onActionFromFoo() or onActionFromBar() methods.
> >
> > Form processing in onSuccess()
> >
> > Fine so far ....
> >
> > Then I read
> >
> http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/navigation/onactivateandonpassivate/3
> > that disencourage using onActivate() as the setup methtod.
> >
> > I also just realised that onActivate() is called prior to onSuccess() ...
> > which makes some of code run twice ....
> >
> > I then thought that ...
> >
> > public void setupRender()
> >
> > ... would be a better place to do my page preparements but then I am not
> > able to navigate to another page.
> >
> >
> > Is onActivate() really such as a bad place do the the preparements? If
> not
> > how do I distinguish between the case
> > where a form is submitted or a normal page rendering.
> >
> > Thanks in advance,
> > Gunnar Eketrapp
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo

Re: Page methods guidelines ...

Posted by Sergey Didenko <se...@gmail.com>.
May be this will help you:
http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/navigation/whatiscalledandwhen

On Sun, Oct 11, 2009 at 11:40 AM, Gunnar Eketrapp
<gu...@gmail.com> wrote:
> Hi!
>
> I have been porting a web app to T5 for some weeks now and have some
> questions on how you folks do!
>
> I started fresh with using ... onActivate() as method for preparing data for
> the template code.
>
> Some times onActivate(ctx) + ctx onPassivate().
>
> Actions where handled in onActionFromFoo() or onActionFromBar() methods.
>
> Form processing in onSuccess()
>
> Fine so far ....
>
> Then I read
> http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/navigation/onactivateandonpassivate/3
> that disencourage using onActivate() as the setup methtod.
>
> I also just realised that onActivate() is called prior to onSuccess() ...
> which makes some of code run twice ....
>
> I then thought that ...
>
> public void setupRender()
>
> ... would be a better place to do my page preparements but then I am not
> able to navigate to another page.
>
>
> Is onActivate() really such as a bad place do the the preparements? If not
> how do I distinguish between the case
> where a form is submitted or a normal page rendering.
>
> Thanks in advance,
> Gunnar Eketrapp
>

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