cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gunter D'Hondt <gunter.dho...@sofico.be>
Subject Re: interface implementation
Date Fri, 12 Aug 2005 07:10:56 GMT
I'm currently trying to use polymorphism but I'm always getting a 
ClassCastException:

--------------------------
public class A {}
public class B extends A {}
public class C {
        public void foo(A a) {
                B b = new B();
                b = (B) a;
        }
}
--------------------------
How am I doing wrong here?

Regards,
Gunter








Ralph Goers <Ralph.Goers@dslextreme.com> 
12/08/2005 08:31
Please respond to
users@cocoon.apache.org


To
users@cocoon.apache.org
cc

Subject
Re: interface implementation






It sounds like maybe you want the Factory in cocoon.xconf. Get your 
objects from it and then store them in the session.

Gunter D'Hondt wrote:

>How can I define an implementation of an interface inside the 
cocoon.xconf 
>without using the Avalon component-tag coz the class should not be shared 

>over all users since it should be possible to place it inside the session 

>object?
>
>Regards,
>Gunter D'Hondt
>
>
>---------------------------------------------------------------------
>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




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


Mime
View raw message