The params interceptor which sets the action properties uses the
valuestack to set the properties.

Since you have the md interceptor, your action and the model will be on
the stack.

Therefore, when stack.setValue(name, value) gets called, the objects in
the stack are checked from top down to find a property of that name.
Therefore since source doesn't exist on your model, the action property
will be used.

Cameron

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Drew McAuliffe
> Sent: Tuesday, 7 October 2003 11:03 AM
> To: [EMAIL PROTECTED]
> Subject: [OS-webwork] Question about model-driven actions
> 
> 
> If I have a model driven action (the action uses the md 
> interceptor and implements the interface), are my other 
> action properties still available for setting using the 
> parameters interceptor?
> 
> For example, I have an action like this:
> 
> public class MyAction extends MyBaseAction implements ModelDriven {
>       ...
>       public Object getModel(){return this.model;}
>       public String getSource(){return this.source;}
>       public void setSource(String newValue){this.source = 
> newValue;} }
> 
> My model object has the following properties:
> firstName
> lastName
> 
> My HTML form that posts to this action has controls with the following
> names:
> firstName
> lastName
> source
> 
> If I wasn't using ModelDriven, I'd need to replace the first 
> two control names with: model.firstName model.lastName
> 
> But if I do use ModelDriven, is my "source" property still 
> going to get set by the parameters interceptor? Or will it 
> detect that my model object doesn't have a "source" property, 
> and just drop that value?
> 
> Thanks,
> 
> Drew
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf 
> _______________________________________________
> Opensymphony-webwork mailing list 
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> 
> 




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to