[
https://issues.apache.org/jira/browse/SLING-1500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dan Klco updated SLING-1500:
----------------------------
Attachment: SLING-1500.diff
Attached is a new patch to integrate the functionality provided by Mark into
the SlingFunctions class for the 1.3 version of the Sling Taglibs.
I did not reproduce the use of ResourceWrappers as the referenced issue has
been closed. This patch adds the following:
Tags:
- New FindResources tag, for invoking the resourceResolver.findResources
functionality
- Updated: GetResources tag, adds the ability to specify a base resource under
which to retrieve a relative resource
New Functions:
- adaptTo: adding the ability to adapt adaptables in EL functions
- findResources: enable invoking the resourceResolver.findResources
functionality EL functions
- getRelativeResource: enables finding resources by a relative path in EL
functions
I've also included jUnit tests for all of these new methods and have verified
them in a Sling 6 vanilla instance.
> Patch Submission: Expression Language (EL) Functions for JSP Taglib
> -------------------------------------------------------------------
>
> Key: SLING-1500
> URL: https://issues.apache.org/jira/browse/SLING-1500
> Project: Sling
> Issue Type: Improvement
> Components: Scripting
> Affects Versions: Scripting JSP-Taglib 2.0.6
> Reporter: Mark Adamcin
> Priority: Minor
> Labels: el, function, jsp, scripting, sling, taglib
> Attachments: add-files.zip, SLING-1500.diff, taglib11.tld.patch
>
>
> I've noticed that the Sling Resource API is not very accessible for tag- and
> EL-focused JSP development. In order to promote readable JSP code, I created
> a set of static methods to implement commonly-used ResourceResolver methods
> as well as to expose the rather useful ResourceUtil methods as EL functions.
> The functions use ResourceWrappers to work around the isse
> https://issues.apache.org/jira/browse/SLING-1414 where the Resource.getPath()
> method is inaccessible in EL for JcrNodeResource objects.
> I've found these taglib functions to be very useful for Day CQ5 development,
> so I thought I'd offer to contribute them to the project.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira