[magnolia-dev] [JIRA] (BLOSSOM-232) Annotations for declaring template parameters
Title: Message Title Tobias Mattsson updated an issue Magnolia Blossom Module / BLOSSOM-232 Annotations for declaring template parameters Change By: Tobias Mattsson Fix Version/s: 3.1.3 Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, E-mail to:
[magnolia-dev] [JIRA] (BLOSSOM-232) Annotations for declaring template parameters
Title: Message Title Tobias Mattsson updated an issue Magnolia Blossom Module / BLOSSOM-232 Annotations for declaring template parameters Change By: Tobias Mattsson Right now template parameters can be set using a post create callback. For completeness it would be nice if these could be declared using annotations along with other template settings. Since parameters are defined on the RenderableDefinition interface this annotation should be usable on @Area too.The annotation is a candidate for a repeatable annotation as introduced in Java 8. Magnolia is currently on Java 7 so the annotation should be designed so that it can be used as a repeatable annotation once Magnolia goes to Java 8.https://docs.oracle.com/javase/tutorial/java/annotations/repeating.html In a class hierarchy the annotations should be evaluated from top to bottom (superclass first) so that a subclass can override parameters in its superclass. The post create callback style that's necessary now:{code:java}@PreRegisterpublic void preRegister(ConfiguredTemplateDefinition definition) {Mapparams = new HashMap<>();params.put("name", "value");definition.setParameters(params);}{code} Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, E-mail to:
[magnolia-dev] [JIRA] (BLOSSOM-232) Annotations for declaring template parameters
Title: Message Title Tobias Mattsson updated an issue Magnolia Blossom Module / BLOSSOM-232 Annotations for declaring template parameters Change By: Tobias Mattsson Right now template parameters can be set using a post create callback. For completeness it would be nice if these could be declared using annotations along with other template settings. Since parameters are defined on the RenderableDefinition interface this annotation should be usable on @Area too.The annotation is a candidate for a repeatable annotation as introduced in Java 8. Magnolia is currently on Java 7 so the annotation should be designed so that it can be used as a repeatable annotation once Magnolia goes to Java 8.https://docs.oracle.com/javase/tutorial/java/annotations/repeating.htmlThe post create callback style that's necessary now:{code:java}@PreRegisterpublic void preRegister(ConfiguredTemplateDefinition definition) {Mapparams = new HashMap<>();params.put("name", "value");definition.setParameters(params);}{code} Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, E-mail to:
[magnolia-dev] [JIRA] (BLOSSOM-232) Annotations for declaring template parameters
Title: Message Title Tobias Mattsson updated an issue Magnolia Blossom Module / BLOSSOM-232 Annotations for declaring template parameters Change By: Tobias Mattsson Right now template parameters can be set using a post create callback. For completeness it would be nice if these could be declared using annotations along with other template settings. Since parameters are defined on the RenderableDefinition interface this annotation should be usable on @Area too. The post create callback style that's necessary now:{code:java}@PreRegisterpublic void preRegister(ConfiguredTemplateDefinition definition) {Mapparams = new HashMap<>();params.put("name", "value");definition.setParameters(params);}{code} Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, E-mail to:
[magnolia-dev] [JIRA] (BLOSSOM-232) Annotations for declaring template parameters
Title: Message Title Tobias Mattsson created an issue Magnolia Blossom Module / BLOSSOM-232 Annotations for declaring template parameters Issue Type: Improvement Assignee: Tobias Mattsson Created: 15/Apr/16 3:22 PM Priority: Neutral Reporter: Tobias Mattsson Right now template parameters can be set using a post create callback. For completeness it would be nice if these could be declared using annotations along with other template settings. The post create callback style that's necessary now: @PreRegister public void preRegister(ConfiguredTemplateDefinition definition) { Mapparams = new HashMap<>(); params.put("name", "value"); definition.setParameters(params); } Add Comment