You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Leszek Gawron <lg...@mobilebox.pl> on 2005/05/11 13:15:47 UTC
Context.javaToJS
Are there any side effects for changing the implementation of
FOM_Cocoon.jsFunction_setupObject from:
> public Object jsFunction_setupObject(Object obj) throws Exception {
> LifecycleHelper.setupComponent(
> unwrap(obj),
> this.getLogger(),
> this.getAvalonContext(),
> this.getServiceManager(),
> null,// configuration
> true);
> return obj;
> }
to:
> public Object jsFunction_setupObject(Object obj) throws Exception {
> LifecycleHelper.setupComponent(
> unwrap(obj),
> this.getLogger(),
> this.getAvalonContext(),
> this.getServiceManager(),
> null,// configuration
> true);
> return org.mozilla.javascript.Context.javaToJS(obj, getParentScope());
> }
this fix stops Rhino nagging about naked java object sent to flowscript.
Can I commit?
--
Leszek Gawron lgawron@mobilebox.pl
IT Manager MobileBox sp. z o.o.
+48 (61) 855 06 67 http://www.mobilebox.pl
mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65
Re: Context.javaToJS
Posted by Sylvain Wallez <sy...@apache.org>.
Leszek Gawron wrote:
> Are there any side effects for changing the implementation of
> FOM_Cocoon.jsFunction_setupObject from:
>
>> public Object jsFunction_setupObject(Object obj) throws Exception {
>> LifecycleHelper.setupComponent(
>> unwrap(obj),
>> this.getLogger(),
>> this.getAvalonContext(),
>> this.getServiceManager(),
>> null,// configuration
>> true);
>> return obj;
>> }
>
>
> to:
>
>> public Object jsFunction_setupObject(Object obj) throws Exception {
>> LifecycleHelper.setupComponent(
>> unwrap(obj),
>> this.getLogger(),
>> this.getAvalonContext(),
>> this.getServiceManager(),
>> null,// configuration
>> true);
>> return org.mozilla.javascript.Context.javaToJS(obj,
>> getParentScope());
>> }
>
> this fix stops Rhino nagging about naked java object sent to flowscript.
>
> Can I commit?
Yes, sure!
Sylvain
--
Sylvain Wallez Anyware Technologies
http://apache.org/~sylvain http://anyware-tech.com
Apache Software Foundation Member Research & Technology Director