having problem Using Indexed properties with Multi select inside logic iterate

2006-06-27 Thread Krishan Rathi

 Hi i am trying to use a multi select box in logic iterate 
in this way 

logic-el:iterate indexId=ctr id=admindepartment 
name=admindepartments 

html-el:select property=bookMapped(${ctr}) multiple=true   
size=2 

html-el:options name=bean property=dbBookType/ 
/html-el:select 

/logic-el:iterate  

in the form bean i have following code. 

private Map selectedBooks; 

public Object getBookMapped(String index) { 
return selectedBooks.get(key); 
} 

public void setBookMapped(String index,Object value) { 
selectedBooks.put(key,value); 
} 
now in each multiple select box i am selecting 
multiple books but in the resulting map selectedBooks 
i am getting one value for each multiple selection 
then i had also tried using 

public void setBookMapped(String index,Object[] 
value) { 
selectedBooks.put(key,value); 
} 

but which is throwing an illegelargumenttype 
exception. 

please help. 

thanks in advance. 

krishan.



krishan Rathi


having problem Using Indexed properties with Multi select inside logic iterate

2006-06-27 Thread krishan rathi
 Hi i am trying to use a multi select box in logic iterate 
in this way 

logic-el:iterate indexId=ctr id=admindepartment name=admindepartments 

html-el:select property=bookMapped(${ctr}) multiple=true   
size=2 

html-el:options name=bean property=dbBookType/ 

/html-el:select 

/logic-el:iterate  

in the form bean i have following code. 

private Map selectedBooks; 

public Object getBookMapped(String index) { 
return selectedBooks.get(key); 
} 

public void setBookMapped(String index,Object value) { 
selectedBooks.put(key,value); 
} 
now in each multiple select box i am selecting 
multiple books but in the resulting map selectedBooks 
i am getting one value for each multiple selection 
then i had also tried using 

public void setBookMapped(String index,Object[] 
value) { 
selectedBooks.put(key,value); 
} 

but which is throwing an illegelargumenttype 
exception.

Can anybody suggest how should i use  indexed properties to tackle a group of 
multi select boxes. 

please help. 

thanks in advance. 

krishan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]