cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira>
Subject cocoon.getComponent returns a proxy
Date Mon, 03 Oct 2005 23:32:57 GMT
I've got some very simple code:

public class Foo {

     public static final String ROLE = Foo.class.getName();

     public void foo(String msg) {

I have the component configured in cocoon.roles, and when I do:

   var foo = cocoon.getComponent(Foo.ROLE);

the configure() method is called correctly, etc.

Then, if I do"test") I get EcmaError: foo is not a function

If I do:
   var bar = new Foo();"test");

it works fine.

Looking under the bonnet a bit, I see that the component manager is 
returning a proxy for this class, which flowscript can't make use of.

How do I stop the component manager offering me a proxy and force it to 
give me the object itself?

Thanks in advance.

Regards, Upayavira

View raw message