With model-driven, we don't need to prefix the property references
with "model." or "user.". We can also do things like mix and match
properties from the model and the Action, without adding extra
references. For example, a model object might have a password
property, but it won't have a passwordConfirmation property. With
model driven, we can add the passwordConfirmation property to our
Action class, but not have to refer to it differently in the server
page.

-- HTH, Ted.
* http://www.husted.com/struts/


On 11/8/06, frankiestd168 <[EMAIL PROTECTED]> wrote:

this is a question for Struts2 interceptors..

I saw some examples, the action class implements ModelDriven,
<interceptor-ref name="model-driven"/>

So this function is added in action class:

public Object getModel() {
       return user;
}

Then jsp can directly access the properties of the User object.

Beside this, what is the benefit of using this interceptor ?
Is that only for jsp purpose?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to