Hello all!
Maybe this is a simple question, but I couldn't find any answer in Google:
How can I access a Spring bean from a javascript webscript running in a WebQuickstart application?
I have tried this (which is working in the Share javascript console):
var ctx = Packages.org.springframework.web.context.ContextLoader.getCurrentWebApplicationContext();
var myBean= ctx.getBean("myBean");
but it's not working in my WCMQS javascript webscript, it says: "org.mozilla.javascript.EcmaError: ReferenceError: "Packages" is not defined."
What is the alfresco javascript syntax for accessing the Spring context?
Thanks!