struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Lentz <Eric.Le...@sherwin.com>
Subject Re: Field Name Collision?
Date Wed, 27 Apr 2011 14:19:48 GMT
> I don't use ModelDriven myself, but as I understand it, it places the 
Model
> Object at the top of the Value Stack, which would make userid be a 
reference
> to an attribute in the Model Object, not in the Action.  When you use
> user.userid, it's because it's trying to find the user attribute in the
> Model Object (on the top of the Value Stack), which fails so it goes a 
step
> down the stack to the Action, where it finds a user attribute to use.
> 
> So, it appears Struts is functioning exactly as designed.
>   (*Chris*)

Thanks for the explanation.

Are these correct statements about how Struts and ModelDriven works?

- Struts instantiates the User object (in my case) by default.
- ModelDriven places the object I choose at the top of the stack.
- Because my object is at the top of the stack, it gets selected instead 
of the object that Struts creates by default.


- Eric
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message