Example usage for org.springframework.ui ModelMap addAttribute

List of usage examples for org.springframework.ui ModelMap addAttribute

Introduction

In this page you can find the example usage for org.springframework.ui ModelMap addAttribute.

Prototype

public ModelMap addAttribute(String attributeName, @Nullable Object attributeValue) 

Source Link

Document

Add the supplied attribute under the supplied name.

Usage

From source file:net.groupbuy.controller.admin.AdPositionController.java

/**
 * /*  www . java2 s . c o m*/
 */
@RequestMapping(value = "/list", method = RequestMethod.GET)
public String list(Pageable pageable, ModelMap model) {
    model.addAttribute("page", adPositionService.findPage(pageable));
    return "/admin/ad_position/list";
}

From source file:net.groupbuy.controller.admin.DeliveryCorpController.java

/**
 * /* www.  ja  v a 2s.  c o  m*/
 */
@RequestMapping(value = "/edit", method = RequestMethod.GET)
public String edit(Long id, ModelMap model) {
    model.addAttribute("deliveryCorp", deliveryCorpService.find(id));
    return "/admin/delivery_corp/edit";
}

From source file:net.groupbuy.controller.admin.DeliveryCorpController.java

/**
 * //from ww w  . j  ava 2  s . com
 */
@RequestMapping(value = "/list", method = RequestMethod.GET)
public String list(Pageable pageable, ModelMap model) {
    model.addAttribute("page", deliveryCorpService.findPage(pageable));
    return "/admin/delivery_corp/list";
}

From source file:org.openmrs.module.openhmis.inventory.web.controller.CategoriesController.java

@RequestMapping(method = RequestMethod.GET)
public void render(ModelMap model) throws JsonGenerationException, JsonMappingException, IOException {
    model.addAttribute("modelBase", "openhmis.inventory.category");
}

From source file:org.openmrs.module.openhmis.inventory.web.controller.StockroomsController.java

@RequestMapping(method = RequestMethod.GET)
public void render(ModelMap model) throws JsonGenerationException, JsonMappingException, IOException {
    model.addAttribute("modelBase", "openhmis.inventory.stockroom");
}

From source file:org.perconsys.controllers.AuthController.java

@RequestMapping({ "/users" })
public String test_userList(ModelMap model) {
    model.addAttribute("users", dao.list(0L, 10L));
    return "auth/test-userlist";
}

From source file:edu.ijse.tcd.controller.LogInController.java

@RequestMapping(value = "login", method = RequestMethod.GET)
public String loadLogIn(ModelMap map) {
    User user = new User();

    map.addAttribute("userMap", user);

    return "login";
}

From source file:org.openmrs.module.openhmis.inventory.web.controller.DepartmentsController.java

@RequestMapping(method = RequestMethod.GET)
public void departments(ModelMap model) throws JsonGenerationException, JsonMappingException, IOException {
    model.addAttribute("modelBase", "openhmis.inventory.department");
}

From source file:org.openmrs.module.openhmis.inventory.web.controller.ItemsController.java

@RequestMapping(method = RequestMethod.GET)
public void items(ModelMap model) throws JsonGenerationException, JsonMappingException, IOException {
    model.addAttribute("modelBase", "openhmis.inventory.item");
}

From source file:org.utb.project.controllers.UsuariosController.java

@RequestMapping(path = "/usuarios/listado", method = RequestMethod.GET)
public String listado(ModelMap model) {
    List<Usuario> usuarios = usuarioDao.listar();
    model.addAttribute("usuarios", usuarios);
    return "usuarios/listado";
}