Hi, On 06.01.2010 21:14, Carsten Ziegeler wrote: > Hi, > > currently our scripting core depends on the jcr api. This is an old > relict to support the optional binding for currentNode. If the current > resource is adaptable to a jcr node, then this binding is set to this node. > This binding is not officially supported :)
Well, actually this variable is documented in the Sling Wiki Scripting Variables page [1]. And thus it looks like it is kind of officially supported. > > We should definitly either remove the dependency to jcr or make it > optional. This allows to use the scripting in a non jcr environment. > > I think we should remove this support completly - afaik the only > scripting language that is affected by this change is the javascript > implementation. We could simply add the binding in this scripting > language. JSPs are not affected as we have a taglib there anyway. Yes, for JSPs the currentNode variable is set by the <sling:defineObjects> tag. > So if noone objects, I'll remove the support from the scripting core and > add it to the javascript implementation. > > As an alternative we could make the dependency optional and leave this > non official stuff in the core. > > WDYT? Upfront I would be for removing. But since the variable is documented and therefore de-facto API, I think we should implement the workaround with the optional dependency. Regards Felix > > Carsten [1] http://cwiki.apache.org/SLING/scripting-variables.html