[jira] [Updated] (SLING-6354) Make exporter servlet script-bindings aware
[ https://issues.apache.org/jira/browse/SLING-6354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Justin Edelson updated SLING-6354: -- Issue Type: Bug (was: Improvement) > Make exporter servlet script-bindings aware > --- > > Key: SLING-6354 > URL: https://issues.apache.org/jira/browse/SLING-6354 > Project: Sling > Issue Type: Bug > Components: Extensions >Affects Versions: Sling Models Impl 1.3.4 >Reporter: Burkhard Pauli >Assignee: Justin Edelson > Fix For: Sling Models Impl 1.3.6 > > > The current exporter servlet [0] doesn't expose scripting variables. > If a field for the related Sling Model should be injected via the > ScriptVariable annotation [1] and the field is not optional, the model can't > be initialized and the request to exporter servlet fails. > Example: > {code} > @Model(adaptables = SlingHttpServletRequest.class, adapters = > TestModel.class, resourceType = "core/components/test") > @Exporter(name = "jackson", extensions = "json") > public class TestModel { > @ScriptVariable > private Page currentPage; > public String getName() { > return currentPage.getName(); > } > } > {code} > [0] > https://github.com/apache/sling/blob/trunk/bundles/extensions/models/impl/src/main/java/org/apache/sling/models/impl/ExportServlet.java > [1] > https://github.com/apache/sling/blob/trunk/bundles/extensions/models/api/src/main/java/org/apache/sling/models/annotations/injectorspecific/ScriptVariable.java -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (SLING-6354) Make exporter servlet script-bindings aware
[ https://issues.apache.org/jira/browse/SLING-6354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Justin Edelson updated SLING-6354: -- Fix Version/s: Sling Models Impl 1.3.6 > Make exporter servlet script-bindings aware > --- > > Key: SLING-6354 > URL: https://issues.apache.org/jira/browse/SLING-6354 > Project: Sling > Issue Type: Improvement > Components: Extensions >Affects Versions: Sling Models Impl 1.3.4 >Reporter: Burkhard Pauli >Assignee: Justin Edelson > Fix For: Sling Models Impl 1.3.6 > > > The current exporter servlet [0] doesn't expose scripting variables. > If a field for the related Sling Model should be injected via the > ScriptVariable annotation [1] and the field is not optional, the model can't > be initialized and the request to exporter servlet fails. > Example: > {code} > @Model(adaptables = SlingHttpServletRequest.class, adapters = > TestModel.class, resourceType = "core/components/test") > @Exporter(name = "jackson", extensions = "json") > public class TestModel { > @ScriptVariable > private Page currentPage; > public String getName() { > return currentPage.getName(); > } > } > {code} > [0] > https://github.com/apache/sling/blob/trunk/bundles/extensions/models/impl/src/main/java/org/apache/sling/models/impl/ExportServlet.java > [1] > https://github.com/apache/sling/blob/trunk/bundles/extensions/models/api/src/main/java/org/apache/sling/models/annotations/injectorspecific/ScriptVariable.java -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (SLING-6354) Make exporter servlet script-bindings aware
[ https://issues.apache.org/jira/browse/SLING-6354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Burkhard Pauli updated SLING-6354: -- Summary: Make exporter servlet script-bindings aware (was: Make exporter servlet scripting aware) > Make exporter servlet script-bindings aware > --- > > Key: SLING-6354 > URL: https://issues.apache.org/jira/browse/SLING-6354 > Project: Sling > Issue Type: Improvement > Components: Extensions >Affects Versions: Sling Models Impl 1.3.4 >Reporter: Burkhard Pauli > > The current exporter servlet [0] doesn't expose scripting variables. > If a field for the related Sling Model should be injected via the > ScriptVariable annotation [1] and the field is not optional, the model can't > be initialized and the request to exporter servlet fails. > Example: > {code} > @Model(adaptables = SlingHttpServletRequest.class, adapters = > TestModel.class, resourceType = "core/components/test") > @Exporter(name = "jackson", extensions = "json") > public class TestModel { > @ScriptVariable > private Page currentPage; > public String getName() { > return currentPage.getName(); > } > } > {code} > [0] > https://github.com/apache/sling/blob/trunk/bundles/extensions/models/impl/src/main/java/org/apache/sling/models/impl/ExportServlet.java > [1] > https://github.com/apache/sling/blob/trunk/bundles/extensions/models/api/src/main/java/org/apache/sling/models/annotations/injectorspecific/ScriptVariable.java -- This message was sent by Atlassian JIRA (v6.3.4#6332)