cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Messing, Elad" <elad.mess...@eml-d.villa-bosch.de>
Subject AW: AW: Selection list populated from Hibernate POJO
Date Mon, 23 May 2005 14:32:55 GMT
Hello Ugo
	You are right. I changed the array to ArrayList and all began to work.
	I will also look for the discussion you mentioned. 

	Thank you !!

Elad 

-----Urspr√ľngliche Nachricht-----
Von: Ugo Cei [mailto:ugo@apache.org] 
Gesendet: Montag, 23. Mai 2005 16:19
An: users@cocoon.apache.org
Betreff: Re: AW: Selection list populated from Hibernate POJO

Il giorno 23/mag/05, alle 15:32, Messing, Elad ha scritto:

> Hello again Ugo
> 	It doesnt seem to work for me, I get java.lang.ClassCastException:
<snip/>
> 	Here is my flowscript :
>
>
> function callRestaurantMainSearch() {
>     var restTypes = new Array(4);
>     restTypes[0] = new
> Packages.de.emld.hibernate.wlan.RestaurantType("Italian" , 1);
>     restTypes[1] = new
> Packages.de.emld.hibernate.wlan.RestaurantType("German" , 2);
>     restTypes[2] = new
> Packages.de.emld.hibernate.wlan.RestaurantType("French" , 3);
>     restTypes[3] = new
> Packages.de.emld.hibernate.wlan.RestaurantType("Chinese" , 4);
> 	
>     var form = new Form("forms/restaurant_main_search.xml");
>     form.lookupWidget("type").setSelectionList(restTypes, "id", 
> "name");
>     form.showForm("forms/restaurant_main_search.xhtml");	
> }
<snip/>
>
> What is wrong ?

You should pass it an instance of java.util.List, not an array.

	Ugo

--
Ugo Cei
Tech Blog: http://agylen.com/
Source.zone: http://sourcezone.info/
Wine & Food Blog: http://www.divinocibo.it/


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


Mime
View raw message