cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Messing, Elad" <>
Subject AW: Accessing the cocoon session from my Hibernate User-Type
Date Mon, 01 Aug 2005 13:16:09 GMT
Hello Johannes 
	it is quite simple.
	I am following the solution offered by Gavin here :

	Can you see the function : "User.current().getLanguage()"?
	So - for me this function is still not implemented. This is because Cocoon is managing the
Locale in the current HTTP session, and I do not know how to get to it.
	In general sense, I am using a flow script which uses the hibernate session opened to query
the hibernate object :

	var indexID = cocoon.parameters["id"];
	var index =, indexID);
	cocoon.sendPage("/template/dynamic/showIndex.jx", {"index" : index} );	

	Quite straight forward.

	Now, "Index" is a hibernate mapped class. One of the property is this special translated
property, which requires the locale.
	So my question is how from this hibernate user-type class I can gain Access to the Cocoon
current session?

	I hope this is more clear now.


-----Urspr√ľngliche Nachricht-----
Von: Johannes Textor [] 
Gesendet: Montag, 1. August 2005 14:59
Betreff: Re: Accessing the cocoon session from my Hibernate User-Type


could you please provide a few more details on how you are actually "taking the user locale"
in your hibernate object (constructor parameter / system property / etc.) ? How are you accessing
your objects - directly or via a Data Access Object (DAO) ?


> Hello all
>         I am a bit confused on how I should handle this :
>         I have a custom Hibernate user type, which is taking the user 
> locale, and get from the DB the translated text for a table column.
>         Now - the locale is in my cocoon session off course - as I am 
> using the cocoon locale action.
>         What will be the right way to let my hibernate user-type class 
> access this locale in the cocoon session ?
> Elad Messing
> Software Developer
> European Media Laboratory GmbH
> Schloss-Wolfsbrunnenweg 33
> D-69118 Heidelberg

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message