Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Do I have a seperate springMVC controllor for every action?

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

I'm trying to model my web app I�m creating and I can't figure out how to map the controllers to the model.

Ok so if I have a OrderManager class that can "process and order", "edit the quantity of the order", or "cancel an order"

Do I create 3 controller classes that launch the three different methods?

or do I create one controller that somehow decides which task I want it to do, which then launches the specific object.method()??


Any help would be appreciated.
 
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Glenn,

Consider using MultiActionController. Its much like Aggregate Actions in Struts which means a set of related actions as a single action class.

Refer to Spring documentation for the spring related syntax.

Regards,
P R A V E E N
 
You don't like waffles? Well, do you like this tiny ad?
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!