[jira] Commented: (VELOCITY-406) Improved Syntax for Maps and Collections

2009-01-02 Thread Byron Foster (JIRA)

[ 
https://issues.apache.org/jira/browse/VELOCITY-406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12660329#action_12660329
 ] 

Byron Foster commented on VELOCITY-406:
---

Thanks Will, that worked.  As Nathan say, it works with Native arrays, because 
of VELOCITY-533, and other stuff :)

 Improved Syntax for Maps and Collections
 

 Key: VELOCITY-406
 URL: https://issues.apache.org/jira/browse/VELOCITY-406
 Project: Velocity
  Issue Type: Improvement
  Components: Engine
Reporter: Jörg Gottschling
Priority: Minor

 I would like to see some syntatic sugar for Maps and Collections and perhaps 
 other Objects too. 
 (I have read that there will be a syntax for map literals in 1.5, that's a 
 first step.)
 I want to have something like in groovy: 
 http://groovy.codehaus.org/Collections
 Scroll down to Slicing with the subscript operator.
 PS: Please do never implement this terrible confusing groovy map bean syntax, 
 where map.foo ist equivalent to map.get(foo).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org



[jira] Commented: (VELOCITY-406) Improved Syntax for Maps and Collections

2009-01-01 Thread Byron Foster (JIRA)

[ 
https://issues.apache.org/jira/browse/VELOCITY-406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12660200#action_12660200
 ] 

Byron Foster commented on VELOCITY-406:
---

Added the $foo[1] style syntax.  When reading the value it's implemented by 
calling .get(val), so that the bracketed syntax is synonymous with .get(. 
This means it also works for getting Map values like $foo[junk]. 

The setting this type of reference also works. for example:

#set($foo[2] = 3)

If the index value is an Integer, then it calls .set(Integer, val), otherwise 
it calls .put(val, val) which allows the setting of Map values with:

#set($foo[garbage] = smelly)



 Improved Syntax for Maps and Collections
 

 Key: VELOCITY-406
 URL: https://issues.apache.org/jira/browse/VELOCITY-406
 Project: Velocity
  Issue Type: Improvement
  Components: Engine
Reporter: Jörg Gottschling
Priority: Minor

 I would like to see some syntatic sugar for Maps and Collections and perhaps 
 other Objects too. 
 (I have read that there will be a syntax for map literals in 1.5, that's a 
 first step.)
 I want to have something like in groovy: 
 http://groovy.codehaus.org/Collections
 Scroll down to Slicing with the subscript operator.
 PS: Please do never implement this terrible confusing groovy map bean syntax, 
 where map.foo ist equivalent to map.get(foo).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org



[jira] Commented: (VELOCITY-406) Improved Syntax for Maps and Collections

2009-01-01 Thread Nathan Bubna (JIRA)

[ 
https://issues.apache.org/jira/browse/VELOCITY-406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12660209#action_12660209
 ] 

Nathan Bubna commented on VELOCITY-406:
---

Looks great, Byron!

 Improved Syntax for Maps and Collections
 

 Key: VELOCITY-406
 URL: https://issues.apache.org/jira/browse/VELOCITY-406
 Project: Velocity
  Issue Type: Improvement
  Components: Engine
Reporter: Jörg Gottschling
Priority: Minor

 I would like to see some syntatic sugar for Maps and Collections and perhaps 
 other Objects too. 
 (I have read that there will be a syntax for map literals in 1.5, that's a 
 first step.)
 I want to have something like in groovy: 
 http://groovy.codehaus.org/Collections
 Scroll down to Slicing with the subscript operator.
 PS: Please do never implement this terrible confusing groovy map bean syntax, 
 where map.foo ist equivalent to map.get(foo).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org



[jira] Commented: (VELOCITY-406) Improved Syntax for Maps and Collections

2009-01-01 Thread Byron Foster (JIRA)

[ 
https://issues.apache.org/jira/browse/VELOCITY-406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12660213#action_12660213
 ] 

Byron Foster commented on VELOCITY-406:
---

I don't think I can, I have no close workflow items...

 Improved Syntax for Maps and Collections
 

 Key: VELOCITY-406
 URL: https://issues.apache.org/jira/browse/VELOCITY-406
 Project: Velocity
  Issue Type: Improvement
  Components: Engine
Reporter: Jörg Gottschling
Priority: Minor

 I would like to see some syntatic sugar for Maps and Collections and perhaps 
 other Objects too. 
 (I have read that there will be a syntax for map literals in 1.5, that's a 
 first step.)
 I want to have something like in groovy: 
 http://groovy.codehaus.org/Collections
 Scroll down to Slicing with the subscript operator.
 PS: Please do never implement this terrible confusing groovy map bean syntax, 
 where map.foo ist equivalent to map.get(foo).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org



[jira] Commented: (VELOCITY-406) Improved Syntax for Maps and Collections

2009-01-01 Thread Nathan Bubna (JIRA)

[ 
https://issues.apache.org/jira/browse/VELOCITY-406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12660218#action_12660218
 ] 

Nathan Bubna commented on VELOCITY-406:
---

Hmm.  I dunno a ton about JIRA, Close might be just for admins and the issue 
reporter.  Do you have a Resolve workflow item?  If not, then we need to get 
you some more perms or something.

 Improved Syntax for Maps and Collections
 

 Key: VELOCITY-406
 URL: https://issues.apache.org/jira/browse/VELOCITY-406
 Project: Velocity
  Issue Type: Improvement
  Components: Engine
Reporter: Jörg Gottschling
Priority: Minor

 I would like to see some syntatic sugar for Maps and Collections and perhaps 
 other Objects too. 
 (I have read that there will be a syntax for map literals in 1.5, that's a 
 first step.)
 I want to have something like in groovy: 
 http://groovy.codehaus.org/Collections
 Scroll down to Slicing with the subscript operator.
 PS: Please do never implement this terrible confusing groovy map bean syntax, 
 where map.foo ist equivalent to map.get(foo).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org



[jira] Commented: (VELOCITY-406) Improved Syntax for Maps and Collections

2009-01-01 Thread Will Glass-Husain (JIRA)

[ 
https://issues.apache.org/jira/browse/VELOCITY-406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12660249#action_12660249
 ] 

Will Glass-Husain commented on VELOCITY-406:


I added Byron to the velocity-developers jira-group.  Does that help?  You 
should see a Resolve Issue link in the upper left.

WILL

 Improved Syntax for Maps and Collections
 

 Key: VELOCITY-406
 URL: https://issues.apache.org/jira/browse/VELOCITY-406
 Project: Velocity
  Issue Type: Improvement
  Components: Engine
Reporter: Jörg Gottschling
Priority: Minor

 I would like to see some syntatic sugar for Maps and Collections and perhaps 
 other Objects too. 
 (I have read that there will be a syntax for map literals in 1.5, that's a 
 first step.)
 I want to have something like in groovy: 
 http://groovy.codehaus.org/Collections
 Scroll down to Slicing with the subscript operator.
 PS: Please do never implement this terrible confusing groovy map bean syntax, 
 where map.foo ist equivalent to map.get(foo).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org



[jira] Commented: (VELOCITY-406) Improved Syntax for Maps and Collections

2009-01-01 Thread Will Glass-Husain (JIRA)

[ 
https://issues.apache.org/jira/browse/VELOCITY-406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12660250#action_12660250
 ] 

Will Glass-Husain commented on VELOCITY-406:


by the way, I like this syntax.

Does it work for arrays?  Since the syntax is similar to array syntax, most 
users will assume it works for arrays too.

 Improved Syntax for Maps and Collections
 

 Key: VELOCITY-406
 URL: https://issues.apache.org/jira/browse/VELOCITY-406
 Project: Velocity
  Issue Type: Improvement
  Components: Engine
Reporter: Jörg Gottschling
Priority: Minor

 I would like to see some syntatic sugar for Maps and Collections and perhaps 
 other Objects too. 
 (I have read that there will be a syntax for map literals in 1.5, that's a 
 first step.)
 I want to have something like in groovy: 
 http://groovy.codehaus.org/Collections
 Scroll down to Slicing with the subscript operator.
 PS: Please do never implement this terrible confusing groovy map bean syntax, 
 where map.foo ist equivalent to map.get(foo).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org



[jira] Commented: (VELOCITY-406) Improved Syntax for Maps and Collections

2008-01-25 Thread Stephen Colebourne (JIRA)

[ 
https://issues.apache.org/jira/browse/VELOCITY-406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12562476#action_12562476
 ] 

Stephen Colebourne commented on VELOCITY-406:
-

I support this RFE for list access using [ ].

I expected the syntax ${someList[1]} to work in Velocity, and was surprised 
when it didn't. Perhaps VELOCITY-533 has made this more feasible?

Personally, I only need the 'get' behaviour, and not the 'set' behaviour, but 
they should be logically introduced together.

I also don't see the need for ${someList.1} to work - that seems like overkill 
syntax.

 Improved Syntax for Maps and Collections
 

 Key: VELOCITY-406
 URL: https://issues.apache.org/jira/browse/VELOCITY-406
 Project: Velocity
  Issue Type: Improvement
  Components: Engine
Reporter: Jörg Gottschling
Priority: Minor
 Fix For: 1.6


 I would like to see some syntatic sugar for Maps and Collections and perhaps 
 other Objects too. 
 (I have read that there will be a syntax for map literals in 1.5, that's a 
 first step.)
 I want to have something like in groovy: 
 http://groovy.codehaus.org/Collections
 Scroll down to Slicing with the subscript operator.
 PS: Please do never implement this terrible confusing groovy map bean syntax, 
 where map.foo ist equivalent to map.get(foo).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]