in the step 3 if the specific page would to render the next link, what
is the purpose of the WEBFLOW?
isn't the WEBFLOW'S responsibility to take care of the page navigation??
well i guess the purpose of having such a concept of WEBFLOW is to
decouple the Page presentation from the page navigation
it would be better to refine current framework as
each page there are some Entry Points and Exit Points, all are normal
methods, (perhaps using annotation to give a name)
class MyCRUD{
@EntryPoint(name='myEntry')
void onEnter(long objectID){
// do some setup
}
@ExitPoint(name='delete')
Object onDelete(long objectID){
// .........
}
@ExitPoint(name='update')
Object onUpdate(long objectID){
//...........
}
}
then
the WEBFLOW looks like
class WebFlow{
public static void contributePageFlow(PageFlowConfig config){
config.getPage(MyCRUD.class).setExit('delete',
DeleteConfirmationPage.class, 'confirmationEntry');
config.getPage(MyCRUD.class).setExit('update',
UpdateConfirmationPage.class, 'confirmationEntry');
}
}
so upon the action, say delete from MyCRUD, MyCRUD::onDelete() was first
invoked , then the return value (business specific, could be an Object
to be deleted) will be pass to DeleteConfirmationPage, and invoke the
@EntryPoint confirmationEntry
so the actual work flow is taken care of by the WebFlow
and for the actionMethods, there are no more page navigation related
objects to be returned
Joshua Jackson wrote:
I like the idea of web-flow like yours. It's not as complicated as
Spring Webflow which involves a helluava xml. I hope tapestry5 would
adopt your idea.
Cheers.
On 12/21/07, jeffrey ai <[EMAIL PROTECTED]> wrote:
Hi All,
As you may know or not, T5 doesn't have a web flow framework like the Spring
one yet. Howard mentioned he may add it in the next release. However, our
project cannot wait for that, therefore I have created a simple one on T5.
Here is the general idea, your comments are **GREATLY APPRECIATED**.
* A WEBFLOW, which is a normal T5 page, injects and contains PAGEs that
will used in this web flow.
* A PAGE can be used in multiple web flows. A PAGE doesn't have any
knowledge of where to go for next page, previous page or cancel link. All
these knowledge are dynamically populated from a WEBFLOW.
* A WEBFLOW has some data objects, which are annotated as @ApplicationState.
PAGEs can pick up whatever data they are interested, display them or
populate them.
* A typical request flow is like below:
=> An action request is post back to a PAGE
=> A PAGE will do some validation and populate the data
=> In onSuccess() method in PAGE, it returns the next page link, which is
populated by WEBFLOW and pointing to an action in WEBFLOW
=> A redirection action request is sent to WEBFLOW
=> Some onPage() method in WEBFLOW is triggered. It could review the data ,
decide the next page and return it.
=> A page render request is sent to the next page
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]