struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Affonso <glis...@greywether.com>
Subject Re: ModelDriven vs OGNL assignment?
Date Fri, 02 Nov 2007 18:28:59 GMT
Jon Wilmoth wrote:
> Besides the simplified view references, I've used the level of
> indirection to allow for a dynamic model on a single action class
> that implements a number of related actions.  In my case the action
> configuration sets a static property that defines the model property.
 >
> The getModel implemenation uses the action static parameter to
> determine which model is being requested.

Interesting idea.

But does ModelDriven provide any benefit for this?  Couldn't you do the 
same thing in a normal action getter (that returned an interface your 
various model flavors coded to)?  And in that getter (instead of in 
getModel) you'd do your switching logic?

I'm still not seeing any advantage to ModelDriven (although I find that 
particular take on providing a model pretty cool).

- Gary


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


Mime
View raw message