I was wondering if it would make sense to implement this feature since in my
case that would have saved some time.

I tried the following:

SlingServlet set as follows:

@SlingServlet(
            resourceTypes = "myproject/components/structure/page",
            selectors = "form",
            extensions = "html",
            methods = "GET")

when getting the SlingHttpServletRequest in the doGet() method I can obtain
the resource by just calling request.getResource(), although that resource
is not something that Sling can recognise to apply the right configuration,
in fact this:

                MyConfigurations config =
request.getResource().adaptTo(ConfigurationBuilder.class).as(MyConfigurations.class);

returns a null value.


I tried this in AEM 6.3 with the following bundles installed
Apache Sling Context-Aware Configuration APIorg.apache.sling.caconfig.api
1.1.0   
Apache Sling Context-Aware Configuration
Implementationorg.apache.sling.caconfig.impl    1.2.0   
Apache Sling Context-Aware Configuration SPIorg.apache.sling.caconfig.spi
1.2.0

Any feedback, thoughts would be greatly appreciated,
Jose.



--
Sent from: http://apache-sling.73963.n3.nabble.com/Sling-Users-f73968.html

Reply via email to