Joe Germuska wrote: <snip />
FWIW, I think Frank's idea of supporting POJO's as actions is the best. The JSF model of "action" is, IMO, the way to go:
1. It is a POJO that doesn't have to extend or implement anything
2. It can have properties for simple pages that don't need separate forms
3. It can be scoped so this silly "threadsafe" thing can go away, and scoping at a session level even opens up new interesting possibilities.
I've been thinking about this too, and I have no objection -- but would someone care to propose a config syntax for it? Would it be yet another "overload" of the "type" attribute? (Fine with me; how to specify which method gets called?) And how would the properties be populated? (item 2)
Here is what an action mapping might look like:
<action-mapping path="Item"
type="foo.bar.ItemAction"
method="view"
scope="application" />or with wildcards:
<action-mapping path="*/*"
type="foo.bar.{1}Action"
method="{2}"
scope="application" />The new attribute, method, specifies what method to call.
As for 2), users can use normal actionforms, _or_ simply define setters on their POJO action class. In the latter case, Struts, behind the scenes, could create a LazyDynaActionForm, and use it to run through validation, then if successful, use it to populate the POJO action. Therefore, in essence, we kept ActionForms, yet made them automatic.
Adding to 3), it would be interesting to add "dialog" scope, something Shale is working on for a scope that is for a logic process where multiple instances might exist in a single session (think browser cloning where two of the user's browsers are going through the same workflow).
Now that I write this, I see Frank suggested the same "method" attribute. Great minds think alike :)
Don
Joe
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
