You were correct - Actions in S2 can be POJO's.  They don't need to
implement or extend anything, and in fact, don't even need any
annotations.  Now, we still do have an Action interface with a single
execute method that you can implement if you'd like, and we also have
several support classes you can extend - ActionSupport and
DefaultActionSupport - with the latter being the preferred superclass.

How Struts 2 handles things like localisation, validation, error and
normal messages, etc., is through decorating your Action with certain
interfaces like Validatable and TextProvider.  These support classes
implement many of these extra interfaces, saving you time and code,
but as I mentioned, they are completely optional.

Don

On 5/11/07, Rick Schumeyer <[EMAIL PROTECTED]> wrote:
It's quite possible I'm confused, but I thought that actions in S2 were
now POJOs.  In Webwork in Action, for example, we see:

public class HelloWorld implements Action

but in the blank application we see

public class ExampleSupport extends ActionSupport

Is this an example where Webwork in Action is out-of-date, or can you
still do something like that with S2?  If so, is there a reason why I
*would not* want to use POJOs with an Action interface?

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



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

Reply via email to