Hi, On 19.10.2010 14:21, Sandro Boehme wrote: > Am 19.10.10 13:41, schrieb Felix Meschberger: >> Hi, >>>>> I cannot easily find out if the >>>>> trigger to load the JavaScript files is already there somewhere. >>>>> >>>>> I guess we only need to trigger the handleCompilationDone() methode >>>>> somewhere in Sling but I don't know enough about Sling to decide where >>>>> that would fit in or what to configure to make it fit. Maybe it >>>>> could be >>>>> triggered during >>>>> ...scripting.javascript.internal.RhinoJavaScriptEngine.eval(). Do you >>>>> have an idea? >>>> >>>> Actually from my traces I see, that the Eclipse rhino.debugger >>>> bundle in >>>> facts replies to the compilationDone event and informs the Eclipse >>>> debugger about this. >>> This sounds good. What did you do to trigger the compilationDone event? >>> If that works I get some example scripts from the server and can then >>> try to find a mapping for the paths. >> >> I wrote a simple /apps/nt/folder/html.esp script and then requested a >> folder from Sling. This causes the html.esp script to be loaded and thus >> the compilationDone event is sent and handled. >> >> I did not have to do anything else. > Ah, I thought the compilationDone event should also get triggered if the > bundle containing the script is deployed normally. But ok, I understand. > The trigger is the update to WebDav.
No, the triger is the actual execution of the script: Rhino first compiles the script into an AST and the executes that. Once the script has been compiled into the AST (a by-product could in fact be writing a Java Class File....) the compilationDone event is fired (IIRC). Regards Felix