You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by jo...@apache.org on 2023/01/28 16:24:13 UTC

[sling-site] branch master updated: clarify that @ScriptVariable only works when adapting from a request

This is an automated email from the ASF dual-hosted git repository.

joerghoh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-site.git


The following commit(s) were added to refs/heads/master by this push:
     new 6f250fa35 clarify that @ScriptVariable only works when adapting from a request
6f250fa35 is described below

commit 6f250fa35cd9844d47a7f8948958044d384ed9c0
Author: Joerg Hoh <jo...@apache.org>
AuthorDate: Sat Jan 28 17:24:04 2023 +0100

    clarify that @ScriptVariable only works when adapting from a request
---
 src/main/jbake/content/documentation/bundles/models.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/jbake/content/documentation/bundles/models.md b/src/main/jbake/content/documentation/bundles/models.md
index 0c0e4bd93..073718b8b 100644
--- a/src/main/jbake/content/documentation/bundles/models.md
+++ b/src/main/jbake/content/documentation/bundles/models.md
@@ -163,7 +163,7 @@ In the above cases just the `@ValueMapValue` annotation was used, but there othe
 
 Title | Injector Name  | Annotation          | Supported Optional Elements    | Description   | Applicable to (including  using `@Via`) | Array Support   | Parametrized Type Support
 ----- | -----------------   | ------------------------------ |------------------------- | --------------- | ---------------------------
-Scripting Bindings|`script-bindings` | `@ScriptVariable`   | `injectionStrategy` and `name`          | Injects the script variable defined via [Sling Bindings](https://cwiki.apache.org/confluence/display/SLING/Scripting+variables). If `name` is not set the name is derived from the method/field name.  | A ServletRequest object which has the `Sling Bindings` attribute defined | no conversion is done |  If a parameterized type is passed, the bindings value must be of a compatible type of th [...]
+Scripting Bindings|`script-bindings` | `@ScriptVariable`   | `injectionStrategy` and `name`          | Injects the script variable defined via [Sling Bindings](https://cwiki.apache.org/confluence/display/SLING/Scripting+variables). It requires the the adaptable is a `SlingHttpServletRequest`. If `name` is not set the name is derived from the method/field name.  | A ServletRequest object which has the `Sling Bindings` attribute defined | no conversion is done |  If a parameterized type is [...]
 ValueMap | `valuemap` | `@ValueMapValue`    | `injectionStrategy`, `name`   | Injects a `ValueMap` value taken from the adapted resource (either taking from the adapted resource or the resource of the adapted SlingHttpServletRequest). If `name` is not set the name is derived from the method/field name. |Any object which is or can be adapted to a `ValueMap` |  Primitive arrays wrapped/unwrapped as necessary. Wrapper object arrays are unwrapped/wrapped as necessary. | Parameterized `List`  [...]
 Child Resource | `child-resources` | `@ChildResource`    | `injectionStrategy`, `name`   | Injects a child resource by name (taken from the adapted resource (either taking from the adapted resource or the resource of the adapted SlingHttpServletRequest). If `name` is not set the name is derived from the method/field name. | `Resource` objects  |  none  | if a parameterized type `List` or `Collection` is passed, a `List<Resource>` is returned (the contents of which may be adapted to the t [...]
 Request Attribute | `request-attributes` | `@RequestAttribute` | `injectionStrategy`, `name`    | Injects a request attribute by name, it requires the the adaptable is a `SlingHttpServletRequest` . If `name` is not set the name is derived from the method/field name. | `ServletRequest` objects | no conversion is done | If a parameterized type is passed, the request attribute must be of a compatible type of the parameterized type.