You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Sachin Gupta <sa...@gmail.com> on 2009/05/30 11:19:51 UTC

Batik Script issue

Hi,

I am using batik in my application. I am trying to set hidden object in HTML
form using  javascript.
e.g. myform.inputtext.value=myarr

As batik uses rhinoscript i am using liveconnect functionality to interpret
javascript.

I tried using JSObject.setMember in put method and getting following
exception.

netscape.javascript.JSException: Parameter not optional.

org.apache.batik.script.InterpreterException: Parameter not optional.

    at
org.apache.batik.script.rhino.RhinoInterpreter.evaluate(RhinoInterpreter.java:288)
    at
org.apache.batik.bridge.BaseScriptingEnvironment.loadScripts(BaseScriptingEnvironment.java:513)
    at
org.apache.batik.bridge.UpdateManager.dispatchSVGLoadEvent(UpdateManager.java:238)
    at
org.apache.batik.bridge.UpdateManager.dispatchSVGLoadEvent(UpdateManager.java:220)
    at
org.apache.batik.swing.svg.SVGLoadEventDispatcher.run(SVGLoadEventDispatcher.java:100)


and if i use eval method then there is no exception but the values are not
set in my form object.

Regards,
Sachin

Re: Batik Script issue

Posted by Helder Magalhães <he...@gmail.com>.
Hi Sachin,


> As batik uses rhinoscript i am using liveconnect functionality to interpret
> javascript.

Note that this is somehow unrelated to Batik (this a general Java
applet and HTML<-->applet communication question) and therefore should
probably be crawled/asked somewhere else (Rhino mailing list, maybe?).
Nevertheless, I recall a few threads which lightly touched this
subject so you may find a few answers within this mailing list
archives also.


> I tried using JSObject.setMember in put method and getting following
> exception.
>
> netscape.javascript.JSException: Parameter not optional.

Without a proper context (in this case, probably a code snippet) it's
very hard to provide any interesting feedback. Please consider
providing one if you follow-up on this thread or if you redirect this
into a more specific mailing list. Also, environmental information
(operating system, java version, etc., software version) also usually
help. ;-)


> and if i use eval method then there is no exception but the values are not
> set in my form object.

Again, guessing on what's happening is very difficult. :-|  I'd invite
you to get a bit more familiar with effective bug reporting [1],
(specially regarding reproducibility [2] [3]) and test case reduction
[4]. :-)  (It would be valuable, as stated above, if you decide to
rewrite a polished version of this question to redirect into another
forum or follow up with more information.)


> Regards,
> Sachin

Hope this helps,
 Helder


[1] http://www.chiark.greenend.org.uk/~sgtatham/bugs.html
[2] http://www.chiark.greenend.org.uk/~sgtatham/bugs.html#showme
[3] http://www.chiark.greenend.org.uk/~sgtatham/bugs.html#showmehow
[4] http://webkit.org/quality/reduction.html

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org