cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manuel Mata <manuel_mata_ru...@yahoo.es>
Subject How can i acces to Class from a Class name ?
Date Mon, 05 Feb 2007 17:42:22 GMT
Hi i'm using cocoon with hibernate and flowscript/jx
just like hibernate tutorial in wiki. Everything works
fine but this.

I have a javascript function which takes an id
parameter
from the request and i need to recover the object with
hibernate API, but this code doesn't work.

function perfil_detail(){
	openHibernateSession();
	var id = Request.getParameter("id");
	var perfil =
hs.load(Packages.mypackage.MyClass.class, new
java.lang.Long(id));
	cocoon.sendPage(
		"perfil.detail.display",
		{perfil : perfil}
	);
}

The hibernate Session.load takes a Class parameter
first so, how can i get that Class object in
flowscript?

I get this error:

org.mozilla.javascript.EcmaError: missing name after .
operator
SyntaxError -
file:/C:/cocoon-2.1.9/build/webapp/.../perfiles.js -
28:67

I searched on docs but dont find anything related to
this. Can anyone help ?

Thx in advance.


		
______________________________________________ 
LLama Gratis a cualquier PC del Mundo. 
Llamadas a fijos y móviles desde 1 céntimo por minuto. 
http://es.voice.yahoo.com

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


Mime
View raw message