You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jose Gonzalez Gomez <jg...@opentechnet.com> on 2004/09/07 22:46:22 UTC

Page flow

    Hi there,

    I've been reading a few tutorials about Tapestry, and I would like 
to make a few questions. Here is the first one:

    In Tapestry you usually have a listener that gets invoked whenever 
you click a link or submit a form and then inside that listener (or 
maybe delegating it to the Visit object) you decide the next page to 
show using cycle.activate... I'm curious about how people is really 
implementing this in big applications... do you put this code in the 
listener or the Visit object? Is there any way to make this in a more 
declarative way, maybe putting the page flow information in some 
configuration file? Do you think there is any advantage in doing so?

    Best regards
    Jose

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


Re: Page flow

Posted by Richard Kirby <rb...@capdm.com>.
I have found the org.apache.tapestry.callback.ICallback mechanism to be 
useful in some situations for dynamically deciding what page to go to 
next. Especially for dialog or callout style pages that need to return 
back to the page they were called from.

Richard.

On 8 Sep 2004, at 04:04, Erik Hatcher wrote:

> Page flow is left entirely up to the developer.  At first, coming from 
> Struts, I found this a gross oversight, but after using Tapestry 
> hard-core for about a year I've changed my perspective.  Page flow is 
> generally not dynamic - in other words, there is no need to abstract 
> it and it is quite fine for the next page to be specified in the 
> listener method.  In a Struts app, did folks really tinker with the 
> <forward>? Nah, not really - once it was developed, the flow was set.
>
> I'm against unnecessary indirection - so if your application, like 
> most, doesn't demand dynamic page flow then do it more rigidly.
>
> Tapestry leaves the door wide open for you to code your own page flow, 
> either as a <property> in the .page file, or through some other 
> mechanism.  All you need is some abstraction that returns back the 
> page name as a String given some input criteria (perhaps only the 
> current page name).  Thankfully Tapestry leaves this up to the 
> developer given page flow mechanisms when they are dynamic are custom 
> for the application and not easily generalizable.
>
> 	Erik
>
>
> On Sep 7, 2004, at 4:46 PM, Jose Gonzalez Gomez wrote:
>
>>
>>    Hi there,
>>
>>    I've been reading a few tutorials about Tapestry, and I would like 
>> to make a few questions. Here is the first one:
>>
>>    In Tapestry you usually have a listener that gets invoked whenever 
>> you click a link or submit a form and then inside that listener (or 
>> maybe delegating it to the Visit object) you decide the next page to 
>> show using cycle.activate... I'm curious about how people is really 
>> implementing this in big applications... do you put this code in the 
>> listener or the Visit object? Is there any way to make this in a more 
>> declarative way, maybe putting the page flow information in some 
>> configuration file? Do you think there is any advantage in doing so?
>>
>>    Best regards
>>    Jose
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>


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


Re: Page flow

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Page flow is left entirely up to the developer.  At first, coming from 
Struts, I found this a gross oversight, but after using Tapestry 
hard-core for about a year I've changed my perspective.  Page flow is 
generally not dynamic - in other words, there is no need to abstract it 
and it is quite fine for the next page to be specified in the listener 
method.  In a Struts app, did folks really tinker with the <forward>? 
Nah, not really - once it was developed, the flow was set.

I'm against unnecessary indirection - so if your application, like 
most, doesn't demand dynamic page flow then do it more rigidly.

Tapestry leaves the door wide open for you to code your own page flow, 
either as a <property> in the .page file, or through some other 
mechanism.  All you need is some abstraction that returns back the page 
name as a String given some input criteria (perhaps only the current 
page name).  Thankfully Tapestry leaves this up to the developer given 
page flow mechanisms when they are dynamic are custom for the 
application and not easily generalizable.

	Erik


On Sep 7, 2004, at 4:46 PM, Jose Gonzalez Gomez wrote:

>
>    Hi there,
>
>    I've been reading a few tutorials about Tapestry, and I would like 
> to make a few questions. Here is the first one:
>
>    In Tapestry you usually have a listener that gets invoked whenever 
> you click a link or submit a form and then inside that listener (or 
> maybe delegating it to the Visit object) you decide the next page to 
> show using cycle.activate... I'm curious about how people is really 
> implementing this in big applications... do you put this code in the 
> listener or the Visit object? Is there any way to make this in a more 
> declarative way, maybe putting the page flow information in some 
> configuration file? Do you think there is any advantage in doing so?
>
>    Best regards
>    Jose
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


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