struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Wilmoth <jonwilm...@yahoo.com>
Subject Re: ModelDriven vs OGNL assignment?
Date Fri, 02 Nov 2007 18:01:03 GMT
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.


----- Original Message ----
From: Dave Newton <newton.dave@yahoo.com>
To: Struts Users Mailing List <user@struts.apache.org>
Sent: Friday, November 2, 2007 9:33:03 AM
Subject: Re: ModelDriven vs OGNL assignment?

--- Gary Affonso <glists2@greywether.com> wrote:
> And that does it.  Direct model injection.  Easy.

Technically, no, it's indirected by one level.

*All* ModelDriven does is push the model on to the
stack so it's available at the top level. AFAIK
there's no compelling reason to do that other than
saving some very minor typing (and, perhaps, clarity?)
on the display side.

OTOH, ScopedModelDriven does a bit more automagically.

d.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message