[jira] [Commented] (SLING-5825) Add support for implicit conversion of Enum to String

2021-07-28 Thread Radu Cotescu (Jira)


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

Radu Cotescu commented on SLING-5825:
-

[~enorman], let's continue this discussion at 
https://issues.apache.org/jira/browse/SLING-9968, where [~kwin] asked this 
question again, since I was probably distracted and didn't see his comment in 
July 2016. :D

> Add support for implicit conversion of Enum to String
> -
>
> Key: SLING-5825
> URL: https://issues.apache.org/jira/browse/SLING-5825
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Affects Versions: Scripting Sightly Engine 1.0.2
>Reporter: Konrad Windszus
>Assignee: Radu Cotescu
>Priority: Minor
> Fix For: Scripting HTL Engine 1.0.20
>
>
> Currently Sightly does not support implicit conversion from Enum to String 
> like in 
> {code}
> ...
> {code}
> The class attribute will always be empty in case when {{member.inviteStatus}} 
> is an Enum.
> Instead you have to write
> {code}
> ...
> {code}
> Sightly should implicitly convert enums to Strings if they are just given out.
> This is similar to SLING-5053.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-5825) Add support for implicit conversion of Enum to String

2021-07-27 Thread Eric Norman (Jira)


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

Eric Norman commented on SLING-5825:


[~kwin] [~radu] Do you recall if there was there ever an answer to your 
question regarding usage of Enum.name() vs Enum.toString()? 

It appears that ObjectModel#toString handles this now and still uses 
Enum.name(), and I was wondering if there was some specific reason why that was 
done.

> Add support for implicit conversion of Enum to String
> -
>
> Key: SLING-5825
> URL: https://issues.apache.org/jira/browse/SLING-5825
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Affects Versions: Scripting Sightly Engine 1.0.2
>Reporter: Konrad Windszus
>Assignee: Radu Cotescu
>Priority: Minor
> Fix For: Scripting HTL Engine 1.0.20
>
>
> Currently Sightly does not support implicit conversion from Enum to String 
> like in 
> {code}
> ...
> {code}
> The class attribute will always be empty in case when {{member.inviteStatus}} 
> is an Enum.
> Instead you have to write
> {code}
> ...
> {code}
> Sightly should implicitly convert enums to Strings if they are just given out.
> This is similar to SLING-5053.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-5825) Add support for implicit conversion of Enum to String

2016-07-08 Thread Konrad Windszus (JIRA)

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

Konrad Windszus commented on SLING-5825:


[~radu.cotescu] Is there any specific reason why you convert with 
{{Enum.name()}}, instead of {{Enum.toString()}}? I would prefer the latter, 
then you could easily overwrite that (see also 
http://stackoverflow.com/questions/18031125/what-is-the-difference-between-enum-name-and-enum-tostring)

> Add support for implicit conversion of Enum to String
> -
>
> Key: SLING-5825
> URL: https://issues.apache.org/jira/browse/SLING-5825
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Affects Versions: Scripting Sightly Engine 1.0.2
>Reporter: Konrad Windszus
>Assignee: Radu Cotescu
>Priority: Minor
> Fix For: Scripting Sightly Engine 1.0.20
>
>
> Currently Sightly does not support implicit conversion from Enum to String 
> like in 
> {code}
> ...
> {code}
> The class attribute will always be empty in case when {{member.inviteStatus}} 
> is an Enum.
> Instead you have to write
> {code}
> ...
> {code}
> Sightly should implicitly convert enums to Strings if they are just given out.
> This is similar to SLING-5053.



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