[ 
https://issues.apache.org/jira/browse/SLING-6636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16391021#comment-16391021
 ] 

Carsten Ziegeler commented on SLING-6636:
-----------------------------------------

I think there are no other use cases :) - as mentioned not having a getXXXs 
method returning a map like structure but having a getXXX(String) method is a 
common pattern, so solving this in HTL is really simple and straight forward

If we add a map we have to make it read-only and lazy, document this etc. Not a 
big deal, but avoidable

In addition with adding that method you bind the HTL script to a Sling request. 
Now this doesn't seem to be a big deal, but still not necessary

It's true that adding a method is not breaking functionality, but it's breaking 
all implementors, so this api change requires an update of the engine and an 
update of everyone implementing it. Not a big deal either as this mostly will 
be mocks for testing.

And to me the best solution seems to be an HTL improvement

> Add request-attributes to SlingHttpServletRequest
> -------------------------------------------------
>
>                 Key: SLING-6636
>                 URL: https://issues.apache.org/jira/browse/SLING-6636
>             Project: Sling
>          Issue Type: Improvement
>          Components: API
>            Reporter: Feike Visser
>            Priority: Major
>
> With https://issues.apache.org/jira/browse/SLING-5812 you can now pass in 
> request-attributes. Still you can not access them directly in Sightly.
> It would be great to access them like
> ${request.attributes['layout']}
> Adding a List<String,Object> to SlingHttpServletRequest might be the best.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to