Rev 22162 | Rev 22193 | Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.spice.profitmandi.web.controller;import javax.servlet.http.HttpServletRequest;import org.slf4j.Logger;import org.slf4j.LoggerFactory;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Controller;import org.springframework.ui.Model;import org.springframework.web.bind.annotation.PathVariable;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.bind.annotation.RequestMethod;import com.spice.profitmandi.dao.repository.dtr.Mongo;@Controllerpublic class FofoController {private static final Logger LOGGER = LoggerFactory.getLogger(FofoController.class);@AutowiredMongo mongoClient;@RequestMapping(value = "/fofo", method = RequestMethod.GET)public String getAll(HttpServletRequest request, Model model) throws Exception{model.addAttribute("fofoForms", mongoClient.getFofoForms(0, 50));return "fofo-index";}@RequestMapping(value = "/fofo/{fofoId}/edit", method = RequestMethod.GET)public String editFofoForm(HttpServletRequest request, @PathVariable(name = "fofoId") int fofoId, Model model) throws Exception{model.addAttribute("fofoForm", mongoClient.getFofoForm(fofoId));return "fofo-form";}}