You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by kranga <kr...@k2d2.org> on 2004/06/28 21:17:23 UTC
How to store java obj in session using flow script
When I say something like:
var obj = new Packages.com.me.MyClass("test");
cocoon.session.setAttribute("user", obj);
my sitemap.xmap's sessionstate matcher doesn't match on the session.
However, if I store a javascript native value (say the integer 123), the
statematcher matches on the session. What am I doing wrong with java
objects? How do I store a java object in the session?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: How to store java obj in session using flow script
Posted by Olivier Billard <ob...@jouve.fr>.
Hi,
If your class is "home-made", I think you have to redefine the equals
method.
--
Olivier Billard
kranga wrote:
> When I say something like:
>
> var obj = new Packages.com.me.MyClass("test");
> cocoon.session.setAttribute("user", obj);
>
> my sitemap.xmap's sessionstate matcher doesn't match on the session.
> However, if I store a javascript native value (say the integer 123), the
> statematcher matches on the session. What am I doing wrong with java
> objects? How do I store a java object in the session?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org