SLING-154, ScriptableNode access to Properties and JCR methods, how?

2008-01-24 Thread Bertrand Delacretaz
Hi, Before SLING-154, the javascript expression "node.text" (in ESP scripts for example) would return the JCR "text" property of the node. I assume this is the most frequent use case for scripted Nodes: work with their content, so we should make this as natural as possible, for example: node.t

Re: SLING-154, ScriptableNode access to Properties and JCR methods, how?

2008-02-01 Thread David Nuescheler
Hi Bertrand, > The simplest way might be to require the use of node.getPath() instead > of node.path, and use javascript property names for content access > only, not for JCR getters. I completely agree to that solution. I think I have a strong bias for using node.propname for accessing the prope

Re: SLING-154, ScriptableNode access to Properties and JCR methods, how?

2008-02-01 Thread Felix Meschberger
Hi all, You know, I don't really care what we do (here). But, we should not start discussing this over and over. Once we decided it would be a good idea to do the mapping the JavaScript way, that is getters are turned into (read-only) properties. To prevent the collisions, that Bertrand mentioned,

Re: SLING-154, ScriptableNode access to Properties and JCR methods, how?

2008-02-08 Thread David Nuescheler
> Node methods are accessible in javascript with their real names like > "node.getPath()". very cool. > Node poperties and child nodes are accessible as javascript > properties, like "node.text". sounds great. > On Feb 1, 2008 8:01 PM, Felix Meschberger <[EMAIL PROTECTED]> wrote: > > ...I am perf

Re: SLING-154, ScriptableNode access to Properties and JCR methods, how?

2008-02-08 Thread Bertrand Delacretaz
Hi, I just committed changes to resolve SLING-154. Node methods are accessible in javascript with their real names like "node.getPath()". Node poperties and child nodes are accessible as javascript properties, like "node.text". On Feb 1, 2008 8:01 PM, Felix Meschberger <[EMAIL PROTECTED]> wrote