I think you might find this document useful: http://www.mozilla.org/rhino/scriptjava.html
Essentially, you need to reference classes with their full package name. If the class is question is not a core class, typically one of your own, then you need to prefix the package with 'Packages'. Some examples:
//Call a static method on a custom class
var singleton = Packages.net.richardhoberman.persistence.PersistenceManager.getDefaultManager();
//Instantiate a custom class var product = new Packages.net.richardhoberman.beans.Product();
//instantiate a core java class var long = new java.lang.Long(100);
You can call methods on java classes accessed in this way in the same manner as you would in a java class.
HTH,
Richard
Chris Clark wrote:
I'm using javascript with the JXForms and I'd like to call a Java function from within the flowscript. Something like:
sendView(url1) sendView(url2) if (something updated in the model) call a member function from a Java class
Is this possible? If so, how do you do it?
Looking at the samples it appears as if the Form class is being used within the jxform.js so I think you can do, but my javascript skills aren't at the point where I can figure out how.
Any tips, links to references, etc. would be really appreciated.
Thanks, Chris
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
