Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to access the property of action in case of ModelDriven

 
vijay saraf
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks David,

I was expecting this, what answer you have given.
Its bad Idea....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic