You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
842 B
25 lines
842 B
package web.controller;
|
|
|
|
import db.AbstractModel;
|
|
import db.DBAction;
|
|
import db.model.MenuModel;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.ui.Model;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
@Controller
|
|
@RequestMapping("/menu")
|
|
public class MenuController extends BaseController<MenuModel> {
|
|
|
|
@RequestMapping
|
|
public <T extends AbstractModel> String find(Model model, MenuModel queryCommand, @RequestParam Integer firstResult, @RequestParam Integer maxResults){
|
|
model.addAttribute("menus", super.find(DBAction.R, queryCommand, firstResult, maxResults).toString());
|
|
return "menu";
|
|
}
|
|
|
|
@Override
|
|
public boolean checkAction(DBAction action) {
|
|
return DBAction.R.equals(action);
|
|
}
|
|
}
|
|
|