-1 on adding it in the base Action interface. The minimum level the core XWork framework should do is execute(), that's it.
-Pat ----- Original Message ----- From: "Jason Carreira" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 07, 2003 6:07 AM Subject: RE: [OS-webwork] Action Properties & HttpSession > > -----Original Message----- > > From: Rickard Öberg [mailto:[EMAIL PROTECTED]] > > > > I have an idea: how about adding an interface "Model" that has one > > method "Object getModel()". It would be implemented in > > ActionSupport as: public Object getModel() { return this; } > > > > However, for those cases where a separate bean is used (e.g. a value > > object from EJB) it would be overriden by the action as: > > public Object getModel() { return someModelBean; } > > > > When the dispatcher has executed an action and needs to > > decide what to > > put on the ValueStack it simply checks for the Model > > interface and uses > > it if available. If not available, then the action itself is used. > > > > This would be largely transparent, but would allow for easy > > use of the > > "form bean" concept in Struts. If you need it it's there, but the > > default is that action=model. > > > > By using this one could avoid doing form names such as > > "myBean/oneProperty" and simply use "oneProperty" instead, if the > > getModel() method returns the model to be used both as "input" and as > > "result". > > > > What say ye? > > > > /Rickard > > +1. Sounds good to me. I've added a Jira task to add this to WW2.0. Speaking of which, can someone make it so people can comment on Jira Issues? And maybe make it so I can assign things to myself? > > I'm thinking for WW2.0 this can be put directly into the Action Interface, and have the default behavior described by Rickard in ActionSupport. > > Jason > > > ------------------------------------------------------- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld http://www.vasoftware.com > _______________________________________________ > Opensymphony-webwork mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork