org.bbqjs.spring.mvc
Class PageController

java.lang.Object
  extended by org.bbqjs.spring.mvc.PageController

@Controller
public class PageController
extends Object

This is a boiler plate Controller which allows you to set a view name and values to pass to the model. Using this means you don't have to declare such a dull class in your own code base.


Constructor Summary
PageController()
           
 
Method Summary
 Map<String,Object> getModel()
          Returns a map of key/value pairs that will be added to the page's model.
 String getView()
          Returns the name of the view class this controller will use.
 org.springframework.web.servlet.ModelAndView handleGetRequest()
          Controller method
 org.springframework.web.servlet.ModelAndView handlePostRequest()
          Controller method
 void setModel(Map<String,Object> model)
          Sets a map of key/value pairs that will be added to the page's model.
 void setView(String view)
          Sets the name of the view class this controller will use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageController

public PageController()
Method Detail

handlePostRequest

@RequestMapping(method=POST)
public org.springframework.web.servlet.ModelAndView handlePostRequest()
                                                               throws Exception
Controller method

Returns:
Throws:
Exception

handleGetRequest

@RequestMapping(method=GET)
public org.springframework.web.servlet.ModelAndView handleGetRequest()
                                                              throws Exception
Controller method

Returns:
Throws:
Exception

getView

public String getView()
Returns the name of the view class this controller will use.

Returns:

setView

public void setView(String view)
Sets the name of the view class this controller will use.

Parameters:
view -

getModel

public Map<String,Object> getModel()
Returns a map of key/value pairs that will be added to the page's model.

Returns:

setModel

public void setModel(Map<String,Object> model)
Sets a map of key/value pairs that will be added to the page's model.

Parameters:
model -


Copyright © 2012. All Rights Reserved.