Re: UISelectMany and Argument Type Mismatch

2006-04-28 Thread Bruno Aranda
Bonnie, you should address this questions to the user mailing list, where you will get better and faster feedback. Comments inline: On 4/28/06, Bonnie SM TANG <[EMAIL PROTECTED]> wrote: > > > > > Hi, Bruno, > > I read your message dated 11 Oct 2005 about UISelectMany below. I have some > question

Re: UISelectMany and Argument Type Mismatch

2005-10-11 Thread Caroline Jen
Hi, I had known how to create selectManyListbox. Two weeks before I posted my question, I had successfully used a List of SelectItem to create a list box. I do not want to have pre-selected items when the web page is loaded into the browser. My problem occurred when I changed the dataFileItems f

Re: UISelectMany and Argument Type Mismatch

2005-10-11 Thread Bruno Aranda
Mmmh, if I understood you ok at the beginning we have two objectives: #1 - Have a list filled dinamically with SelectItem objects #2 - Some of the elements of the list are pre-selected when the page loads. To do #1 we need to use the f:selectItems components with a value that points to an array/L

Re: UISelectMany and Argument Type Mismatch

2005-10-11 Thread Caroline Jen
Sorry, I am completely confused. OKay, here is my JSP: [code] [/code] In my backing bean, I have changed String[] dataFile to SelectItem[] dataFile. cannot bind to UISelectMany? The dataFileItems is of UISelectMany type in my backing bean. What should I do?

Re: UISelectMany and Argument Type Mismatch

2005-10-11 Thread Bruno Aranda
Yes, this is what I mean, and what I thought you were also trying to do in your example. The 'value' attribute: I could speak english better in a previous life :-) Bruno 2005/10/11, Caroline Jen <[EMAIL PROTECTED]>: > Thanks for your reply. > > [QUOTE] > to have some values selected when the p

Re: UISelectMany and Argument Type Mismatch

2005-10-11 Thread Caroline Jen
Thanks for your reply. [QUOTE] to have some values selected when the page is loaded you have to use the @value attribute. [/QUOTE] What is @value attribute? I am completely confused by the sentence. Do you mean if I want to display some pre-selected values when the page is loaded? --- Bruno Ar

Re: UISelectMany and Argument Type Mismatch

2005-10-11 Thread Bruno Aranda
Well, I wanted to put : > Your code is not ok. You are binding the faces components to wrong > types: h:selectManyListbox cannot be bound to String[] and > f:selectItems cannot be bound to an instance of UISelectMany > > The best pattern here is to pass an Array/List of SelectItem objects > to

Re: UISelectMany and Argument Type Mismatch

2005-10-11 Thread Bruno Aranda
Your code is not ok. You are binding the faces components to wrong types: h:selectManyListbox cannot be bound to String[] and f:selectItems cannot be bound to an instance of UISelectMany The best pattern here is to pass an Array/List of SelectItem objects to the value of your f:selectItems com

RE: UISelectMany and Argument Type Mismatch

2005-10-11 Thread Guillermo Meyer
dataFileItems in the backing bean should return a Map or an array of SelectItem[]. Regards. Guillermo. -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] Sent: Martes, 11 de Octubre de 2005 10:27 a.m. To: users@myfaces.apache.org Subject: UISelectMany and Argument Type

UISelectMany and Argument Type Mismatch

2005-10-11 Thread Caroline Jen
I used the UISelectItem to set its value to the SelectItem (I have many SelectItme). Then, I added each UISelectItem to the UISelectMany . When I displayed a list box, I got the runtime error: "IllegalArgumentException: argument type mismatch" In my JSP, I create a list box for multiple select