[Moving repy from another thread]

When we added using a forward for the input value (where a request
gets bounced should validation failed), Craig noted that allowing a
URI there, rather than a forward, was an error. From the beginning, it
should have been a forward.

I think the case Joe describes (below) is one reason why. If control
passes through the forward before going out to the page, then we have
a place where we can hook "setup" logic.

When we discussed this idea before, we got stuck on what to do if the
setup logic fails. We don't want the setup logic to be involved in
navigation. That should be the Action's job. But, I'm now thinking
that throwing an Exception, and letting the declarative
ExceptionHandler catch it, should work well enough.

-Ted.

On Fri, 18 Mar 2005 12:04:10 -0600, Joe Germuska <[EMAIL PROTECTED]> wrote:
> At 11:24 AM -0600 3/18/05, <[EMAIL PROTECTED]> wrote:
> >  > Dakota Jack wrote:
> >>
> >>  I am not sure exactly what the question is.  I would like a
> >>  framework solution that provides the data via ActionForms.
> >>  How people handle that data would be as undefined as it is at
> >>  the moment.  The *only* difference would be that the
> >>  framework would provide data from and to more than one ActionForm.
> >
> >The question was for Joe.  You are asking for a particular
> >implementation and Joe was suggesting a way to support that
> >implementation.  Joe also hinted that he would use a different
> >implementation to solve the business problem.  My question was "What is
> >Joe's preferred implementation?"
> 
> I prefer to divide "controller" logic into "request-controller" and
> "response-controller."  I've developed local solutions which hook
> view-controller logic to forwards (in our case, keyed to the tiles
> definition name which is in ActionForward.getPath()).
> 
> This allows you to make sure that your setup logic gets called
> whether someone goes to a page directly or whether they get bounced
> there because of a form validation failure.  On the user list earlier
> today, Rick R. indicated that he doesn't use the framework to do
> validation because he wants to make sure that his setup behavior gets
> called.  I think we can eliminate that reason for not using the
> framework to do validation.  At least, I've done it in my own apps in
> a way that I like, and I think that in Struts 1.3 with per
> ForwardConfig chains, one could move all setup logic into chain
> Commands and be sure that it was executed before dispatch to the view
> JSP/Velocity template/what-have-you.
> 
> I think i posted a more detailed example earlier this week, including
> a rough pseudo-code FormPopulationCommand, but I can't seem to find
> it in the archives...
> 
> Joe 

On Fri, 18 Mar 2005 12:49:23 -0600, Hubert Rabago <[EMAIL PROTECTED]> wrote:
> That's cause it got buried in a thread with 50+ messages.
> http://marc.theaimsgroup.com/?l=struts-user&m=111034368425749&w=2
> 
> Hubert

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

Reply via email to