Hi,

lingerer huang wrote:
>     2.Class cast in Java
>       In 2.1.9 I can do this in Java:
>       myobj = (MyClass) cocoon.jsFunction_getComponent(MyClass.ROLE);
>       In 2.1.10 the return is org.mozilla.javascript.NativeJavaObject
>       Questions:
>       How can I get the original Object?
> 
You should not use cocoon.jsFunction_getComponent() in your Java code,
this is a private api for the flow script implementation.

The correct way of getting a component is to use the ServiceManager and
do a lookup(MyClass.ROLE) on a service manager instance. You get the
service manager if you implement the Serviceable interface.

HTH
Carsten
-- 
Carsten Ziegeler - Chief Architect
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

Reply via email to