You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ramy Mamdouh <ra...@imkenberg.de> on 2003/09/02 14:15:14 UTC

Flow: creating an object inside the flowscript is always NativeJavaObject? and can't be casted back?

Hello there,

Creating an object inside the flow script always has the type 
org.mozilla.javascript.NativeJavaObject ?

Something like :
var x = new AnyKindOfObject();

Then how can I cast this org.mozilla.javascript.NativeJavaObject to the 
original type, to use in XSP for example, it throws a CastException !

I'm using the cocoon-2.1 cvs

Thanks
Ramy



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


Re: Flow: creating an object inside the flowscript is always NativeJavaObject? and can't be casted back?

Posted by Ramy Mamdouh <ra...@imkenberg.de>.
Hi,

Now I found a unwrap() on the NativeJavaObject, that returns the right 
object.

Is that the right way of doing such stuff, or I'm missing something?

Thanks
Ramy

Ramy Mamdouh wrote:
> Hello there,
> 
> Creating an object inside the flow script always has the type 
> org.mozilla.javascript.NativeJavaObject ?
> 
> Something like :
> var x = new AnyKindOfObject();
> 
> Then how can I cast this org.mozilla.javascript.NativeJavaObject to the 
> original type, to use in XSP for example, it throws a CastException !
> 
> I'm using the cocoon-2.1 cvs
> 
> Thanks
> Ramy
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 



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