kwin commented on code in PR #106:
URL: https://github.com/apache/sling-site/pull/106#discussion_r1060513127


##########
src/main/jbake/content/documentation/bundles/models.md:
##########
@@ -85,6 +85,14 @@ Because the name of a constructor argument parameter cannot 
be detected via the
 
 Constructors may use any visibility modifier (as of [Sling Models 
1.5.0](https://issues.apache.org/jira/browse/SLING-8069)).
 
+## @Model and adaptable types
+
+While technically it is possible to provide any class implementing the 
`Adaptable` interface as the `adaptable` parameter to the `@Model` annotation, 
the Sling Model Framework and the default injectors is mostly built under the 
assumption that the adaption is done from a Sling Resource. Some injectors also 
support adaption from a `SlingHttpServletRequest` object, but normally this is 
then converted into a adaption of the resource of the request.

Review Comment:
   The recommendation is fine but please mention that this comes with 
limitations. Some injectors just require a request…



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to