wood burning stoves 2.0*
The moose likes Struts and the fly likes How to access the property of action in case of ModelDriven Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to access the property of action in case of ModelDriven" Watch "How to access the property of action in case of ModelDriven" New topic
Author

How to access the property of action in case of ModelDriven

vijay saraf
Ranch Hand

Joined: Jan 08, 2005
Posts: 141
Hello All,

i am having a Action implementing ModelDriven,but Action itself is having the same property as present in Model
[for example Action and Model both are having property 'name']
I want to capture and display the property of Action along with Model.
How can i do that.

Action

Model

Input JSP


What should i write in the place of ??? to access the 'name' property of Action.


Thanks
Vijay Saraf.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

If I remember correctly (which I may not), #action allows you to access action properties directly.

Quite frankly, I think this is a bad idea--either use ModelDriven, or use action properties--don't mix the two modes of operation. You can just expose the model as an action property and avoid this problem altogether.
vijay saraf
Ranch Hand

Joined: Jan 08, 2005
Posts: 141
Thanks David,

I was expecting this, what answer you have given.
Its bad Idea....
 
GeeCON Prague 2014
 
subject: How to access the property of action in case of ModelDriven