Argh! Sorry about this. The resource is indeed referenced. My fault. But still, is there some server-side system files which describe which things are accessible from scripts??
Cheers, PS On Jan 19, 2008 10:24 AM, Peter Svensson <[EMAIL PROTECTED]> wrote: > Wait - just another question; In most of the tests; esp, erb, et.c. there > are magic api references. For instance resource or node, et.c. In the js > example there's only writeln's. Is it possible to access system resources > from Rhino as well? If so, is there some Java system file which describes > which resources are accesible to the scripts?? > > Thank! > > Cheers, > PS > > > On Jan 19, 2008 10:21 AM, Peter Svensson <[EMAIL PROTECTED]> wrote: > > > WoW! Thanks. :) I half-and-half that you would say that it was > > theoretically possible, but not on Saturdays :) This, I like. > > > > Cheers, > > PS > > > > > > On Jan 19, 2008 10:18 AM, Bertrand Delacretaz < [EMAIL PROTECTED]> > > wrote: > > > > > On Jan 19, 2008 10:14 AM, Peter Svensson < [EMAIL PROTECTED]> wrote: > > > > > > > ...If Sling support writing server-side scripts in Rhino, couldn't I > > > just as > > > > well write a serve-side javascript which access internal Sling APIs, > > > build > > > > the structure, and outputs the correct format?... > > > > > > Sure - just name your script "json.js", put in in the right place > > > based on the sling:resourceType of the node that you're dumping, and > > > that should work if the GET request URL uses the .json extension. > > > > > > There are no docs on this ATM, but the integration tests found under > > > > > > http://svn.apache.org/repos/asf/incubator/sling/trunk/usling/usling-webapp/src/test > > > contain lots of examples. > > > > > > -Bertrand > > > > > > > >
