Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » JQuery file support in Mulit-page Editor plugin(JQuery file support in Mulit-page Editor plugin)
JQuery file support in Mulit-page Editor plugin [message #1125207] Fri, 04 October 2013 09:13
rs rs is currently offline rs rsFriend
Messages: 1
Registered: October 2013
Junior Member
Hi,

I am facing the issue on Multi-page editor plugin development. I want this plugin to support jquery. It is supporting Javascript functions using import "sun.org.mozilla.javascrip". But it is not supporting Jquery functions.

I am calling Jquery file for some text convertion using jquery code when opening perview mode in Multi-page editor. But the following error throws.

Code:

BufferedReader script = new BufferedReader(new FileReader("mapBuilder.js"));
Context context = Context.enter();
ScriptableObject scope = context.initStandardObjects();
context.evaluateReader(scope, script, "script", 1, null);
Function fct = (Function)scope.get("buildMap", scope);
String editorText =
editor.getDocumentProvider().getDocument(editor.getEditorInput()).get();
Object result = fct.call(context, scope, scope, new Object[] {editorText});
//System.out.println(Context.jsToJava(result, int.class));

text.setText(result.toString());


Error i got:
sun.org.mozilla.javascript.internal.EcmaError: ReferenceError: "$" is not defined. (script#18)


Please help me solve this problem.

Thanks in Advance
Previous Topic:Broker Nagivator location URI
Next Topic:Newcomer
Goto Forum:
  


Current Time: Fri Mar 29 08:18:36 GMT 2024

Powered by FUDForum. Page generated in 0.05280 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top