A supporting tab library for Apache Sling
1.4
sling
http://sling.apache.org/taglibs/sling
adaptTo
org.apache.sling.scripting.jsp.taglib.SlingFunctions
java.lang.Object adaptTo(org.apache.sling.api.adapter.Adaptable, java.lang.String)
encode
org.apache.sling.scripting.jsp.taglib.SlingFunctions
java.lang.String encode(java.lang.String, java.lang.String)
findResources
org.apache.sling.scripting.jsp.taglib.SlingFunctions
java.util.Iterator findResources(org.apache.sling.api.resource.ResourceResolver, java.lang.String, java.lang.String)
getRelativeResource
org.apache.sling.scripting.jsp.taglib.SlingFunctions
org.apache.sling.api.resource.Resource getRelativeResource(org.apache.sling.api.resource.Resource,java.lang.String)
getResource
org.apache.sling.scripting.jsp.taglib.SlingFunctions
org.apache.sling.api.resource.Resource getResource(org.apache.sling.api.resource.ResourceResolver,java.lang.String)
getValue
org.apache.sling.scripting.jsp.taglib.SlingFunctions
java.lang.Object getValue(org.apache.sling.api.resource.ValueMap,java.lang.String,java.lang.Object)
hasChildren
org.apache.sling.scripting.jsp.taglib.SlingFunctions
java.lang.Boolean hasChildren(org.apache.sling.api.resource.Resource)
listChildren
org.apache.sling.scripting.jsp.taglib.SlingFunctions
java.util.Iterator listChildren(org.apache.sling.api.resource.Resource)
Execute a script.
call
org.apache.sling.scripting.jsp.taglib.CallTag
empty
Whether to flush the output before including the target
flush
false
true
boolean
The script to include.
script
false
true
Controls if the component hierarchy should be ignored
for script resolution. If true, only the search paths are respected.
ignoreComponentHierarchy
false
true
Includes a resource rendering into the current page
include
org.apache.sling.scripting.jsp.taglib.IncludeTagHandler
org.apache.sling.scripting.jsp.taglib.tei.StringVariableTEI
empty
Whether to flush the output before including the target
flush
false
true
boolean
The resource object to include in the current request
processing. Either resource or path must be specified. If
both are specified, the resource takes precedences.
resource
false
true
org.apache.sling.api.resource.Resource
The path to the resource object to include in the
current request processing. If this path is relative it is
appended to the path of the current resource whose
script is including the given resource. Either resource
or path must be specified. If both are specified, the
resource takes precedences.
path
false
true
The resource type of a resource to include. If the
resource to be included is specified with the path attribute,
which cannot be resolved to a resource, the tag may
create a synthetic resource object out of the path and
this resource type. If the resource type is set the path
must be the exact path to a resource object. That is,
adding parameters, selectors and extensions to the
path is not supported if the resource type is set.
resourceType
false
true
When dispatching, replace selectors by the value
provided by this option.
replaceSelectors
false
true
When dispatching, add the value provided by this option
to the selectors.
addSelectors
false
true
When dispatching, replace the suffix by the value
provided by this option.
replaceSuffix
false
true
If var is specified, what scope to store the variable in
scope
false
false
String
Variable name to store the resulting markup into
var
false
false
String
Forwards a request to a resource rendering the current
page
forward
org.apache.sling.scripting.jsp.taglib.ForwardTagHandler
empty
The resource object to forward the request to. Either
resource or path must be specified. If both are
specified, the resource takes precedences.
resource
false
true
org.apache.sling.api.resource.Resource
The path to the resource object to forward the request
to. If this path is relative it is appended to the path
of the current resource whose script is forwarding the
given resource. Either resource or path must be specified.
If both are specified, the resource takes precedences.
path
false
true
The resource type of a resource to forward. If the
resource to be forwarded is specified with the path attribute,
which cannot be resolved to a resource, the tag may
create a synthetic resource object out of the path and
this resource type. If the resource type is set the path
must be the exact path to a resource object. That is,
adding parameters, selectors and extensions to the
path is not supported if the resource type is set.
resourceType
false
true
When dispatching, replace selectors by the value
provided by this option.
replaceSelectors
false
true
When dispatching, add the value provided by this option
to the selectors.
addSelectors
false
true
When dispatching, replace the suffix by the value
provided by this option.
replaceSuffix
false
true
Defines regularly used scripting variables
defineObjects
org.apache.sling.scripting.jsp.taglib.DefineObjectsTag
org.apache.sling.scripting.jsp.taglib.DefineObjectsTEI
empty
requestName
false
false
responseName
false
false
resourceName
false
false
nodeName
false
false
logName
false
false
resourceResolverName
false
false
slingName
false
false
Evaluates a script invocation and includes the result
in the current page.
eval
org.apache.sling.scripting.jsp.taglib.EvalTagHandler
empty
Whether to flush the output before including the target
flush
false
true
boolean
The path to the script object to include in the current
request processing. By default, the current resource
is used for script resolving. This behaviour can
be changed by specifying either resource, resourceType
or ignoreResourceTypeHierarchy.
script
true
true
The resource object to include in the current request
processing. This attribute is optional. If it is
specified, resourceType should not be used. If both
are used, resource takes precedence.
resource
false
true
org.apache.sling.api.resource.Resource
The resource type of a resource to include. This
attribute is optional. If it is specified, resource
should not be used. If bot are used, resource
takes precedence.
resourceType
false
true
Prevents using the resource type hierarchy for searching
a script.
ignoreResourceTypeHierarchy
false
true
boolean
Adapts adaptables to objects of other types.
adaptTo
org.apache.sling.scripting.jsp.taglib.AdaptToTag
org.apache.sling.scripting.jsp.taglib.tei.AdaptToTEI
empty
The adaptable object to adapt.
adaptable
true
true
org.apache.sling.api.adapter.Adaptable
The class name to which to adapt the adaptable.
adaptTo
true
true
The name of the variable to which to save the adapted
object.
var
true
true
Writes properly XSS encoded text to the response using the
OWASP ESAPI for supporting a number of encoding modes.
encode
org.apache.sling.scripting.jsp.taglib.EncodeTag
JSP
The value to encode.
value
false
true
The default value to be used if the value is either
null or an empty string.
default
false
true
The mode to use for encoding. Must be one of the
valid modes found in XSSSupport.ENCODING_MODE.
mode
true
true
Tag for searching for resources using the given query
formulated in the given language.
findResources
org.apache.sling.scripting.jsp.taglib.FindResourcesTag
org.apache.sling.scripting.jsp.taglib.tei.ResourceIteratorVariableTEI
empty
The query string to find the resources.
query
true
true
The query language to use.
language
true
true
The name of the variable to which to save the resources.
var
true
true
Retrieves the value from the ValueMap, allowing for a
default value or coercing the return value.
getProperty
org.apache.sling.scripting.jsp.taglib.GetPropertyTag
org.apache.sling.scripting.jsp.taglib.tei.GetPropertyTEI
empty
The name of the variable to which to save the resource.
var
false
true
The ValueMap from which to retrieve the value.
properties
true
true
The key to retrieve the value from from the ValueMap.
key
true
true
The default value to return if no value exists for the
key. If specified, this takes precedence over returnClass.
defaultValue
false
true
The class into which to coerce the returned value.
returnClass
false
true
Retrieves resources based on either an absolute path or a
relative path and a base resource.
getResource
org.apache.sling.scripting.jsp.taglib.GetResourceTag
org.apache.sling.scripting.jsp.taglib.tei.ResourceVariableTEI
empty
The base resource under which to retrieve the child
resource, will only
be considered if a relative path is specified.
base
false
true
The path of the resource to retrieve, if relative, the
base resource must be specified.
path
true
true
The name of the variable to which to save the resource.
var
true
true
Lists the children of a Sling Resource.
listChildren
org.apache.sling.scripting.jsp.taglib.ListChildrenTag
org.apache.sling.scripting.jsp.taglib.tei.ResourceIteratorVariableTEI
empty
The resource for which to retrieve the children.
resource
true
true
org.apache.sling.api.resource.Resource
The name of the variable to which to save the child
resources.
var
true
true