Thorsten Schäfer wrote:
I'm currently taking a look at Struts 2 and I particularly like getting
rid of ActionForms. As I understand, WebWorks/Struts2 offers two ways to
map forms to business domain objects:
1. I can provide a getter method (getDomainObject()) in the action and
refer to its properties in a JSP by using "domainObject.value".
2. I can use the ModelDriven Interface and return my domain object
there. This enables to access the domain object's values directly using
"value".
I wonder if there are any guidelines or best practices which way to use?
Are there additional benefits/drawbacks of the two alternatives?
Your best bet might be to surf the mailing list archives looking for
discussion of ModelDriven. It's largely a matter of preference and
different developers see different trade-offs between approaches.
Better yet, try both and see which you prefer :-)
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]