Michael Jouravlev wrote:
An action should *never* forward to a page that does not belong to
that action; this practice leads to a spaghetti code both in Java and
in config file.

If you mean forward directly to a JSP, I agree. If you meant something else, I'm not sure how you would ever get to another page :)

I would say slightly different: what you really doing is transferring
control to another web resource and you *do not care* which page will
be shown. To select and to setup a proper page is the task of the
resource you are forwarding to.

Yep, I think you meant what I said above :)  I agree.

In that way, I suppose you *could* create an app that was nothing but
setup actions... that would imply though that there are no events outside
page transitions...

What do you mean? As I see it, every page (or a set of pages) belong
to a particular pair of setup action / input action (or to a single
dialog action). Setup action (I call it "render action") renders a
page. When you click anywhere on this page or sumbit a form, event
goes to an input action that belongs to this web resource. Event does
not go outside! Only an action can transfer control to another action.

I think we're saying the same things, just with some different terminology. As I read back what I wrote, I realized even in the situation I was trying to outline, you would *still* have setup actions and event handler actions as I think of them... I think you would use the terms render action and input action. Same idea though.

Action A executes to set up page A...
Page A is shown...
For submitted to Action A1, forward to Action B...
Action B executes to set up Page B...
Page B is shown...
...and so on...

If A and A1 belong to the same resource, then I agree with that.

Yes, exactly.

I would use redirect instead of forward simply to prevent double submit
issues. What if you refresh page B? Redirection between resources does
not imply that actionforms must be session-scoped ;-)

No problem with that here, makes sense... always has, I know you've been preaching this for some time :)

Frank

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to