Example usage for org.springframework.ui Model addAttribute

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

Introduction

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

Prototype

Model addAttribute(String attributeName, @Nullable Object attributeValue);

Source Link

Document

Add the supplied attribute under the supplied name.

Usage

From source file:by.velcome.PortletViewController.java

@RenderMapping
public String question(Model model) {
    model.addAttribute("releaseInfo", ReleaseInfo.getReleaseInfo());

    return "velcom_salons/view";
}

From source file:com.alliander.osgp.webdevicesimulator.web.controller.LogsController.java

@RequestMapping(method = RequestMethod.GET)
public String showLogs(final Model model) {
    model.addAttribute("logs", this.repository.findAllOrderByModificationTimeDesc());
    return "logs/list";
}

From source file:com.ruslan.controller.BaseController.java

@RequestMapping(value = "/test", method = RequestMethod.GET)
public String test(Model model) {
    model.addAttribute("user", user);
    return "test";
}

From source file:com.vgorcinschi.concordiafootballmanager.web.TrainerController.java

@RequestMapping(value = "/{trainerId:\\d+}", method = RequestMethod.GET)
public String getOneTrainer(@PathVariable long trainerId, Model model) {
    model.addAttribute("trainer", trainerService.getTrainer(trainerId));
    return "trainerPage";
}

From source file:custom.CustomController.java

@RenderMapping
public String question(Model model) {
    model.addAttribute("releaseInfo", ReleaseInfo.getReleaseInfo());

    return "custom/view";
}

From source file:defaults.test.PortletViewController.java

@RenderMapping
public String question(Model model) {
    model.addAttribute("releaseInfo", ReleaseInfo.getReleaseInfo());

    return "defaults/view";
}

From source file:fi.some.organisation.PortletViewController.java

@RenderMapping
public String question(Model model) {
    model.addAttribute("releaseInfo", ReleaseInfo.getReleaseInfo());

    return "simple5/view";
}

From source file:me.kipchakbaev.liferay.PortletViewController.java

@RenderMapping
public String question(Model model) {
    model.addAttribute("releaseInfo", ReleaseInfo.getReleaseInfo());

    return "pure-spring-mvc-portlet/view";
}

From source file:no.dusken.annonseweb.WelcomeController.java

@RequestMapping("welcome")
public String viewWelcome(Model model) {
    model.addAttribute("loggedIn", annonsePersonController.getLoggedInUser());
    return "/welcome";
}

From source file:nu.yona.server.admin.WhiteListedNumberController.java

@RequestMapping(value = "/", method = RequestMethod.GET)
public String getIndexPage(Model model) {
    model.addAttribute("whiteListedNumbers", whiteListedNumberService.getAllWhiteListedNumbers());

    return "white-listed-numbers";
}