cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ugo Cei <...@apache.org>
Subject Re: AW: Selection list populated from Hibernate POJO
Date Mon, 23 May 2005 14:18:55 GMT
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/

Mime
View raw message