cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel McOrmond <dmcorm...@gmail.com>
Subject Java Class Casting within Flow
Date Tue, 22 Feb 2005 16:10:18 GMT
Here's a simple example:


importClass( Packages.com.company.GenericObject );
importClass( Packages.com.company.SpecificObject );
importClass( Packages.com.company.ObjectLoaderUtil );

function doSomethingUseful() {
  var loader = cocoon.createObject( ObjectLoaderUtil );
  var myObject = loader.getGenericObject();
}



Suppose I wanted to cast the GenericObject to a SpecificObject, like this:

  var myObject = (SpecificObject) loader.getGenericObject();



Obviously there are other ways I could handle this. But I just
wondered, is there a way to do this within flow?

-Daniel

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


Mime
View raw message