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:edu.byu.softwareDistribution.web.controller.ListingController.java

@RequestMapping("/fileSets")
public @ModelAttribute("fileSets") List<FileSet> fileSets(Model model) {
    model.addAttribute("signedInName", IdentityDetails.getCurrentIdentityDetails().getName());
    return fileSetDao.findAll();
}

From source file:edu.byu.softwareDistribution.web.controller.ListingController.java

@RequestMapping("/commonText")
public @ModelAttribute("commonText") List<CommonText> commonText(Model model) {
    model.addAttribute("signedInName", IdentityDetails.getCurrentIdentityDetails().getName());
    return commonTextDao.findAll();
}

From source file:edu.byu.softwareDistribution.web.controller.ListingController.java

@RequestMapping("/groups")
public @ModelAttribute("softwareGroups") List<SoftwareGroup> softwareGroups(Model model) {
    model.addAttribute("signedInName", IdentityDetails.getCurrentIdentityDetails().getName());
    return softwareGroupDao.findAll();
}

From source file:edu.byu.softwareDistribution.web.controller.ListingController.java

@RequestMapping("/licenses")
public @ModelAttribute("licenses") List<LicenseSet> licenseSets(Model model) {
    model.addAttribute("signedInName", IdentityDetails.getCurrentIdentityDetails().getName());
    return licenseSetDao.findAll();
}

From source file:edu.byu.softwareDistribution.web.controller.ListingController.java

@RequestMapping("/messages")
public @ModelAttribute("messages") List<Message> messages(Model model) {
    model.addAttribute("signedInName", IdentityDetails.getCurrentIdentityDetails().getName());
    return messageDao.findAll();
}

From source file:org.wallride.web.controller.admin.category.CategoryIndexController.java

@RequestMapping(params = "part=category-create-form")
public String partCategoryCreateForm(@PathVariable String language,
        @RequestParam(required = false) Long parentId, Model model) {
    model.addAttribute("parentId", parentId);
    model.addAttribute("categoryNodes", categoryUtils.getNodes(true));
    return "category/index::category-create-form";
}

From source file:ru.trett.cis.controllers.CostCenterController.java

@RequestMapping(value = "/list")
public String list(Model model) {
    model.addAttribute("object", "CostCenter");
    return "costcenter/table";
}

From source file:ru.trett.cis.controllers.CostCenterController.java

@RequestMapping
public String showForm(Model model) {
    model.addAttribute("costCenter", new CostCenter());
    return "costcenter/form";
}

From source file:ru.trett.cis.controllers.InvoiceController.java

@RequestMapping(value = "/list")
public String list(Model model) {
    model.addAttribute("object", "Invoice");
    return "invoice/table";
}

From source file:com.qubit.solution.fenixedu.bennu.webservices.ui.management.keystores.UploadCertificateController.java

@RequestMapping(value = "/{oid}")
public String uploadcertificate(@PathVariable("oid") DomainKeyStore domainKeyStore, Model model) {

    model.addAttribute("domainKeyStore", domainKeyStore);
    return "webservices/management/keystores/uploadcertificate";
}