Browse files

Reorganized imports.

  • Loading branch information...
1 parent d98e48d commit cb845cf98bcd94b69a218076477dfb582d49374d @cgorshing committed Dec 27, 2010
Showing with 5 additions and 8 deletions.
  1. +5 −8 src/main/java/springapp/web/PlayingController.java
View
13 src/main/java/springapp/web/PlayingController.java
@@ -1,14 +1,12 @@
package springapp.web;
-import org.hsqldb.rights.User;
import org.joda.time.DateTime;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
import springapp.domain.Person;
@@ -18,15 +16,15 @@
@Controller
public class PlayingController {
-// @RequestMapping(value="/owners/*/pets/{petId}/visits")
- @RequestMapping(value="/p.htm", method= RequestMethod.GET)
- public Map indexHandlerForGet(@ModelAttribute(value="person") Person dude, ModelMap modelMap) {
+ //@RequestMapping(value="/owners/*/pets/{petId}/visits")
+ @RequestMapping(value = "/p.htm", method = RequestMethod.GET)
+ public Map indexHandlerForGet(@ModelAttribute(value = "person") Person dude, ModelMap modelMap) {
Map<String, Object> model = new HashMap<String, Object>();
model.put("person", dude);
return model;
}
- @RequestMapping(value="/p.htm", method=RequestMethod.POST)
+ @RequestMapping(value = "/p.htm", method = RequestMethod.POST)
public ModelAndView indexHandlerForPost(@ModelAttribute(value = "person") Person duder, BindingResult bindingResult) {
Map<String, Object> model = new HashMap<String, Object>();
@@ -54,8 +52,7 @@ public Person foodoo(Integer id) {
person.setName("sue");
person.setAge(22);
person.setBirthday(new DateTime());
- }
- else {
+ } else {
person.setName("no name");
person.setAge(0);
person.setBirthday(new DateTime().minusYears(2000));

0 comments on commit cb845cf

Please sign in to comment.