You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Brad A Cupit <br...@lsu.edu> on 2008/07/15 23:28:52 UTC

ActionSupport.input()-- what's it for?

Hi,
Anybody know what the input() method on ActionSupport is for?

It doesn't seem to be defined by any interfaces. I was hoping that it
was called whenever there was a validation error, but that doesn't seem
to be the case.

Here's the method definition:

public String input() throws Exception {
    return INPUT;
}

Brad Cupit
Louisiana State University - UIS


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


RE: ActionSupport.input()-- what's it for?

Posted by Brad A Cupit <br...@lsu.edu>.
Tuesday, July 15, 2008 4:52 PM, Dave Newton wrote:

> It's the default implementation of a method designed for form
> input; validation is skipped by default.

> When you have an action implementing Prepareable it's a
> convenience, before annotation-based configuration you'd
> configure two action mappings--the initial form display
> would use the input() method, submission would use execute().

Thanks for the quick response Dave!

So, before annotation-based configuration, you'd setup action chaining
to have it go from the input() method to the execute() method?

Has that style now been replaced with Validateable's validate() method
and the DefaultWorkflowInterceptor?

Even then, I guess I still don't understand why it is a method on
ActionSupport, if it was just a convention.

Brad Cupit
Louisiana State University - UIS


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


Re: ActionSupport.input()-- what's it for?

Posted by Dave Newton <ne...@yahoo.com>.
--- On Tue, 7/15/08, Brad A Cupit <br...@lsu.edu> wrote:
> Anybody know what the input() method on ActionSupport is for?
> 
> It doesn't seem to be defined by any interfaces. I was
> hoping that it was called whenever there was a validation 
> error, but that doesn't seem to be the case.

It's the default implementation of a method designed for form input; validation is skipped by default.

When you have an action implementing Prepareable it's a convenience, before annotation-based configuration you'd configure two action mappings--the initial form display would use the input() method, submission would use execute().

That's my take on it, anyway.

Dave


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