Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- * Used on a Spring Web MVC controller to expose it as a template. A template is either used to render a page or a
- * component.
- * <p/>
- * The title of the template is set with this annotation while the description is set using
- * {@link info.magnolia.module.blossom.annotation.TemplateDescription}.
- * <p/>
- * A component is added to a page using a dialog. A controller that uses this annotation automatically becomes a factory
- * for its dialog. This dialog is automatically assigned an id and you do not need to add the
- * {@link info.magnolia.module.blossom.annotation.DialogFactory} annotation. The functionality for creating the dialog
- * is identical to the functionality of classes that use {@link info.magnolia.module.blossom.annotation.DialogFactory}.
- * More specifically you can use {@link TabFactory}, {@link TabValidator}, {@link DialogValidator} and {@link TabOrder}.
- * <p/>
- * If you prefer using a dialog created by a {@link DialogFactory} or one configured in Magnolia you can override this
- * behaviour by setting the 'dialog' field.
- * <p/>
- * The class will also be scanned for methods annotated with {@link DialogFactory}. This makes it possible to declare
- * dialogs in the same template that they're used for.
- * <p/>
- * It is possible to restrict on which pages a template can be used by using the
- * {@link info.magnolia.module.blossom.annotation.Available} annotation.
- * <p/>
- * You can use {@link info.magnolia.module.blossom.annotation.I18nBasename} to specify which resource bundle should be
- * used for localization of the template's title and description.
- * <p/>
- * For example this template will be exposed with the id "mainTemplate":
- * <pre>
- * @Controller
- * @Template(title = "Main", id = "moduleName:pages/main")
- * public class MainTemplate {
- * @RequestMapping("/mainTemplate")
- * public String render() {
- * return "mainTemplate.jsp";
- * }
- * @TabFactory("Content")
- * public void contentTab(TabBuilder tab) {
- * tab.addFckEditor("body", "Text", "Text");
- * tab.addFile("image", "Image", "Image");
- * }
- * }
- * </pre>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement