Skip to content
Mario Arias edited this page Feb 22, 2016 · 13 revisions

Description

This module add map-like support for Model and ModelMap

So you could write this code:

@RequestMapping("/clients")
public String listClients(Model model){
	model.addAttribute("clients", clientService.findAllClients());
	return "clients";
}

In this way:

import org.kotlinprimavera.ui.*

@RequestMapping(array("/clients"))
public fun listClients(model: Model): String{
	model["clients"] = clientService.findAllClients()
	return "clients"
}

Maven

To use this module in your project

<dependency>
    <groupId>org.kotlinprimavera</groupId>
    <artifactId>context</artifactId>
    <version>0.5</version>
</dependency>
Clone this wiki locally