|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME) @Target(value=TYPE) public @interface Template
Used on a Spring Web MVC controller to expose it as a template. A template in Magnolia is identified using a unique name. It is optional to specify the name explicitly using this annotation. By default the name will be generated using the path to which the controller is mapped to with all slashes removed.
The class will be scanned for methods annotated withDialogFactory
. This makes it possible to declare dialogs
in the same template that they're used for.
It is possible to restrict on which pages a template can be used by using the
Available
annotation.
You can use I18nBasename
to specify which resource bundle should be
used for localization of the templates title and description.
For example this template will be exposed with the name "mainTemplate":
@Controller @Template("Main") public class MainTemplate { @RequestMapping("/mainTemplate") public String render() { return "mainTemplate.jsp"; } }
Available
,
I18nBasename
,
DialogFactory
Required Element Summary | |
---|---|
String |
value
Title of the template. |
Optional Element Summary | |
---|---|
String |
description
Description of the template. |
String |
name
Name of the template, defaults to the handlerPath of the handler with all slashes removed. |
boolean |
visible
Defines the visibility of the template. |
Element Detail |
---|
public abstract String value
public abstract String description
public abstract String name
public abstract boolean visible
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |