All,

I've made some additional contributions around the resource access tags, based 
on SLING-1500<https://issues.apache.org/jira/browse/SLING-1500>, which had some 
nice features including:


*         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 EL function adaptTo: adding the ability to adapt adaptables in EL 
functions

*         New EL function findResources: enable invoking the 
resourceResolver.findResources functionality EL functions

*         New EL function getRelativeResource: enables finding resources by a 
relative path in EL functions

The patch also contains jUnit tests for these new tags and functions.

I was also looking through the old issues, and I believe 
SLING-577<https://issues.apache.org/jira/browse/SLING-577> can be closed, as 
Tobias points out you can bind a ValueMap to the page context and access 
properties on it using EL functions, e.g.:
pageContext.setAttribute("myProps",aValueMap);
${myProps.name} - ${myProps['sling:resourceType']}

Finally, I was wondering what the process would be for getting Sling Taglib 
2.1.9 released?  Is there anything else required before it gets released or 
anything I can do to help the process?

Thanks,
Dan

From: Dan Klco
Sent: Wednesday, December 05, 2012 3:48 PM
To: dev@sling.apache.org
Subject: Resource Access Tags

All,

I was wondering if there was any interest in adding the Resource access tags I 
provided into the Sling Taglib.  The idea behind these tags is to provide a 
faculty for accessing some of the most common functionality in the Sling 
Resource API without having to use Scriplet.

The tags include the following:

*         getResource - get a resource by path

*         listChildren - invoke the listChildren method, useful if SLING-2641 
is not in place

*         adapt - adapts adaptables to other object types

*         getProperty - allows you to get properties from ValueMaps with 
defaults and object casting

The patches for this functionality and a page describing the Sling TLDs, 
including what tags are available in each version of the Sling TLD are on this 
issue:
https://issues.apache.org/jira/browse/SLING-2648

Thanks,

Dan Klco
Senior Staff Engineer, Adobe WEM / Day CQ5
San Ramon, CA / Dayton, OH

[Description: Description: Description: 
cid:image003.gif@01CCF856.90108760]<http://www.sixdimensions.com/>
Cell (937) 231-3050
Office (937) 343-1326
Fax (877) 510-5082
LinkedIn<http://www.linkedin.com/in/klcodanr> | 
@KlcoDanR<https://twitter.com/klcodanr>

People. Deliver. Progress.

Reply via email to