ModelDriven question

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

ModelDriven question



I am new to Struts2 and I have to work on a website which is implemented with Struts2.
I have read that in Struts2 an object can be saved through a form and the Action should implement ModelDriven interface with the method getModel().

But I have 2 questions:
1. What should i do when my action deals with more forms and every form shows another POJO object?
The ModelDriven interface should be parametrized (e.g. ModelDriven<User>). How should I deal with more POJO objects?

2. How can I change an object already on the ValueStack?

Thank you