[jira] [Created] (SLING-7856) option basename for @i18n is not documented

2018-08-24 Thread Feike Visser (JIRA)
Feike Visser created SLING-7856:
---

 Summary: option basename for @i18n is not documented
 Key: SLING-7856
 URL: https://issues.apache.org/jira/browse/SLING-7856
 Project: Sling
  Issue Type: Bug
  Components: Scripting
Affects Versions: Scripting HTL Testing 1.0.10-1.4.0
Reporter: Feike Visser


When using @i18n in HTL you can also use the option 'basename'

However this is not documented.



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


[jira] [Commented] (SLING-7685) data-sly-resource throws RecursionTooDeepException when used with dynamic variables that are null / empty

2018-05-27 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-7685:
-

[~sagarsane] can you also put a sample of HTL script into this issue?

> data-sly-resource throws RecursionTooDeepException when used with dynamic 
> variables that are null / empty
> -
>
> Key: SLING-7685
> URL: https://issues.apache.org/jira/browse/SLING-7685
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Sagar Sane
>Priority: Major
>
> I am on AEM 6.3.1.2.
> If I use *data-sly-resource* w/ dynamic variable which is null or empty, I 
> get a *RecursionTooDeepException* runtime. The stack looks something like 
> this (redacting project specific stuff): 
> {code:java}
> 2018-05-26 20:18:33,335 *ERROR* [0:0:0:0:0:0:0:1 [1527380309473] GET 
> /content/ HTTP/1.1] 
> org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught 
> SlingException
> org.apache.sling.scripting.sightly.SightlyException: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.request.RecursionTooDeepException: /content/
> at 
> com.adobe.cq.sightly.WCMScriptHelper.includeScript(WCMScriptHelper.java:227)
> at 
> com.adobe.cq.sightly.internal.extensions.IncludeExtension.call(IncludeExtension.java:73)
> 

[jira] [Commented] (SLING-7685) data-sly-resource throws RecursionTooDeepException when used with dynamic variables that are null / empty

2018-05-27 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-7685:
-

[~sagarsane] can you check the bundle version of your HTL-bundles? To make sure 
we have the complete picture.

> data-sly-resource throws RecursionTooDeepException when used with dynamic 
> variables that are null / empty
> -
>
> Key: SLING-7685
> URL: https://issues.apache.org/jira/browse/SLING-7685
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Sagar Sane
>Priority: Major
>
> I am on AEM 6.3.1.2.
> If I use *data-sly-resource* w/ dynamic variable which is null or empty, I 
> get a *RecursionTooDeepException* runtime. The stack looks something like 
> this (redacting project specific stuff): 
> {code:java}
> 2018-05-26 20:18:33,335 *ERROR* [0:0:0:0:0:0:0:1 [1527380309473] GET 
> /content/ HTTP/1.1] 
> org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught 
> SlingException
> org.apache.sling.scripting.sightly.SightlyException: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: 
> org.apache.sling.api.request.RecursionTooDeepException: /content/
> at 
> com.adobe.cq.sightly.WCMScriptHelper.includeScript(WCMScriptHelper.java:227)
> at 
> 

[jira] [Commented] (SLING-6636) Add request-attributes to SlingHttpServletRequest

2018-03-08 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6636:
-

[~radu.cotescu] would you be open for this?

> 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 to SlingHttpServletRequest might be the best.



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


[jira] [Commented] (SLING-6636) Add request-attributes to SlingHttpServletRequest

2018-03-08 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6636:
-

thanks [~cziegeler] for taking the time to respond, as you see it is almost a 
year ago when I created this issue.
Adding this to the api is to me the most cleanest solution, and it can be 
directly be used in HTL and other usages of the SlingHttpServletRequest-api.
Also it is an addition, so it is not breaking functionality.

> 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 to SlingHttpServletRequest might be the best.



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


[jira] [Created] (SLING-7493) HTL must leave external urls untouched

2018-02-12 Thread Feike Visser (JIRA)
Feike Visser created SLING-7493:
---

 Summary: HTL must leave external urls untouched
 Key: SLING-7493
 URL: https://issues.apache.org/jira/browse/SLING-7493
 Project: Sling
  Issue Type: Improvement
  Components: Scripting
Affects Versions: Scripting HTL Engine 1.0.48-1.3.1
Reporter: Feike Visser


In the current implementation of @ extension option of HTL, also external urls 
are changed.

It is very common to have a list with both internal and external urls.


[jira] [Commented] (SLING-6504) Use-api to support more flexible way to adapt from different objects

2017-07-21 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6504:
-

hi [~radu.cotescu], [~bdelacre...@codeconsult.ch],

I added tests, updated the ticket, emailed sling-dev. No response to all of 
them...
What can I do to get the code merged into Sling?

> Use-api to support more flexible way to adapt from different objects
> 
>
> Key: SLING-6504
> URL: https://issues.apache.org/jira/browse/SLING-6504
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>Assignee: Radu Cotescu
>  Labels: Sightly
> Fix For: Scripting HTL Engine 1.0.36
>
>
> The current implementation of the Use-api accept classes that are adaptable 
> from Request or Resource. 
> This issue is to make this mechanism more flexible, to be able to adapt from 
> different objects.
> Proposal:
> {code}
> 
> ${session.userID}
> {code}
> This avoids the implementations of wrapper classes that only do the 
> adaptation.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-6504) Use-api to support more flexible way to adapt from different objects

2017-06-28 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6504:
-

Tests have been added.

> Use-api to support more flexible way to adapt from different objects
> 
>
> Key: SLING-6504
> URL: https://issues.apache.org/jira/browse/SLING-6504
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>Assignee: Radu Cotescu
>  Labels: Sightly
> Fix For: Scripting HTL Engine 1.0.36
>
>
> The current implementation of the Use-api accept classes that are adaptable 
> from Request or Resource. 
> This issue is to make this mechanism more flexible, to be able to adapt from 
> different objects.
> Proposal:
> {code}
> 
> ${session.userID}
> {code}
> This avoids the implementations of wrapper classes that only do the 
> adaptation.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-6504) Use-api to support more flexible way to adapt from different objects

2017-06-28 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6504:
-

got this: request.resourceResolver :-)

> Use-api to support more flexible way to adapt from different objects
> 
>
> Key: SLING-6504
> URL: https://issues.apache.org/jira/browse/SLING-6504
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>Assignee: Radu Cotescu
>  Labels: Sightly
> Fix For: Scripting HTL Engine 1.0.36
>
>
> The current implementation of the Use-api accept classes that are adaptable 
> from Request or Resource. 
> This issue is to make this mechanism more flexible, to be able to adapt from 
> different objects.
> Proposal:
> {code}
> 
> ${session.userID}
> {code}
> This avoids the implementations of wrapper classes that only do the 
> adaptation.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-6504) Use-api to support more flexible way to adapt from different objects

2017-06-28 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6504:
-

Any guidance for getting a resourceResolver into the test? I got the 
Adapterfactory etc.., bit puzzled how we can invoke this via the test...

> Use-api to support more flexible way to adapt from different objects
> 
>
> Key: SLING-6504
> URL: https://issues.apache.org/jira/browse/SLING-6504
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>Assignee: Radu Cotescu
>  Labels: Sightly
> Fix For: Scripting HTL Engine 1.0.36
>
>
> The current implementation of the Use-api accept classes that are adaptable 
> from Request or Resource. 
> This issue is to make this mechanism more flexible, to be able to adapt from 
> different objects.
> Proposal:
> {code}
> 
> ${session.userID}
> {code}
> This avoids the implementations of wrapper classes that only do the 
> adaptation.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-6504) Use-api to support more flexible way to adapt from different objects

2017-06-27 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6504:
-

thanks [~radu.cotescu], let me do that

> Use-api to support more flexible way to adapt from different objects
> 
>
> Key: SLING-6504
> URL: https://issues.apache.org/jira/browse/SLING-6504
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>Assignee: Radu Cotescu
>  Labels: Sightly
> Fix For: Scripting HTL Engine 1.0.36
>
>
> The current implementation of the Use-api accept classes that are adaptable 
> from Request or Resource. 
> This issue is to make this mechanism more flexible, to be able to adapt from 
> different objects.
> Proposal:
> {code}
> 
> ${session.userID}
> {code}
> This avoids the implementations of wrapper classes that only do the 
> adaptation.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-6504) Use-api to support more flexible way to adapt from different objects

2017-06-23 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6504:
-

I made an example implementation for this, would be great to have feedback on 
this.

> Use-api to support more flexible way to adapt from different objects
> 
>
> Key: SLING-6504
> URL: https://issues.apache.org/jira/browse/SLING-6504
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>  Labels: Sightly
>
> The current implementation of the Use-api accept classes that are adaptable 
> from Request or Resource. 
> This issue is to make this mechanism more flexible, to be able to adapt from 
> different objects.
> Proposal:
> {code}
> 
> ${session.userID}
> {code}
> This avoids the implementations of wrapper classes that only do the 
> adaptation.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (SLING-6636) Add request-attributes to SlingHttpServletRequest

2017-06-21 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6636?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser updated SLING-6636:

Summary: Add request-attributes to SlingHttpServletRequest  (was: Access 
request-attributes directly in Sightly)

> 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
>
> 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 to SlingHttpServletRequest might be the best.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (SLING-6636) Access request-attributes directly in Sightly

2017-06-21 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6636?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser updated SLING-6636:

Component/s: (was: Scripting)
 API

> Access request-attributes directly in Sightly
> -
>
> Key: SLING-6636
> URL: https://issues.apache.org/jira/browse/SLING-6636
> Project: Sling
>  Issue Type: Improvement
>  Components: API
>Reporter: Feike Visser
>
> 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 to SlingHttpServletRequest might be the best.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (SLING-6504) Use-api to support more flexible way to adapt from different objects

2017-06-21 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser updated SLING-6504:

Description: 
The current implementation of the Use-api accept classes that are adaptable 
from Request or Resource. 
This issue is to make this mechanism more flexible, to be able to adapt from 
different objects.

Proposal:
{code}


${session.userID}
{code}

This avoids the implementations of wrapper classes that only do the adaptation.

  was:
The current implementation of the Use-api accept classes that are adaptable 
from Request or Resource. 
This issue is to make this mechanism more flexible, to be able to adapt from 
different objects.

Proposal:
{code}


${session.userID}
{code}


> Use-api to support more flexible way to adapt from different objects
> 
>
> Key: SLING-6504
> URL: https://issues.apache.org/jira/browse/SLING-6504
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>  Labels: Sightly
>
> The current implementation of the Use-api accept classes that are adaptable 
> from Request or Resource. 
> This issue is to make this mechanism more flexible, to be able to adapt from 
> different objects.
> Proposal:
> {code}
> 
> ${session.userID}
> {code}
> This avoids the implementations of wrapper classes that only do the 
> adaptation.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (SLING-6504) Use-api to support more flexible way to adapt from different objects

2017-06-21 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser updated SLING-6504:

Description: 
The current implementation of the Use-api accept classes that are adaptable 
from Request or Resource. 
This issue is to make this mechanism more flexible, to be able to adapt from 
different objects.

Proposal:
{code}


${session.userID}
{code}

  was:
The current implementation of the Use-api accept classes that are adaptable 
from Request or Resource. 
This issue is to make this mechanism more flexible, to be able to adapt from 
different objects.

Proposal:
{code}


${user.userID}
{code}


> Use-api to support more flexible way to adapt from different objects
> 
>
> Key: SLING-6504
> URL: https://issues.apache.org/jira/browse/SLING-6504
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>  Labels: Sightly
>
> The current implementation of the Use-api accept classes that are adaptable 
> from Request or Resource. 
> This issue is to make this mechanism more flexible, to be able to adapt from 
> different objects.
> Proposal:
> {code}
> 
> ${session.userID}
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (SLING-6504) Use-api to support more flexible way to adapt from different objects

2017-06-20 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser updated SLING-6504:

Description: 
The current implementation of the Use-api accept classes that are adaptable 
from Request or Resource. 
This issue is to make this mechanism more flexible, to be able to adapt from 
different objects.

Proposal:
{code}

${user.userID}
{code}

  was:
The current implementation of the Use-api accept classes that are adaptable 
from Request or Resource. 
This issue is to make this mechanism more flexible, to be able to adapt from 
different objects.

Proposal:
{code}
data-sly-use.obj="com.example.Class from resourceResolver"
{code}

{code}
data-sly-use.obj="com.example.Class from yourCustomObject"
{code}


> Use-api to support more flexible way to adapt from different objects
> 
>
> Key: SLING-6504
> URL: https://issues.apache.org/jira/browse/SLING-6504
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>  Labels: Sightly
>
> The current implementation of the Use-api accept classes that are adaptable 
> from Request or Resource. 
> This issue is to make this mechanism more flexible, to be able to adapt from 
> different objects.
> Proposal:
> {code}
> 
> ${user.userID}
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (SLING-6504) Use-api to support more flexible way to adapt from different objects

2017-06-20 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser updated SLING-6504:

Description: 
The current implementation of the Use-api accept classes that are adaptable 
from Request or Resource. 
This issue is to make this mechanism more flexible, to be able to adapt from 
different objects.

Proposal:
{code}


${user.userID}
{code}

  was:
The current implementation of the Use-api accept classes that are adaptable 
from Request or Resource. 
This issue is to make this mechanism more flexible, to be able to adapt from 
different objects.

Proposal:
{code}

${user.userID}
{code}


> Use-api to support more flexible way to adapt from different objects
> 
>
> Key: SLING-6504
> URL: https://issues.apache.org/jira/browse/SLING-6504
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>  Labels: Sightly
>
> The current implementation of the Use-api accept classes that are adaptable 
> from Request or Resource. 
> This issue is to make this mechanism more flexible, to be able to adapt from 
> different objects.
> Proposal:
> {code}
> 
> ${user.userID}
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-6504) Use-api to support more flexible way to adapt from different objects

2017-06-20 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6504:
-

thanks [~bdelacre...@codeconsult.ch] for your answer, let me try to create a 
small patch.

> Use-api to support more flexible way to adapt from different objects
> 
>
> Key: SLING-6504
> URL: https://issues.apache.org/jira/browse/SLING-6504
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>  Labels: Sightly
>
> The current implementation of the Use-api accept classes that are adaptable 
> from Request or Resource. 
> This issue is to make this mechanism more flexible, to be able to adapt from 
> different objects.
> Proposal:
> {code}
> data-sly-use.obj="com.example.Class from resourceResolver"
> {code}
> {code}
> data-sly-use.obj="com.example.Class from yourCustomObject"
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Comment Edited] (SLING-6504) Use-api to support more flexible way to adapt from different objects

2017-06-20 Thread Feike Visser (JIRA)

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

Feike Visser edited comment on SLING-6504 at 6/20/17 8:50 AM:
--

What is the best way to discuss new features? I have raised a couple of things 
but I don't how to push this further. cc: [~bdelacre...@codeconsult.ch] 


was (Author: fvisser):
What is the best way to discuss new features? I have raised a couple of things 
but I don't how to push to further. cc: [~bdelacre...@codeconsult.ch] 

> Use-api to support more flexible way to adapt from different objects
> 
>
> Key: SLING-6504
> URL: https://issues.apache.org/jira/browse/SLING-6504
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>  Labels: Sightly
>
> The current implementation of the Use-api accept classes that are adaptable 
> from Request or Resource. 
> This issue is to make this mechanism more flexible, to be able to adapt from 
> different objects.
> Proposal:
> {code}
> data-sly-use.obj="com.example.Class from resourceResolver"
> {code}
> {code}
> data-sly-use.obj="com.example.Class from yourCustomObject"
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-6504) Use-api to support more flexible way to adapt from different objects

2017-06-20 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6504:
-

What is the best way to discuss new features? I have raised a couple of things 
but I don't how to push to further. cc: [~bdelacre...@codeconsult.ch] 

> Use-api to support more flexible way to adapt from different objects
> 
>
> Key: SLING-6504
> URL: https://issues.apache.org/jira/browse/SLING-6504
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>  Labels: Sightly
>
> The current implementation of the Use-api accept classes that are adaptable 
> from Request or Resource. 
> This issue is to make this mechanism more flexible, to be able to adapt from 
> different objects.
> Proposal:
> {code}
> data-sly-use.obj="com.example.Class from resourceResolver"
> {code}
> {code}
> data-sly-use.obj="com.example.Class from yourCustomObject"
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (SLING-6944) hours are missing in the healthcheck output

2017-06-08 Thread Feike Visser (JIRA)
Feike Visser created SLING-6944:
---

 Summary: hours are missing in the healthcheck output
 Key: SLING-6944
 URL: https://issues.apache.org/jira/browse/SLING-6944
 Project: Sling
  Issue Type: Bug
  Components: Health Check
Reporter: Feike Visser
Priority: Trivial
 Attachments: Screen Shot 2017-06-08 at 11.29.45 AM.png

When executing a healthcheck via the Felix console, the following output is 
given.

{code}
Finished: 2017-06-08 29:32 after 2sec
{code}

As you can see the hours are missing.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (SLING-6779) [htl-maven-plugin] No warning / error on wrong options

2017-04-12 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6779?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser updated SLING-6779:

Description: 
I have the following code 

{code}
${currentPage.title @ contex = 'scriptString'}
{code}

No warning or error is given for the wrong option @ contex

  was:
I have the following code 

{code}

${currentPage.title @ contex = 'scriptString'}

{code}

No warning or error is given for the wrong option @ contex


> [htl-maven-plugin] No warning / error on wrong options
> --
>
> Key: SLING-6779
> URL: https://issues.apache.org/jira/browse/SLING-6779
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: HTL Maven Plugin 1.0.6
>Reporter: Feike Visser
>
> I have the following code 
> {code}
> ${currentPage.title @ contex = 'scriptString'}
> {code}
> No warning or error is given for the wrong option @ contex



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (SLING-6779) [htl-maven-plugin] No warning / error on wrong options

2017-04-12 Thread Feike Visser (JIRA)
Feike Visser created SLING-6779:
---

 Summary: [htl-maven-plugin] No warning / error on wrong options
 Key: SLING-6779
 URL: https://issues.apache.org/jira/browse/SLING-6779
 Project: Sling
  Issue Type: Bug
  Components: Scripting
Affects Versions: HTL Maven Plugin 1.0.6
Reporter: Feike Visser


I have the following code 

{code}

${currentPage.title @ contex = 'scriptString'}

{code}

No warning or error is given for the wrong option @ contex



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (SLING-6504) Use-api to support more flexible way to adapt from different objects

2017-04-09 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6504:
-

Would this be a better approach?
{code}
${ 'com.project.Class' @ adaptable = resourceResolver}
{code}

> Use-api to support more flexible way to adapt from different objects
> 
>
> Key: SLING-6504
> URL: https://issues.apache.org/jira/browse/SLING-6504
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>  Labels: Sightly
>
> The current implementation of the Use-api accept classes that are adaptable 
> from Request or Resource. 
> This issue is to make this mechanism more flexible, to be able to adapt from 
> different objects.
> Proposal:
> {code}
> data-sly-use.obj="com.example.Class from resourceResolver"
> {code}
> {code}
> data-sly-use.obj="com.example.Class from yourCustomObject"
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (SLING-6504) Use-api to support more flexible way to adapt from different objects

2017-04-07 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6504:
-

What would you propose then?

> Use-api to support more flexible way to adapt from different objects
> 
>
> Key: SLING-6504
> URL: https://issues.apache.org/jira/browse/SLING-6504
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>  Labels: Sightly
>
> The current implementation of the Use-api accept classes that are adaptable 
> from Request or Resource. 
> This issue is to make this mechanism more flexible, to be able to adapt from 
> different objects.
> Proposal:
> {code}
> data-sly-use.obj="com.example.Class from resourceResolver"
> {code}
> {code}
> data-sly-use.obj="com.example.Class from yourCustomObject"
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Comment Edited] (SLING-6504) Use-api to support more flexible way to adapt from different objects

2017-04-07 Thread Feike Visser (JIRA)

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

Feike Visser edited comment on SLING-6504 at 4/7/17 9:28 AM:
-

This is more convenient, you now see Use-classes with just one line of code to 
do the adaption.

Same as we do for formatting and the support for resources in data-sly-use.
Of course you can do this in code, but my request is to make it easier for 
developers, and requires less code.


was (Author: fvisser):
This is more convenient, you now see Use-classes with just one line of code to 
do the adaption.

Same as we do for formatting and the support for resources in data-sly-use.

> Use-api to support more flexible way to adapt from different objects
> 
>
> Key: SLING-6504
> URL: https://issues.apache.org/jira/browse/SLING-6504
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>  Labels: Sightly
>
> The current implementation of the Use-api accept classes that are adaptable 
> from Request or Resource. 
> This issue is to make this mechanism more flexible, to be able to adapt from 
> different objects.
> Proposal:
> {code}
> data-sly-use.obj="com.example.Class from resourceResolver"
> {code}
> {code}
> data-sly-use.obj="com.example.Class from yourCustomObject"
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (SLING-6504) Use-api to support more flexible way to adapt from different objects

2017-04-07 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6504:
-

This is more convenient, you now see Use-classes with just one line of code to 
do the adaption.

Same as we do for formatting and the support for resources in data-sly-use.

> Use-api to support more flexible way to adapt from different objects
> 
>
> Key: SLING-6504
> URL: https://issues.apache.org/jira/browse/SLING-6504
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>  Labels: Sightly
>
> The current implementation of the Use-api accept classes that are adaptable 
> from Request or Resource. 
> This issue is to make this mechanism more flexible, to be able to adapt from 
> different objects.
> Proposal:
> {code}
> data-sly-use.obj="com.example.Class from resourceResolver"
> {code}
> {code}
> data-sly-use.obj="com.example.Class from yourCustomObject"
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (SLING-6504) Use-api to support more flexible way to adapt from different objects

2017-04-07 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser updated SLING-6504:

Summary: Use-api to support more flexible way to adapt from different 
objects  (was: Use-api to support more flexible way to adapt)

> Use-api to support more flexible way to adapt from different objects
> 
>
> Key: SLING-6504
> URL: https://issues.apache.org/jira/browse/SLING-6504
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>  Labels: Sightly
>
> The current implementation of the Use-api accept classes that are adaptable 
> from Request or Resource. 
> This issue is to make this mechanism more flexible, to be able to adapt from 
> different objects.
> Proposal:
> {code}
> data-sly-use="com.example.Class from resourceResolver"
> {code}
> {code}
> data-sly-use="com.example.Class from yourCustomObject"
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (SLING-6504) Use-api to support more flexible way to adapt

2017-04-07 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser updated SLING-6504:

Description: 
The current implementation of the Use-api accept classes that are adaptable 
from Request or Resource. 
This issue is to make this mechanism more flexible, to be able to adapt from 
different objects.

Proposal:
{code}
data-sly-use="com.example.Class from resourceResolver"
{code}

{code}
data-sly-use="com.example.Class from yourCustomObject"
{code}

  was:
The current implementation of the Use-api accept classes that are adaptable 
from Request or Resource. But in many cases it would also be great if they can 
be adaptable from ResourceResolver.

Now you need to write a small wrapper to get the resourceResolver and adapt to 
the class.

Summary: Use-api to support more flexible way to adapt  (was: Use-api 
also adaptable from ResourceResolver)

> Use-api to support more flexible way to adapt
> -
>
> Key: SLING-6504
> URL: https://issues.apache.org/jira/browse/SLING-6504
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>  Labels: Sightly
>
> The current implementation of the Use-api accept classes that are adaptable 
> from Request or Resource. 
> This issue is to make this mechanism more flexible, to be able to adapt from 
> different objects.
> Proposal:
> {code}
> data-sly-use="com.example.Class from resourceResolver"
> {code}
> {code}
> data-sly-use="com.example.Class from yourCustomObject"
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (SLING-6504) Use-api to support more flexible way to adapt from different objects

2017-04-07 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser updated SLING-6504:

Description: 
The current implementation of the Use-api accept classes that are adaptable 
from Request or Resource. 
This issue is to make this mechanism more flexible, to be able to adapt from 
different objects.

Proposal:
{code}
data-sly-use.obj="com.example.Class from resourceResolver"
{code}

{code}
data-sly-use.obj="com.example.Class from yourCustomObject"
{code}

  was:
The current implementation of the Use-api accept classes that are adaptable 
from Request or Resource. 
This issue is to make this mechanism more flexible, to be able to adapt from 
different objects.

Proposal:
{code}
data-sly-use="com.example.Class from resourceResolver"
{code}

{code}
data-sly-use="com.example.Class from yourCustomObject"
{code}


> Use-api to support more flexible way to adapt from different objects
> 
>
> Key: SLING-6504
> URL: https://issues.apache.org/jira/browse/SLING-6504
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>  Labels: Sightly
>
> The current implementation of the Use-api accept classes that are adaptable 
> from Request or Resource. 
> This issue is to make this mechanism more flexible, to be able to adapt from 
> different objects.
> Proposal:
> {code}
> data-sly-use.obj="com.example.Class from resourceResolver"
> {code}
> {code}
> data-sly-use.obj="com.example.Class from yourCustomObject"
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (SLING-6637) [htl] data-sly-use should not raise an exception when resource doesn't exist

2017-03-29 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6637:
-

I raised the following improvement JIRA on this subject: 
https://issues.apache.org/jira/browse/SLING-6744

> [htl] data-sly-use should not raise an exception when resource doesn't exist
> 
>
> Key: SLING-6637
> URL: https://issues.apache.org/jira/browse/SLING-6637
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>Assignee: Radu Cotescu
>
> Following code: 
> {code}
> 
> {code}
> You get now the following exception:
> {code}
> org.apache.sling.scripting.sightly.SightlyException: No use provider could 
> resolve identifier x/y/z
> {code}
> In practice you want to have a null-value assigned to x, now developers will 
> make a lot of checks to make sure the resource does exist.
> In addition we can log warning message when this happens.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (SLING-6744) [HTL] Introduction of data-sly-resolve

2017-03-29 Thread Feike Visser (JIRA)
Feike Visser created SLING-6744:
---

 Summary: [HTL] Introduction of data-sly-resolve
 Key: SLING-6744
 URL: https://issues.apache.org/jira/browse/SLING-6744
 Project: Sling
  Issue Type: New Feature
  Components: Scripting
Reporter: Feike Visser


We have functionality to resolve a resource via data-sly-use.
The functionality is implemented to throw an exception when the resource does 
not exist.
With data-sly-resolve, you can resolve a resource. If the resource does not 
exist a null gets assigned to the variable.
This is the same as you would do with resolver.getResource()



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (SLING-6637) [htl] data-sly-use should not raise an exception when resource doesn't exist

2017-03-23 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6637:
-

I see then the following pattern to avoid exceptions:
{code}


  

{code}

To me this defeats the purpose of data-sly-use to also supports resources, 
because in the Java-code we already do a getResource.

> [htl] data-sly-use should not raise an exception when resource doesn't exist
> 
>
> Key: SLING-6637
> URL: https://issues.apache.org/jira/browse/SLING-6637
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>Assignee: Radu Cotescu
>
> Following code: 
> {code}
> 
> {code}
> You get now the following exception:
> {code}
> org.apache.sling.scripting.sightly.SightlyException: No use provider could 
> resolve identifier x/y/z
> {code}
> In practice you want to have a null-value assigned to x, now developers will 
> make a lot of checks to make sure the resource does exist.
> In addition we can log warning message when this happens.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (SLING-6637) [htl] data-sly-use should not raise an exception when resource doesn't exist

2017-03-23 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6637:
-

This is also a block statement:
{code}
data-sly-test.x="${ prop.x }"
{code}

Re-reading the comments etc, I see both sides of this story.
So why did we not introduce data-sly-resolve?
It looks to me we are mixing things here, I agree with [~kwindszus] on his 
example.


> [htl] data-sly-use should not raise an exception when resource doesn't exist
> 
>
> Key: SLING-6637
> URL: https://issues.apache.org/jira/browse/SLING-6637
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>Assignee: Radu Cotescu
>
> Following code: 
> {code}
> 
> {code}
> You get now the following exception:
> {code}
> org.apache.sling.scripting.sightly.SightlyException: No use provider could 
> resolve identifier x/y/z
> {code}
> In practice you want to have a null-value assigned to x, now developers will 
> make a lot of checks to make sure the resource does exist.
> In addition we can log warning message when this happens.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (SLING-6637) [htl] data-sly-use should not raise an exception when resource doesn't exist

2017-03-23 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6637:
-

But we are also not throwing exceptions when you access a non-existing property 
like 
{code}
${ x.y }
{code}
Why is this use-case different?

> [htl] data-sly-use should not raise an exception when resource doesn't exist
> 
>
> Key: SLING-6637
> URL: https://issues.apache.org/jira/browse/SLING-6637
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>Assignee: Radu Cotescu
>
> Following code: 
> {code}
> 
> {code}
> You get now the following exception:
> {code}
> org.apache.sling.scripting.sightly.SightlyException: No use provider could 
> resolve identifier x/y/z
> {code}
> In practice you want to have a null-value assigned to x, now developers will 
> make a lot of checks to make sure the resource does exist.
> In addition we can log warning message when this happens.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Comment Edited] (SLING-6637) [htl] data-sly-use should not raise an exception when resource doesn't exist

2017-03-23 Thread Feike Visser (JIRA)

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

Feike Visser edited comment on SLING-6637 at 3/23/17 12:42 PM:
---

There is a difference between resolving a Java-class or a resource. A 
Java-class is a static resource that must be available.
While resolving a resource is done at runtime, and a particular path may not 
exist anymore.

What I want to avoid is that developers need to call/write code to check if a 
resource exists, before using data-sly-use.
>From developer standpoint (not implementation standpoint) there is no 
>difference between
{code}
data-sly-test.x="${ wrongVar.wrongField}"
{code}
and
{code}
data-sly-use.x="${ properties.wrongPath }"
{code}

It should both return an empty response that can be checked later.


was (Author: fvisser):
There is a difference between resolving a Java-class or a resource. A 
Java-class is a static resource that must be available.
While resolving a resource is done at runtime, and a particular path may not 
exist anymore.

What I want to avoid is that developers need to call/write code to check if a 
resource exists, before using data-sly-use.
>From developer standpoint (not implementation standpoint) there is no 
>difference between
{code}
data-sly-test.x="${ wrongVar.wrongField}"
{code}
and
{code|
data-sly-use.x="${ properties.wrongPath }"
{code}

It should both return an empty response that can be checked later.

> [htl] data-sly-use should not raise an exception when resource doesn't exist
> 
>
> Key: SLING-6637
> URL: https://issues.apache.org/jira/browse/SLING-6637
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>Assignee: Radu Cotescu
>
> Following code: 
> {code}
> 
> {code}
> You get now the following exception:
> {code}
> org.apache.sling.scripting.sightly.SightlyException: No use provider could 
> resolve identifier x/y/z
> {code}
> In practice you want to have a null-value assigned to x, now developers will 
> make a lot of checks to make sure the resource does exist.
> In addition we can log warning message when this happens.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (SLING-6637) [htl] data-sly-use should not raise an exception when resource doesn't exist

2017-03-23 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6637:
-

There is a difference between resolving a Java-class or a resource. A 
Java-class is a static resource that must be available.
While resolving a resource is done at runtime, and a particular path may not 
exist anymore.

What I want to avoid is that developers need to call/write code to check if a 
resource exists, before using data-sly-use.
>From developer standpoint (not implementation standpoint) there is no 
>difference between
{code}
data-sly-test.x="${ wrongVar.wrongField}"
{code}
and
{code|
data-sly-use.x="${ properties.wrongPath }"
{code}

It should both return an empty response that can be checked later.

> [htl] data-sly-use should not raise an exception when resource doesn't exist
> 
>
> Key: SLING-6637
> URL: https://issues.apache.org/jira/browse/SLING-6637
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>Assignee: Radu Cotescu
>
> Following code: 
> {code}
> 
> {code}
> You get now the following exception:
> {code}
> org.apache.sling.scripting.sightly.SightlyException: No use provider could 
> resolve identifier x/y/z
> {code}
> In practice you want to have a null-value assigned to x, now developers will 
> make a lot of checks to make sure the resource does exist.
> In addition we can log warning message when this happens.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Comment Edited] (SLING-6637) [htl] data-sly-use should not raise an exception when resource doesn't exist

2017-03-23 Thread Feike Visser (JIRA)

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

Feike Visser edited comment on SLING-6637 at 3/23/17 11:11 AM:
---

I like to reopen this issue, and like to see if we can log these exceptions 
(warn or error).
Reason for this is that you have common use-cases where you are not 100% sure 
if the resource exist.


was (Author: fvisser):
I like to reopen this issue, and like to see if we can log these exceptions 
(warn or error).
Reason for this is that you have common use-cases where you are 100% sure if 
the resource exist.

> [htl] data-sly-use should not raise an exception when resource doesn't exist
> 
>
> Key: SLING-6637
> URL: https://issues.apache.org/jira/browse/SLING-6637
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>Assignee: Radu Cotescu
>
> Following code: 
> {code}
> 
> {code}
> You get now the following exception:
> {code}
> org.apache.sling.scripting.sightly.SightlyException: No use provider could 
> resolve identifier x/y/z
> {code}
> In practice you want to have a null-value assigned to x, now developers will 
> make a lot of checks to make sure the resource does exist.
> In addition we can log warning message when this happens.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Comment Edited] (SLING-6637) [htl] data-sly-use should not raise an exception when resource doesn't exist

2017-03-23 Thread Feike Visser (JIRA)

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

Feike Visser edited comment on SLING-6637 at 3/23/17 11:11 AM:
---

data-sly-use now also supports the resolving from a path to a resource.

see https://issues.apache.org/jira/browse/SLING-5813



was (Author: fvisser):
data-sly-use now also supports the resolving from a path to a resource.


> [htl] data-sly-use should not raise an exception when resource doesn't exist
> 
>
> Key: SLING-6637
> URL: https://issues.apache.org/jira/browse/SLING-6637
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>Assignee: Radu Cotescu
>
> Following code: 
> {code}
> 
> {code}
> You get now the following exception:
> {code}
> org.apache.sling.scripting.sightly.SightlyException: No use provider could 
> resolve identifier x/y/z
> {code}
> In practice you want to have a null-value assigned to x, now developers will 
> make a lot of checks to make sure the resource does exist.
> In addition we can log warning message when this happens.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (SLING-6637) [htl] data-sly-use should not raise an exception when resource doesn't exist

2017-03-23 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6637:
-

data-sly-use now also supports the resolving from a path to a resource.


> [htl] data-sly-use should not raise an exception when resource doesn't exist
> 
>
> Key: SLING-6637
> URL: https://issues.apache.org/jira/browse/SLING-6637
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>Assignee: Radu Cotescu
>
> Following code: 
> {code}
> 
> {code}
> You get now the following exception:
> {code}
> org.apache.sling.scripting.sightly.SightlyException: No use provider could 
> resolve identifier x/y/z
> {code}
> In practice you want to have a null-value assigned to x, now developers will 
> make a lot of checks to make sure the resource does exist.
> In addition we can log warning message when this happens.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (SLING-6637) [htl] data-sly-use should not raise an exception when resource doesn't exist

2017-03-23 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6637:
-

Sure!
For example there is a productPath saved, and you want to print the name of the 
product.
The product might be moved or removed.

Same is when a user specifies a path to another resource, however the user may 
have a typo or at some point the resource may be removed.

> [htl] data-sly-use should not raise an exception when resource doesn't exist
> 
>
> Key: SLING-6637
> URL: https://issues.apache.org/jira/browse/SLING-6637
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>Assignee: Radu Cotescu
>
> Following code: 
> {code}
> 
> {code}
> You get now the following exception:
> {code}
> org.apache.sling.scripting.sightly.SightlyException: No use provider could 
> resolve identifier x/y/z
> {code}
> In practice you want to have a null-value assigned to x, now developers will 
> make a lot of checks to make sure the resource does exist.
> In addition we can log warning message when this happens.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (SLING-6636) Access request-attributes directly in Sightly

2017-03-23 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6636?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser updated SLING-6636:

Description: 
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 to SlingHttpServletRequest might be the best.

  was:
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']}


> Access request-attributes directly in Sightly
> -
>
> Key: SLING-6636
> URL: https://issues.apache.org/jira/browse/SLING-6636
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>
> 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 to SlingHttpServletRequest might be the best.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Comment Edited] (SLING-6637) [htl] data-sly-use should not raise an exception when resource doesn't exist

2017-03-23 Thread Feike Visser (JIRA)

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

Feike Visser edited comment on SLING-6637 at 3/23/17 10:28 AM:
---

I like to reopen this issue, and like to see if we can log these exceptions 
(warn or error).
Reason for this is that you have common use-cases where you are 100% sure if 
the resource exist.


was (Author: fvisser):
I like to reopen this issue, and like to see if we can log these exceptions 
(warn or error).
Reason for this is that you can common use-cases where you are 100% sure if the 
resource exist.

> [htl] data-sly-use should not raise an exception when resource doesn't exist
> 
>
> Key: SLING-6637
> URL: https://issues.apache.org/jira/browse/SLING-6637
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>Assignee: Radu Cotescu
>
> Following code: 
> {code}
> 
> {code}
> You get now the following exception:
> {code}
> org.apache.sling.scripting.sightly.SightlyException: No use provider could 
> resolve identifier x/y/z
> {code}
> In practice you want to have a null-value assigned to x, now developers will 
> make a lot of checks to make sure the resource does exist.
> In addition we can log warning message when this happens.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (SLING-6637) [htl] data-sly-use should not raise an exception when resource doesn't exist

2017-03-23 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6637:
-

I like to reopen this issue, and like to see if we can log these exceptions 
(warn or error).
Reason for this is that you can common use-cases where you are 100% sure if the 
resource exist.

> [htl] data-sly-use should not raise an exception when resource doesn't exist
> 
>
> Key: SLING-6637
> URL: https://issues.apache.org/jira/browse/SLING-6637
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>Assignee: Radu Cotescu
>
> Following code: 
> {code}
> 
> {code}
> You get now the following exception:
> {code}
> org.apache.sling.scripting.sightly.SightlyException: No use provider could 
> resolve identifier x/y/z
> {code}
> In practice you want to have a null-value assigned to x, now developers will 
> make a lot of checks to make sure the resource does exist.
> In addition we can log warning message when this happens.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Issue Comment Deleted] (SLING-6637) [htl] data-sly-use should not raise an exception when resource doesn't exist

2017-03-23 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6637?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser updated SLING-6637:

Comment: was deleted

(was: Reopening after discussing with [~gwalt])

> [htl] data-sly-use should not raise an exception when resource doesn't exist
> 
>
> Key: SLING-6637
> URL: https://issues.apache.org/jira/browse/SLING-6637
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>Assignee: Radu Cotescu
>
> Following code: 
> {code}
> 
> {code}
> You get now the following exception:
> {code}
> org.apache.sling.scripting.sightly.SightlyException: No use provider could 
> resolve identifier x/y/z
> {code}
> In practice you want to have a null-value assigned to x, now developers will 
> make a lot of checks to make sure the resource does exist.
> In addition we can log warning message when this happens.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (SLING-6637) [htl] data-sly-use should not raise an exception when resource doesn't exist

2017-03-23 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6637?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser updated SLING-6637:

Description: 
Following code: 

{code}

{code}

You get now the following exception:
{code}
org.apache.sling.scripting.sightly.SightlyException: No use provider could 
resolve identifier x/y/z
{code}

In practice you want to have a null-value assigned to x, now developers will 
make a lot of checks to make sure the resource does exist.

In addition we can log warning message when this happens.

  was:
Following code: 

{code}

{code}

You get now the following exception:
{code}
org.apache.sling.scripting.sightly.SightlyException: No use provider could 
resolve identifier x/y/z
{code}

In practice you want to have a null-value assigned to x, now developers will 
make a lot of checks to make sure the resource does exist.


> [htl] data-sly-use should not raise an exception when resource doesn't exist
> 
>
> Key: SLING-6637
> URL: https://issues.apache.org/jira/browse/SLING-6637
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>Assignee: Radu Cotescu
>
> Following code: 
> {code}
> 
> {code}
> You get now the following exception:
> {code}
> org.apache.sling.scripting.sightly.SightlyException: No use provider could 
> resolve identifier x/y/z
> {code}
> In practice you want to have a null-value assigned to x, now developers will 
> make a lot of checks to make sure the resource does exist.
> In addition we can log warning message when this happens.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Reopened] (SLING-6637) [htl] data-sly-use should not raise an exception when resource doesn't exist

2017-03-23 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6637?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser reopened SLING-6637:
-

Reopening after discussing with [~gwalt]

> [htl] data-sly-use should not raise an exception when resource doesn't exist
> 
>
> Key: SLING-6637
> URL: https://issues.apache.org/jira/browse/SLING-6637
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>Assignee: Radu Cotescu
>
> Following code: 
> {code}
> 
> {code}
> You get now the following exception:
> {code}
> org.apache.sling.scripting.sightly.SightlyException: No use provider could 
> resolve identifier x/y/z
> {code}
> In practice you want to have a null-value assigned to x, now developers will 
> make a lot of checks to make sure the resource does exist.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (SLING-6637) [htl] data-sly-use should not raise an exception when resource doesn't exist

2017-03-14 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6637:
-

thanks [~radu.cotescu] for your reply.
So in order to avoid this exception devs will need to check if the resource 
exists, what would be the best way for these use cases?

> [htl] data-sly-use should not raise an exception when resource doesn't exist
> 
>
> Key: SLING-6637
> URL: https://issues.apache.org/jira/browse/SLING-6637
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>Assignee: Radu Cotescu
>
> Following code: 
> {code}
> 
> {code}
> You get now the following exception:
> {code}
> org.apache.sling.scripting.sightly.SightlyException: No use provider could 
> resolve identifier x/y/z
> {code}
> In practice you want to have a null-value assigned to x, now developers will 
> make a lot of checks to make sure the resource does exist.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (SLING-6637) [htl] data-sly-use should not raise an exception when resource doesn't exist

2017-03-13 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6637?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser updated SLING-6637:

Summary: [htl] data-sly-use should not raise an exception when resource 
doesn't exist  (was: [htl] data-sly-use should not raise an exception where 
resource doesn't exist)

> [htl] data-sly-use should not raise an exception when resource doesn't exist
> 
>
> Key: SLING-6637
> URL: https://issues.apache.org/jira/browse/SLING-6637
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>
> Following code: 
> {code}
> 
> {code}
> You get now the following exception:
> {code}
> org.apache.sling.scripting.sightly.SightlyException: No use provider could 
> resolve identifier x/y/z
> {code}
> In practice you want to have a null-value assigned to x, now developers will 
> make a lot of checks to make sure the resource does exist.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (SLING-6637) [htl] data-sly-use should not raise an exception where resource doesn't exist

2017-03-13 Thread Feike Visser (JIRA)
Feike Visser created SLING-6637:
---

 Summary: [htl] data-sly-use should not raise an exception where 
resource doesn't exist
 Key: SLING-6637
 URL: https://issues.apache.org/jira/browse/SLING-6637
 Project: Sling
  Issue Type: Bug
  Components: Scripting
Reporter: Feike Visser


Following code: 

{code}

{code}

You get now the following exception:
{code}
org.apache.sling.scripting.sightly.SightlyException: No use provider could 
resolve identifier x/y/z
{code}

In practice you want to have a null-value assigned to x, now developers will 
make a lot of checks to make sure the resource does exist.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (SLING-6636) Access request-attributes directly in Sightly

2017-03-12 Thread Feike Visser (JIRA)
Feike Visser created SLING-6636:
---

 Summary: Access request-attributes directly in Sightly
 Key: SLING-6636
 URL: https://issues.apache.org/jira/browse/SLING-6636
 Project: Sling
  Issue Type: Improvement
  Components: Scripting
Reporter: Feike Visser


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']}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (SLING-6633) [sightly] NumberFormat should support String-properties with number value

2017-03-10 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6633?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser updated SLING-6633:

Issue Type: Improvement  (was: Bug)

> [sightly] NumberFormat should support String-properties with number value
> -
>
> Key: SLING-6633
> URL: https://issues.apache.org/jira/browse/SLING-6633
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>
> When a node-property is a String-type, but contains a numeric value then 
> there should be done a best effort to do a casting.
> {code}
> ${ '#.00' @ 
> format=linkPage['root/product-grid-container/product-grid/childDepth']}
> {code}
> It the moment the numberFormat is displayed.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (SLING-6633) [sightly] NumberFormat should support String-properties with number value

2017-03-10 Thread Feike Visser (JIRA)
Feike Visser created SLING-6633:
---

 Summary: [sightly] NumberFormat should support String-properties 
with number value
 Key: SLING-6633
 URL: https://issues.apache.org/jira/browse/SLING-6633
 Project: Sling
  Issue Type: Bug
  Components: Scripting
Reporter: Feike Visser


When a node-property is a String-type, but contains a numeric value then there 
should be done a best effort to do a casting.

{code}
${ '#.00' @ 
format=linkPage['root/product-grid-container/product-grid/childDepth']}
{code}

It the moment the numberFormat is displayed.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (SLING-6632) [sightly]NumberFormat is printed when format is empty

2017-03-10 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6632?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser updated SLING-6632:

Summary: [sightly]NumberFormat is printed when format is empty  (was: 
Number)

> [sightly]NumberFormat is printed when format is empty
> -
>
> Key: SLING-6632
> URL: https://issues.apache.org/jira/browse/SLING-6632
> Project: Sling
>  Issue Type: Bug
>Reporter: Feike Visser
>
> I have the following code:
> {code}
> ${ '#.00' @ 
> format=linkPage['root/product-grid-container/product-grid/childDepth']}
> {code}
> Now #.00 is displayed when @ format is empty.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (SLING-6632) Number

2017-03-10 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6632?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser updated SLING-6632:

Description: 
I have the following code:

{code}
${ '#.00' @ 
format=linkPage['root/product-grid-container/product-grid/childDepth']}
{code}

Now #.00 is displayed when @ format is empty.

> Number
> --
>
> Key: SLING-6632
> URL: https://issues.apache.org/jira/browse/SLING-6632
> Project: Sling
>  Issue Type: Bug
>Reporter: Feike Visser
>
> I have the following code:
> {code}
> ${ '#.00' @ 
> format=linkPage['root/product-grid-container/product-grid/childDepth']}
> {code}
> Now #.00 is displayed when @ format is empty.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (SLING-6632) Number

2017-03-10 Thread Feike Visser (JIRA)
Feike Visser created SLING-6632:
---

 Summary: Number
 Key: SLING-6632
 URL: https://issues.apache.org/jira/browse/SLING-6632
 Project: Sling
  Issue Type: Bug
Reporter: Feike Visser






--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (SLING-6504) Use-api also adaptable from ResourceResolver

2017-02-04 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6504:
-

I like your idea on this one, this would solve this completely and also for 
other objects.

> Use-api also adaptable from ResourceResolver
> 
>
> Key: SLING-6504
> URL: https://issues.apache.org/jira/browse/SLING-6504
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>  Labels: Sightly
>
> The current implementation of the Use-api accept classes that are adaptable 
> from Request or Resource. But in many cases it would also be great if they 
> can be adaptable from ResourceResolver.
> Now you need to write a small wrapper to get the resourceResolver and adapt 
> to the class.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (SLING-6504) Use-api also adaptable from ResourceResolver

2017-02-02 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6504:
-

That for me is more an implementation detail. 

I see now quite often classes that are adaptable from RR (like user-related 
classes).
Code must now be written for this to create a wrapper.

> Use-api also adaptable from ResourceResolver
> 
>
> Key: SLING-6504
> URL: https://issues.apache.org/jira/browse/SLING-6504
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>  Labels: Sightly
>
> The current implementation of the Use-api accept classes that are adaptable 
> from Request or Resource. But in many cases it would also be great if they 
> can be adaptable from ResourceResolver.
> Now you need to write a small wrapper to get the resourceResolver and adapt 
> to the class.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (SLING-6504) Use-api also adaptable from ResourceResolver

2017-02-02 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser updated SLING-6504:

Description: 
The current implementation of the Use-api accept classes that are adaptable 
from Request or Resource. But in many cases it would also be great if they can 
be adaptable from ResourceResolver.

Now you need to write a small wrapper to get the resourceResolver and adapt to 
the class.

  was:
The current implementation accept classes that are adaptable from Request or 
Resource. But in many cases it would also be great if they can be adaptable 
from ResourceResolver.

Now you need to write a small wrapper to get the resourceResolver and adapt to 
the class.


> Use-api also adaptable from ResourceResolver
> 
>
> Key: SLING-6504
> URL: https://issues.apache.org/jira/browse/SLING-6504
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>  Labels: Sightly
>
> The current implementation of the Use-api accept classes that are adaptable 
> from Request or Resource. But in many cases it would also be great if they 
> can be adaptable from ResourceResolver.
> Now you need to write a small wrapper to get the resourceResolver and adapt 
> to the class.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (SLING-6504) Use-api also adaptable from ResourceResolver

2017-02-02 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6504:
-

FYI [~radu.cotescu] [~vladb] [~gwalt]

> Use-api also adaptable from ResourceResolver
> 
>
> Key: SLING-6504
> URL: https://issues.apache.org/jira/browse/SLING-6504
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>  Labels: Sightly
>
> The current implementation accept classes that are adaptable from Request or 
> Resource. But in many cases it would also be great if they can be adaptable 
> from ResourceResolver.
> Now you need to write a small wrapper to get the resourceResolver and adapt 
> to the class.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (SLING-6504) Use-api also adaptable from ResourceResolver

2017-02-02 Thread Feike Visser (JIRA)
Feike Visser created SLING-6504:
---

 Summary: Use-api also adaptable from ResourceResolver
 Key: SLING-6504
 URL: https://issues.apache.org/jira/browse/SLING-6504
 Project: Sling
  Issue Type: Improvement
  Components: Scripting
Reporter: Feike Visser


The current implementation accept classes that are adaptable from Request or 
Resource. But in many cases it would also be great if they can be adaptable 
from ResourceResolver.

Now you need to write a small wrapper to get the resourceResolver and adapt to 
the class.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Resolved] (SLING-6490) Sightly doesn't render valid style attribute-value

2017-01-27 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser resolved SLING-6490.
-
Resolution: Won't Fix

> Sightly doesn't render valid style attribute-value
> --
>
> Key: SLING-6490
> URL: https://issues.apache.org/jira/browse/SLING-6490
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>Assignee: Radu Cotescu
>  Labels: Sightly
>
> I have the following piece of Java:
> {code}
> public class Style {
> public String style = "background-image: url('/path/to/image.jpg');";
> }
> {code}
> I can't get this value printed unless I use @ context = 'unsafe'
> {code}
> 
>   
> 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-6490) Sightly doesn't render valid style attribute-value

2017-01-27 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6490:
-

thanks [~vladb] :-)

> Sightly doesn't render valid style attribute-value
> --
>
> Key: SLING-6490
> URL: https://issues.apache.org/jira/browse/SLING-6490
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>Assignee: Radu Cotescu
>  Labels: Sightly
>
> I have the following piece of Java:
> {code}
> public class Style {
> public String style = "background-image: url('/path/to/image.jpg');";
> }
> {code}
> I can't get this value printed unless I use @ context = 'unsafe'
> {code}
> 
>   
> 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-6490) Sightly doesn't render valid style attribute-value

2017-01-27 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6490:
-

[~radu.cotescu] thanks for your comment, indeed [~vladb] had a good point on 
sanitising JS/CSS.
Still I don't get it to work. See my example.

> Sightly doesn't render valid style attribute-value
> --
>
> Key: SLING-6490
> URL: https://issues.apache.org/jira/browse/SLING-6490
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>Assignee: Radu Cotescu
>  Labels: Sightly
>
> I have the following piece of Java:
> {code}
> public class Style {
> public String style = "background-image: url('/path/to/image.jpg');";
> }
> {code}
> I can't get this value printed unless I use @ context = 'unsafe'
> {code}
> 
>   
> 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Reopened] (SLING-6490) Sightly doesn't render valid style attribute-value

2017-01-27 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser reopened SLING-6490:
-

Please check my latest comment..

> Sightly doesn't render valid style attribute-value
> --
>
> Key: SLING-6490
> URL: https://issues.apache.org/jira/browse/SLING-6490
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>Assignee: Radu Cotescu
>  Labels: Sightly
>
> I have the following piece of Java:
> {code}
> public class Style {
> public String style = "background-image: url('/path/to/image.jpg');";
> }
> {code}
> I can't get this value printed unless I use @ context = 'unsafe'
> {code}
> 
>   
> 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-6490) Sightly doesn't render valid style attribute-value

2017-01-27 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6490:
-

tested this, but the file-location gets wrongly escaped now:

{code}
'\2f content\2f dam\2fwe-retail\2f en\2f experiences\2f 
arctic-surfing-in-lofoten\2f camp-fire.jpg'
{code}

Sightly syntax:
{code}
 style="backgroundimage: url('${ fv.style @ context='styleString'}')
{code}

Java:
{code}
public class Style {

public String style = 
"/content/dam/we-retail/en/experiences/arctic-surfing-in-lofoten/camp-fire.jpg";

}
{code}

> Sightly doesn't render valid style attribute-value
> --
>
> Key: SLING-6490
> URL: https://issues.apache.org/jira/browse/SLING-6490
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>Assignee: Radu Cotescu
>  Labels: Sightly
>
> I have the following piece of Java:
> {code}
> public class Style {
> public String style = "background-image: url('/path/to/image.jpg');";
> }
> {code}
> I can't get this value printed unless I use @ context = 'unsafe'
> {code}
> 
>   
> 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (SLING-6490) Sightly doesn't render valid style attribute-value

2017-01-27 Thread Feike Visser (JIRA)

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

Feike Visser edited comment on SLING-6490 at 1/27/17 12:46 PM:
---

[~vladb] But also things like styleString isn't working.


was (Author: fvisser):
But also things like styleString isn't working.

> Sightly doesn't render valid style attribute-value
> --
>
> Key: SLING-6490
> URL: https://issues.apache.org/jira/browse/SLING-6490
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>  Labels: Sightly
>
> I have the following piece of Java:
> {code}
> public class Style {
> public String style = "background-image: url('/path/to/image.jpg');";
> }
> {code}
> I can't get this value printed unless I use @ context = 'unsafe'
> {code}
> 
>   
> 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-6490) Sightly doesn't render valid style attribute-value

2017-01-27 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6490:
-

But also things like styleString isn't working.

> Sightly doesn't render valid style attribute-value
> --
>
> Key: SLING-6490
> URL: https://issues.apache.org/jira/browse/SLING-6490
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>  Labels: Sightly
>
> I have the following piece of Java:
> {code}
> public class Style {
> public String style = "background-image: url('/path/to/image.jpg');";
> }
> {code}
> I can't get this value printed unless I use @ context = 'unsafe'
> {code}
> 
>   
> 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (SLING-6490) Sightly doesn't render valid style attribute-value

2017-01-27 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser updated SLING-6490:

Labels: Sightly  (was: )

> Sightly doesn't render valid style attribute-value
> --
>
> Key: SLING-6490
> URL: https://issues.apache.org/jira/browse/SLING-6490
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>  Labels: Sightly
>
> I have the following piece of Java:
> {code}
> public class Style {
> public String style = "background-image: url('/path/to/image.jpg');";
> }
> {code}
> I can't get this value printed unless I use @ context = 'unsafe'
> {code}
> 
>   
> 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-6490) Sightly doesn't render valid style attribute-value

2017-01-27 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6490:
-

FYI: [~vladb], any idea?

> Sightly doesn't render valid style attribute-value
> --
>
> Key: SLING-6490
> URL: https://issues.apache.org/jira/browse/SLING-6490
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>
> I have the following piece of Java:
> {code}
> public class Style {
> public String style = "background-image: url('/path/to/image.jpg');";
> }
> {code}
> I can't get this value printed unless I use @ context = 'unsafe'
> {code}
> 
>   
> 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (SLING-6490) Sightly doesn't render valid style attribute-value

2017-01-27 Thread Feike Visser (JIRA)
Feike Visser created SLING-6490:
---

 Summary: Sightly doesn't render valid style attribute-value
 Key: SLING-6490
 URL: https://issues.apache.org/jira/browse/SLING-6490
 Project: Sling
  Issue Type: Bug
  Components: Scripting
Reporter: Feike Visser


I have the following piece of Java:

{code}
public class Style {

public String style = "background-image: url('/path/to/image.jpg');";
}
{code}

I can't get this value printed unless I use @ context = 'unsafe'
{code}

  

{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-6428) DateFormat is printed when date-value is empty

2016-12-22 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6428:
-

FYI: [~vladb] [~gwalt]

> DateFormat is printed when date-value is empty
> --
>
> Key: SLING-6428
> URL: https://issues.apache.org/jira/browse/SLING-6428
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>
> When the format-value emtpy, the date-format is printed.
> Example
> {code}
> 
> ${'-MM-dd' @ format=date1}
> 
> {code}
> In my view the date-format should not be printed, never.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (SLING-6428) DateFormat is printen when date-value is empty

2016-12-22 Thread Feike Visser (JIRA)
Feike Visser created SLING-6428:
---

 Summary: DateFormat is printen when date-value is empty
 Key: SLING-6428
 URL: https://issues.apache.org/jira/browse/SLING-6428
 Project: Sling
  Issue Type: Bug
  Components: Scripting
Reporter: Feike Visser


When the format-value emtpy, the date-format is printed.

Example
{code}

${'-MM-dd' @ format=date1}

{code}

In my view the date-format should not be printed, never.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (SLING-6428) DateFormat is printed when date-value is empty

2016-12-22 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser updated SLING-6428:

Summary: DateFormat is printed when date-value is empty  (was: DateFormat 
is printen when date-value is empty)

> DateFormat is printed when date-value is empty
> --
>
> Key: SLING-6428
> URL: https://issues.apache.org/jira/browse/SLING-6428
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Feike Visser
>
> When the format-value emtpy, the date-format is printed.
> Example
> {code}
> 
> ${'-MM-dd' @ format=date1}
> 
> {code}
> In my view the date-format should not be printed, never.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-6102) Adding formatter to HTL/Sightly dates

2016-11-16 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6102:
-

hi all,

As I am quite new to the whole open-source, what is happening next?
Should I do something before it gets merged?

> Adding formatter to HTL/Sightly dates
> -
>
> Key: SLING-6102
> URL: https://issues.apache.org/jira/browse/SLING-6102
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>Assignee: Radu Cotescu
>
> When using Sightly we are missing functionality to format dates.
> Proposed solution:
> {code}
> @ dateFormat = ''
> {code}
> format used can be found in : 
> http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html
> The value to be formatted must be specified via a Date-type (Date,Calendar 
> etc)
> Example
> {code}
> 
>   ${ dateV @ dateFormat='dd/MM/'}
>   ${ obj.jsdate @ dateFormat='dd/MM/'}
>   ${ properties.jcr:created  @ dateFormat='dd/MM/' }
>   ${ obj.jsdate @ dateFormat='dd/MMM/', locale='ko_KR' } // korean locale
>   ${ obj.jsdate @ dateFormat='dd/MMM/', locale='fr_FR' } // french locale
>   ${ obj.jsdate @ dateFormat='dd/MMM/' } // locale from request
>   ${ obj.jsdate @ dateFormat='dd/MMM/ HH', locale='fr_FR', timezone='PST' 
> } // french locale, timezone set to PST
>   ${ obj.jsdate @ dateFormat='dd/MMM/ HH', timezone='CTT' } // timezone 
> set to CTT
> 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5750) Dynamically load different component renditions

2016-11-03 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-5750:
-

Happy to receive comments on my PR: https://github.com/apache/sling/pull/184

> Dynamically load different component renditions
> ---
>
> Key: SLING-5750
> URL: https://issues.apache.org/jira/browse/SLING-5750
> Project: Sling
>  Issue Type: Improvement
>  Components: Commons
>Reporter: Feike Visser
>
> In the current setup in Sling there is 1:1 relation between a component and 
> the code that implements this components.
> In a multi-tenant/multi-brand environment you have a need to switch this 
> dynamically based on the tenant that you are in.
> Example
> [default]
> Component A -> /apps/components/componeneta/componeneta.html
> [Tenant A]
> Component A -> /apps/tenanta/componeneta.html
> [Tenant B]
> Component A -> /apps/tenantb/componeneta.html
> Content structure
> /tenanta/
>  property: sling:scriptFolder -> /apps/tenanta
> /tenantb/
>  property: sling:scriptFolder -> /apps/tenantb
> Suggestion: If we would implement a dynamic search path the implementation 
> can choose itself where to point to when we are in a multi-tenant environment.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (SLING-5750) Dynamically load different component renditions

2016-11-03 Thread Feike Visser (JIRA)

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

Feike Visser edited comment on SLING-5750 at 11/3/16 12:00 PM:
---

Switching to determine the redirection via OSGi-configs. It is quite resource 
intense to check the paths every time.


was (Author: fvisser):
Switching to determine the redirection via configs. It is quite resource 
intense to check the paths everytime.

> Dynamically load different component renditions
> ---
>
> Key: SLING-5750
> URL: https://issues.apache.org/jira/browse/SLING-5750
> Project: Sling
>  Issue Type: Improvement
>  Components: Commons
>Reporter: Feike Visser
>
> In the current setup in Sling there is 1:1 relation between a component and 
> the code that implements this components.
> In a multi-tenant/multi-brand environment you have a need to switch this 
> dynamically based on the tenant that you are in.
> Example
> [default]
> Component A -> /apps/components/componeneta/componeneta.html
> [Tenant A]
> Component A -> /apps/tenanta/componeneta.html
> [Tenant B]
> Component A -> /apps/tenantb/componeneta.html
> Content structure
> /tenanta/
>  property: sling:scriptFolder -> /apps/tenanta
> /tenantb/
>  property: sling:scriptFolder -> /apps/tenantb
> Suggestion: If we would implement a dynamic search path the implementation 
> can choose itself where to point to when we are in a multi-tenant environment.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5750) Dynamically load different component renditions

2016-11-03 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-5750:
-

Switching to determine the redirection via configs. It is quite resource 
intense to check the paths everytime.

> Dynamically load different component renditions
> ---
>
> Key: SLING-5750
> URL: https://issues.apache.org/jira/browse/SLING-5750
> Project: Sling
>  Issue Type: Improvement
>  Components: Commons
>Reporter: Feike Visser
>
> In the current setup in Sling there is 1:1 relation between a component and 
> the code that implements this components.
> In a multi-tenant/multi-brand environment you have a need to switch this 
> dynamically based on the tenant that you are in.
> Example
> [default]
> Component A -> /apps/components/componeneta/componeneta.html
> [Tenant A]
> Component A -> /apps/tenanta/componeneta.html
> [Tenant B]
> Component A -> /apps/tenantb/componeneta.html
> Content structure
> /tenanta/
>  property: sling:scriptFolder -> /apps/tenanta
> /tenantb/
>  property: sling:scriptFolder -> /apps/tenantb
> Suggestion: If we would implement a dynamic search path the implementation 
> can choose itself where to point to when we are in a multi-tenant environment.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-6140) Adding number formatting to Sightly/HTL

2016-11-01 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6140:
-

thanks, should we create a separate formatter for currencies? Or add an extra 
option?

> Adding number formatting to Sightly/HTL
> ---
>
> Key: SLING-6140
> URL: https://issues.apache.org/jira/browse/SLING-6140
> Project: Sling
>  Issue Type: New Feature
>  Components: Scripting
>Reporter: Feike Visser
>
> Ability to properly format numbers in Sightly/HTL
> Proposed usages:
> {code}
> ${ 100 @ numberFormat = '.00' , locale = 'en_US'}
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (SLING-6140) Adding number formatting to Sightly/HTL

2016-11-01 Thread Feike Visser (JIRA)

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

Feike Visser edited comment on SLING-6140 at 11/1/16 11:47 AM:
---

Had a look at 
https://docs.oracle.com/javase/7/docs/api/java/text/NumberFormat.html, this 
also has support for Locales.
DecimalFormat as suggested by [~jsedding] looks still as the best option.


was (Author: fvisser):
Had a look at 
https://docs.oracle.com/javase/7/docs/api/java/text/NumberFormat.html, this 
also has support for Locales

> Adding number formatting to Sightly/HTL
> ---
>
> Key: SLING-6140
> URL: https://issues.apache.org/jira/browse/SLING-6140
> Project: Sling
>  Issue Type: New Feature
>  Components: Scripting
>Reporter: Feike Visser
>
> Ability to properly format numbers in Sightly/HTL
> Proposed usages:
> {code}
> ${ 100 @ numberFormat = '.00' , locale = 'en_US'}
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-6140) Adding number formatting to Sightly/HTL

2016-11-01 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6140:
-

Had a look at 
https://docs.oracle.com/javase/7/docs/api/java/text/NumberFormat.html, this 
also has support for Locales

> Adding number formatting to Sightly/HTL
> ---
>
> Key: SLING-6140
> URL: https://issues.apache.org/jira/browse/SLING-6140
> Project: Sling
>  Issue Type: New Feature
>  Components: Scripting
>Reporter: Feike Visser
>
> Ability to properly format numbers in Sightly/HTL
> Proposed usages:
> {code}
> ${ 100 @ numberFormat = '.00' }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (SLING-6140) Adding number formatting to Sightly/HTL

2016-11-01 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser updated SLING-6140:

Description: 
Ability to properly format numbers in Sightly/HTL

Proposed usages:

{code}
${ 100 @ numberFormat = '.00' , locale = 'en_US'}
{code}



  was:
Ability to properly format numbers in Sightly/HTL

Proposed usages:

{code}
${ 100 @ numberFormat = '.00' }
{code}




> Adding number formatting to Sightly/HTL
> ---
>
> Key: SLING-6140
> URL: https://issues.apache.org/jira/browse/SLING-6140
> Project: Sling
>  Issue Type: New Feature
>  Components: Scripting
>Reporter: Feike Visser
>
> Ability to properly format numbers in Sightly/HTL
> Proposed usages:
> {code}
> ${ 100 @ numberFormat = '.00' , locale = 'en_US'}
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5750) Dynamically load different component renditions

2016-10-28 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-5750:
-

You are right! I misunderstood the approach, indeed this is much simpler.
Thanks [~justin.edel...@mtvi.com]

> Dynamically load different component renditions
> ---
>
> Key: SLING-5750
> URL: https://issues.apache.org/jira/browse/SLING-5750
> Project: Sling
>  Issue Type: Improvement
>  Components: Commons
>Reporter: Feike Visser
>
> In the current setup in Sling there is 1:1 relation between a component and 
> the code that implements this components.
> In a multi-tenant/multi-brand environment you have a need to switch this 
> dynamically based on the tenant that you are in.
> Example
> [default]
> Component A -> /apps/components/componeneta/componeneta.html
> [Tenant A]
> Component A -> /apps/tenanta/componeneta.html
> [Tenant B]
> Component A -> /apps/tenantb/componeneta.html
> Content structure
> /tenanta/
>  property: sling:scriptFolder -> /apps/tenanta
> /tenantb/
>  property: sling:scriptFolder -> /apps/tenantb
> Suggestion: If we would implement a dynamic search path the implementation 
> can choose itself where to point to when we are in a multi-tenant environment.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (SLING-5750) Dynamically load different component renditions

2016-10-28 Thread Feike Visser (JIRA)

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

Feike Visser edited comment on SLING-5750 at 10/28/16 1:27 PM:
---

WIP: https://github.com/heervisscher/sling/tree/SLING-5750

PR: https://github.com/apache/sling/pull/184


was (Author: fvisser):
WIP: https://github.com/heervisscher/sling/tree/SLING-5750

> Dynamically load different component renditions
> ---
>
> Key: SLING-5750
> URL: https://issues.apache.org/jira/browse/SLING-5750
> Project: Sling
>  Issue Type: Improvement
>  Components: Commons
>Reporter: Feike Visser
>
> In the current setup in Sling there is 1:1 relation between a component and 
> the code that implements this components.
> In a multi-tenant/multi-brand environment you have a need to switch this 
> dynamically based on the tenant that you are in.
> Example
> [default]
> Component A -> /apps/components/componeneta/componeneta.html
> [Tenant A]
> Component A -> /apps/tenanta/componeneta.html
> [Tenant B]
> Component A -> /apps/tenantb/componeneta.html
> Content structure
> /tenanta/
>  property: sling:scriptFolder -> /apps/tenanta
> /tenantb/
>  property: sling:scriptFolder -> /apps/tenantb
> Suggestion: If we would implement a dynamic search path the implementation 
> can choose itself where to point to when we are in a multi-tenant environment.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (SLING-5750) Dynamically load different component renditions

2016-10-28 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-5750?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser updated SLING-5750:

Summary: Dynamically load different component renditions  (was: Dynamic 
search path to load dynamically different component renditions)

> Dynamically load different component renditions
> ---
>
> Key: SLING-5750
> URL: https://issues.apache.org/jira/browse/SLING-5750
> Project: Sling
>  Issue Type: Improvement
>  Components: Commons
>Reporter: Feike Visser
>
> In the current setup in Sling there is 1:1 relation between a component and 
> the code that implements this components.
> In a multi-tenant/multi-brand environment you have a need to switch this 
> dynamically based on the tenant that you are in.
> Example
> [default]
> Component A -> /apps/components/componeneta/componeneta.html
> [Tenant A]
> Component A -> /apps/tenanta/componeneta.html
> [Tenant B]
> Component A -> /apps/tenantb/componeneta.html
> Content structure
> /tenanta/
>  sling:scriptFolder -> /apps/tenanta
> /tenantb/
>  sling:scriptFolder -> /apps/tenantb
> Suggestion: If we would implement a dynamic search path the implementation 
> can choose itself where to point to when we are in a multi-tenant environment.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (SLING-5750) Dynamically load different component renditions

2016-10-28 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-5750?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser updated SLING-5750:

Description: 
In the current setup in Sling there is 1:1 relation between a component and the 
code that implements this components.
In a multi-tenant/multi-brand environment you have a need to switch this 
dynamically based on the tenant that you are in.

Example
[default]
Component A -> /apps/components/componeneta/componeneta.html
[Tenant A]
Component A -> /apps/tenanta/componeneta.html
[Tenant B]
Component A -> /apps/tenantb/componeneta.html

Content structure

/tenanta/
 property: sling:scriptFolder -> /apps/tenanta

/tenantb/
 property: sling:scriptFolder -> /apps/tenantb


Suggestion: If we would implement a dynamic search path the implementation can 
choose itself where to point to when we are in a multi-tenant environment.

  was:
In the current setup in Sling there is 1:1 relation between a component and the 
code that implements this components.
In a multi-tenant/multi-brand environment you have a need to switch this 
dynamically based on the tenant that you are in.

Example
[default]
Component A -> /apps/components/componeneta/componeneta.html
[Tenant A]
Component A -> /apps/tenanta/componeneta.html
[Tenant B]
Component A -> /apps/tenantb/componeneta.html

Content structure

/tenanta/
 sling:scriptFolder -> /apps/tenanta

/tenantb/
 sling:scriptFolder -> /apps/tenantb


Suggestion: If we would implement a dynamic search path the implementation can 
choose itself where to point to when we are in a multi-tenant environment.


> Dynamically load different component renditions
> ---
>
> Key: SLING-5750
> URL: https://issues.apache.org/jira/browse/SLING-5750
> Project: Sling
>  Issue Type: Improvement
>  Components: Commons
>Reporter: Feike Visser
>
> In the current setup in Sling there is 1:1 relation between a component and 
> the code that implements this components.
> In a multi-tenant/multi-brand environment you have a need to switch this 
> dynamically based on the tenant that you are in.
> Example
> [default]
> Component A -> /apps/components/componeneta/componeneta.html
> [Tenant A]
> Component A -> /apps/tenanta/componeneta.html
> [Tenant B]
> Component A -> /apps/tenantb/componeneta.html
> Content structure
> /tenanta/
>  property: sling:scriptFolder -> /apps/tenanta
> /tenantb/
>  property: sling:scriptFolder -> /apps/tenantb
> Suggestion: If we would implement a dynamic search path the implementation 
> can choose itself where to point to when we are in a multi-tenant environment.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5750) Dynamic search path to load dynamically different component renditions

2016-10-28 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-5750:
-

WIP: https://github.com/heervisscher/sling/tree/SLING-5750

> Dynamic search path to load dynamically different component renditions
> --
>
> Key: SLING-5750
> URL: https://issues.apache.org/jira/browse/SLING-5750
> Project: Sling
>  Issue Type: Improvement
>  Components: Commons
>Reporter: Feike Visser
>
> In the current setup in Sling there is 1:1 relation between a component and 
> the code that implements this components.
> In a multi-tenant/multi-brand environment you have a need to switch this 
> dynamically based on the tenant that you are in.
> Example
> [default]
> Component A -> /apps/components/componeneta/componeneta.html
> [Tenant A]
> Component A -> /apps/tenanta/componeneta.html
> [Tenant B]
> Component A -> /apps/tenantb/componeneta.html
> Content structure
> /tenanta/
>  sling:scriptFolder -> /apps/tenanta
> /tenantb/
>  sling:scriptFolder -> /apps/tenantb
> Suggestion: If we would implement a dynamic search path the implementation 
> can choose itself where to point to when we are in a multi-tenant environment.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5750) Dynamic search path to load dynamically different component renditions

2016-10-28 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-5750:
-

What I have seen is that this approach works for first time a script is being 
resolved.
eg /apps/x/y --> /apps/layout2, second time I don't see it being invoked.

> Dynamic search path to load dynamically different component renditions
> --
>
> Key: SLING-5750
> URL: https://issues.apache.org/jira/browse/SLING-5750
> Project: Sling
>  Issue Type: Improvement
>  Components: Commons
>Reporter: Feike Visser
>
> In the current setup in Sling there is 1:1 relation between a component and 
> the code that implements this components.
> In a multi-tenant/multi-brand environment you have a need to switch this 
> dynamically based on the tenant that you are in.
> Example
> [default]
> Component A -> /apps/components/componeneta/componeneta.html
> [Tenant A]
> Component A -> /apps/tenanta/componeneta.html
> [Tenant B]
> Component A -> /apps/tenantb/componeneta.html
> Content structure
> /tenanta/
>  sling:scriptFolder -> /apps/tenanta
> /tenantb/
>  sling:scriptFolder -> /apps/tenantb
> Suggestion: If we would implement a dynamic search path the implementation 
> can choose itself where to point to when we are in a multi-tenant environment.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5750) Dynamic search path to load dynamically different component renditions

2016-10-28 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-5750:
-

I am nicely progressing via the ResourceDecorator route.
So far the caching for the scripts we need to have another look at

> Dynamic search path to load dynamically different component renditions
> --
>
> Key: SLING-5750
> URL: https://issues.apache.org/jira/browse/SLING-5750
> Project: Sling
>  Issue Type: Improvement
>  Components: Commons
>Reporter: Feike Visser
>
> In the current setup in Sling there is 1:1 relation between a component and 
> the code that implements this components.
> In a multi-tenant/multi-brand environment you have a need to switch this 
> dynamically based on the tenant that you are in.
> Example
> [default]
> Component A -> /apps/components/componeneta/componeneta.html
> [Tenant A]
> Component A -> /apps/tenanta/componeneta.html
> [Tenant B]
> Component A -> /apps/tenantb/componeneta.html
> Content structure
> /tenanta/
>  sling:scriptFolder -> /apps/tenanta
> /tenantb/
>  sling:scriptFolder -> /apps/tenantb
> Suggestion: If we would implement a dynamic search path the implementation 
> can choose itself where to point to when we are in a multi-tenant environment.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5750) Dynamic search path to load dynamically different component renditions

2016-10-27 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-5750:
-

hi [~cziegeler],

Is there anyway in the ResourceDecorator to get info about the 
requesting-resource?
To know if /apps/x is requested in the context of /content/x or /content/y

> Dynamic search path to load dynamically different component renditions
> --
>
> Key: SLING-5750
> URL: https://issues.apache.org/jira/browse/SLING-5750
> Project: Sling
>  Issue Type: Improvement
>  Components: Commons
>Reporter: Feike Visser
>
> In the current setup in Sling there is 1:1 relation between a component and 
> the code that implements this components.
> In a multi-tenant/multi-brand environment you have a need to switch this 
> dynamically based on the tenant that you are in.
> Example
> [default]
> Component A -> /apps/components/componeneta/componeneta.html
> [Tenant A]
> Component A -> /apps/tenanta/componeneta.html
> [Tenant B]
> Component A -> /apps/tenantb/componeneta.html
> Content structure
> /tenanta/
>  sling:scriptFolder -> /apps/tenanta
> /tenantb/
>  sling:scriptFolder -> /apps/tenantb
> Suggestion: If we would implement a dynamic search path the implementation 
> can choose itself where to point to when we are in a multi-tenant environment.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5750) Dynamic search path to load dynamically different component renditions

2016-10-26 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-5750:
-

Great! Let me try this, great recommendation!

> Dynamic search path to load dynamically different component renditions
> --
>
> Key: SLING-5750
> URL: https://issues.apache.org/jira/browse/SLING-5750
> Project: Sling
>  Issue Type: Improvement
>  Components: Commons
>Reporter: Feike Visser
>
> In the current setup in Sling there is 1:1 relation between a component and 
> the code that implements this components.
> In a multi-tenant/multi-brand environment you have a need to switch this 
> dynamically based on the tenant that you are in.
> Example
> [default]
> Component A -> /apps/components/componeneta/componeneta.html
> [Tenant A]
> Component A -> /apps/tenanta/componeneta.html
> [Tenant B]
> Component A -> /apps/tenantb/componeneta.html
> Content structure
> /tenanta/
>  sling:scriptFolder -> /apps/tenanta
> /tenantb/
>  sling:scriptFolder -> /apps/tenantb
> Suggestion: If we would implement a dynamic search path the implementation 
> can choose itself where to point to when we are in a multi-tenant environment.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5750) Dynamic search path to load dynamically different component renditions

2016-10-26 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-5750:
-

That indeed a great way. 
Only thing is that I don't know what would be the best place/hook to implement 
this ResourceDecorator, to make sure it is called during script-resolution?

> Dynamic search path to load dynamically different component renditions
> --
>
> Key: SLING-5750
> URL: https://issues.apache.org/jira/browse/SLING-5750
> Project: Sling
>  Issue Type: Improvement
>  Components: Commons
>Reporter: Feike Visser
>
> In the current setup in Sling there is 1:1 relation between a component and 
> the code that implements this components.
> In a multi-tenant/multi-brand environment you have a need to switch this 
> dynamically based on the tenant that you are in.
> Example
> [default]
> Component A -> /apps/components/componeneta/componeneta.html
> [Tenant A]
> Component A -> /apps/tenanta/componeneta.html
> [Tenant B]
> Component A -> /apps/tenantb/componeneta.html
> Content structure
> /tenanta/
>  sling:scriptFolder -> /apps/tenanta
> /tenantb/
>  sling:scriptFolder -> /apps/tenantb
> Suggestion: If we would implement a dynamic search path the implementation 
> can choose itself where to point to when we are in a multi-tenant environment.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (SLING-5750) Dynamic search path to load dynamically different component renditions

2016-10-26 Thread Feike Visser (JIRA)

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

Feike Visser edited comment on SLING-5750 at 10/26/16 8:52 PM:
---

That is indeed a great way. 
Only thing is that I don't know what would be the best place/hook to implement 
this ResourceDecorator, to make sure it is called during script-resolution?


was (Author: fvisser):
That indeed a great way. 
Only thing is that I don't know what would be the best place/hook to implement 
this ResourceDecorator, to make sure it is called during script-resolution?

> Dynamic search path to load dynamically different component renditions
> --
>
> Key: SLING-5750
> URL: https://issues.apache.org/jira/browse/SLING-5750
> Project: Sling
>  Issue Type: Improvement
>  Components: Commons
>Reporter: Feike Visser
>
> In the current setup in Sling there is 1:1 relation between a component and 
> the code that implements this components.
> In a multi-tenant/multi-brand environment you have a need to switch this 
> dynamically based on the tenant that you are in.
> Example
> [default]
> Component A -> /apps/components/componeneta/componeneta.html
> [Tenant A]
> Component A -> /apps/tenanta/componeneta.html
> [Tenant B]
> Component A -> /apps/tenantb/componeneta.html
> Content structure
> /tenanta/
>  sling:scriptFolder -> /apps/tenanta
> /tenantb/
>  sling:scriptFolder -> /apps/tenantb
> Suggestion: If we would implement a dynamic search path the implementation 
> can choose itself where to point to when we are in a multi-tenant environment.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (SLING-5750) Dynamic search path to load dynamically different component renditions

2016-10-26 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-5750?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser updated SLING-5750:

Description: 
In the current setup in Sling there is 1:1 relation between a component and the 
code that implements this components.
In a multi-tenant/multi-brand environment you have a need to switch this 
dynamically based on the tenant that you are in.

Example
[default]
Component A -> /apps/components/componeneta/componeneta.html
[Tenant A]
Component A -> /apps/tenanta/componeneta.html
[Tenant B]
Component A -> /apps/tenantb/componeneta.html

Content structure

/tenanta/
 sling:scriptFolder -> /apps/tenanta

/tenantb/
 sling:scriptFolder -> /apps/tenantb


Suggestion: If we would implement a dynamic search path the implementation can 
choose itself where to point to when we are in a multi-tenant environment.

  was:
In the current setup in Sling there is 1:1 relation between a component and the 
code that implements this components.
In a multi-tenant/multi-brand environment you have a need to switch this 
dynamically based on the tenant that you are in.

Example
[default]
Component A -> /apps/components/componeneta/componeneta.html
[Tenant A]
Component A -> /apps/tenanta/componeneta.html
[Tenant B]
Component A -> /apps/tenantb/componeneta.html

Content structure

/tenanta/
 sling:scriptFolder -> /apps/tenanta

/tenantb/
 sling:scriptFolder -> /apps/tenantb


If we would implement a dynamic search path the implementation can choose 
itself where to point to when we are in a multi-tenant environment.


> Dynamic search path to load dynamically different component renditions
> --
>
> Key: SLING-5750
> URL: https://issues.apache.org/jira/browse/SLING-5750
> Project: Sling
>  Issue Type: Improvement
>  Components: Commons
>Reporter: Feike Visser
>
> In the current setup in Sling there is 1:1 relation between a component and 
> the code that implements this components.
> In a multi-tenant/multi-brand environment you have a need to switch this 
> dynamically based on the tenant that you are in.
> Example
> [default]
> Component A -> /apps/components/componeneta/componeneta.html
> [Tenant A]
> Component A -> /apps/tenanta/componeneta.html
> [Tenant B]
> Component A -> /apps/tenantb/componeneta.html
> Content structure
> /tenanta/
>  sling:scriptFolder -> /apps/tenanta
> /tenantb/
>  sling:scriptFolder -> /apps/tenantb
> Suggestion: If we would implement a dynamic search path the implementation 
> can choose itself where to point to when we are in a multi-tenant environment.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5750) Dynamic search path to load dynamically different component renditions

2016-10-26 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-5750:
-

hi [~cziegeler], thanks for your feedback.

For me dynamic search path is just a mean, not the goal.
I want to be able to switch to different apps-folders based on the content-tree.
As you see in the issue-description /tenanta points to /apps/tenanta etc
Almost like a precedence thing.

> Dynamic search path to load dynamically different component renditions
> --
>
> Key: SLING-5750
> URL: https://issues.apache.org/jira/browse/SLING-5750
> Project: Sling
>  Issue Type: Improvement
>  Components: Commons
>Reporter: Feike Visser
>
> In the current setup in Sling there is 1:1 relation between a component and 
> the code that implements this components.
> In a multi-tenant/multi-brand environment you have a need to switch this 
> dynamically based on the tenant that you are in.
> Example
> [default]
> Component A -> /apps/components/componeneta/componeneta.html
> [Tenant A]
> Component A -> /apps/tenanta/componeneta.html
> [Tenant B]
> Component A -> /apps/tenantb/componeneta.html
> Content structure
> /tenanta/
>  sling:scriptFolder -> /apps/tenanta
> /tenantb/
>  sling:scriptFolder -> /apps/tenantb
> If we would implement a dynamic search path the implementation can choose 
> itself where to point to when we are in a multi-tenant environment.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (SLING-5750) Dynamic search path to load dynamically different component renditions

2016-10-26 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-5750?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser updated SLING-5750:

Description: 
In the current setup in Sling there is 1:1 relation between a component and the 
code that implements this components.
In a multi-tenant/multi-brand environment you have a need to switch this 
dynamically based on the tenant that you are in.

Example
[default]
Component A -> /apps/components/componeneta/componeneta.html
[Tenant A]
Component A -> /apps/tenanta/componeneta.html
[Tenant B]
Component A -> /apps/tenantb/componeneta.html

Content structure

/tenanta/
 sling:scriptFolder -> /apps/tenanta

/tenantb/
 sling:scriptFolder -> /apps/tenantb


If we would implement a dynamic search path the implementation can choose 
itself where to point to when we are in a multi-tenant environment.

  was:
In the current setup in Sling there is 1:1 relation between a component and the 
code that implements this components.
In a multi-tenant/multi-brand environment you have a need to switch this 
dynamically based on the tenant that you are in.

Example
[default]
Component A -> /apps/components/componeneta/componeneta.html
[Tenant A]
Component A -> /apps/tenanta/componeneta.html
[Tenant B]
Component A -> /apps/tenantb/componeneta.html

If we would implement a dynamic search path the implementation can choose 
itself where to point to when we are in a multi-tenant environment.


> Dynamic search path to load dynamically different component renditions
> --
>
> Key: SLING-5750
> URL: https://issues.apache.org/jira/browse/SLING-5750
> Project: Sling
>  Issue Type: Improvement
>  Components: Commons
>Reporter: Feike Visser
>
> In the current setup in Sling there is 1:1 relation between a component and 
> the code that implements this components.
> In a multi-tenant/multi-brand environment you have a need to switch this 
> dynamically based on the tenant that you are in.
> Example
> [default]
> Component A -> /apps/components/componeneta/componeneta.html
> [Tenant A]
> Component A -> /apps/tenanta/componeneta.html
> [Tenant B]
> Component A -> /apps/tenantb/componeneta.html
> Content structure
> /tenanta/
>  sling:scriptFolder -> /apps/tenanta
> /tenantb/
>  sling:scriptFolder -> /apps/tenantb
> If we would implement a dynamic search path the implementation can choose 
> itself where to point to when we are in a multi-tenant environment.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (SLING-6102) Adding formatter to HTL/Sightly dates

2016-10-20 Thread Feike Visser (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-6102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feike Visser updated SLING-6102:

Description: 
When using Sightly we are missing functionality to format dates.

Proposed solution:
{code}
@ dateFormat = ''
{code}

format used can be found in : 
http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html

The value to be formatted must be specified via a Date-type (Date,Calendar etc)

Example
{code}


  ${ dateV @ dateFormat='dd/MM/'}
  ${ obj.jsdate @ dateFormat='dd/MM/'}
  ${ properties.jcr:created  @ dateFormat='dd/MM/' }

  ${ obj.jsdate @ dateFormat='dd/MMM/', locale='ko_KR' } // korean locale
  ${ obj.jsdate @ dateFormat='dd/MMM/', locale='fr_FR' } // french locale
  ${ obj.jsdate @ dateFormat='dd/MMM/' } // locale from request
  ${ obj.jsdate @ dateFormat='dd/MMM/ HH', locale='fr_FR', timezone='PST' } 
// french locale, timezone set to PST
  ${ obj.jsdate @ dateFormat='dd/MMM/ HH', timezone='CTT' } // timezone set 
to CTT


{code}


  was:
When using Sightly we are missing functionality to format dates.

Proposed solution:
{code}
@ dateFormat = ''
{code}

format used can be found in : 
http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html

The value to be formatted must be specified via a Date-type (Date,Calendar etc)

Example
{code}


  ${ dateV @ dateFormat='dd/MM/'}
  ${ obj.jsdate @ dateFormat='dd/MM/'}
  ${ properties.jcr:created  @ dateFormat='dd/MM/' }

  ${ obj.jsdate @ dateFormat='dd/MMM/', locale='ko_KR' } // korean locale
   ${ obj.jsdate @ dateFormat='dd/MMM/', locale='fr_FR' } // french locale
   ${ obj.jsdate @ dateFormat='dd/MMM/' } // locale from request


{code}



> Adding formatter to HTL/Sightly dates
> -
>
> Key: SLING-6102
> URL: https://issues.apache.org/jira/browse/SLING-6102
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>
> When using Sightly we are missing functionality to format dates.
> Proposed solution:
> {code}
> @ dateFormat = ''
> {code}
> format used can be found in : 
> http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html
> The value to be formatted must be specified via a Date-type (Date,Calendar 
> etc)
> Example
> {code}
> 
>   ${ dateV @ dateFormat='dd/MM/'}
>   ${ obj.jsdate @ dateFormat='dd/MM/'}
>   ${ properties.jcr:created  @ dateFormat='dd/MM/' }
>   ${ obj.jsdate @ dateFormat='dd/MMM/', locale='ko_KR' } // korean locale
>   ${ obj.jsdate @ dateFormat='dd/MMM/', locale='fr_FR' } // french locale
>   ${ obj.jsdate @ dateFormat='dd/MMM/' } // locale from request
>   ${ obj.jsdate @ dateFormat='dd/MMM/ HH', locale='fr_FR', timezone='PST' 
> } // french locale, timezone set to PST
>   ${ obj.jsdate @ dateFormat='dd/MMM/ HH', timezone='CTT' } // timezone 
> set to CTT
> 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-6102) Adding formatter to HTL/Sightly dates

2016-10-13 Thread Feike Visser (JIRA)

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

Feike Visser commented on SLING-6102:
-

For the dates I am not sure around dependency to the Java-version and the 
Sling-project.

> Adding formatter to HTL/Sightly dates
> -
>
> Key: SLING-6102
> URL: https://issues.apache.org/jira/browse/SLING-6102
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>
> When using Sightly we are missing functionality to format dates.
> Proposed solution:
> {code}
> @ dateFormat = ''
> {code}
> format used can be found in : 
> http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html
> The value to be formatted must be specified via a Date-type (Date,Calendar 
> etc)
> Example
> {code}
> 
>   ${ dateV @ dateFormat='dd/MM/'}
>   ${ obj.jsdate @ dateFormat='dd/MM/'}
>   ${ properties.jcr:created  @ dateFormat='dd/MM/' }
>   ${ obj.jsdate @ dateFormat='dd/MMM/', locale='ko_KR' } // korean locale
>${ obj.jsdate @ dateFormat='dd/MMM/', locale='fr_FR' } // french locale
>${ obj.jsdate @ dateFormat='dd/MMM/' } // locale from request
> 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (SLING-6102) Adding formatter to HTL/Sightly dates

2016-10-13 Thread Feike Visser (JIRA)

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

Feike Visser edited comment on SLING-6102 at 10/13/16 1:43 PM:
---

I added support now for locales, thanks for raising this


was (Author: fvisser):
I added support now for locales, thank for raising this

> Adding formatter to HTL/Sightly dates
> -
>
> Key: SLING-6102
> URL: https://issues.apache.org/jira/browse/SLING-6102
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Feike Visser
>
> When using Sightly we are missing functionality to format dates.
> Proposed solution:
> {code}
> @ dateFormat = ''
> {code}
> format used can be found in : 
> http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html
> The value to be formatted must be specified via a Date-type (Date,Calendar 
> etc)
> Example
> {code}
> 
>   ${ dateV @ dateFormat='dd/MM/'}
>   ${ obj.jsdate @ dateFormat='dd/MM/'}
>   ${ properties.jcr:created  @ dateFormat='dd/MM/' }
>   ${ obj.jsdate @ dateFormat='dd/MMM/', locale='ko_KR' } // korean locale
>${ obj.jsdate @ dateFormat='dd/MMM/', locale='fr_FR' } // french locale
>${ obj.jsdate @ dateFormat='dd/MMM/' } // locale from request
> 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


  1   2   >