This content has been marked as final.
Show 3 replies
-
1. Re: selectmanyListBox : how to bind with resultlist
armahdi Jan 22, 2011 3:41 AM (in response to armahdi)Note:
var=question is actually var=employee
.. Does var work here?> its not giving me errors yet..
ok i did try one more thing, i accidentally gave a value=something.name
when something didnt really exist (there was no component with @Name with something as value) and it gave me the same exact error...
So i know that some how employeeQuery is null I think. how can be as employeeQuery is being used in its own CRUD page where I can add employees and delete employees as well. I was hoping that when you do @Name(employeeQuery)
, you should be able to access that component.. Is that not true?? -
2. Re: selectmanyListBox : how to bind with resultlist
armahdi Jan 22, 2011 3:59 AM (in response to armahdi)ok Sorry for one thing: The first selectManyListBox doesnt work either. Now i need to know how to fill them both. It wasnt coming actually i thought that it will when I fill it.
so my first list looks like this now:
<h:selectManyListbox id="BTypelist" value="#{department.employees}" var ="employee"> <f:selectItems value="#{employees.name}" /> </h:selectManyListbox>
I want to list all the employee names in that department. How can i accomplish that??
please help!!
Thanks
-
3. Re: selectmanyListBox : how to bind with resultlist
armahdi Jan 22, 2011 5:04 AM (in response to armahdi)Ok I did accomplish something:
I made a transient linkedhashmap in the department class and in the getter of this Map i filled it out with
employee.getName()as key , employee as value
and I attached Map with the list component:
<h:selectManyListbox id="BTypelist" value="#{switchList.list1}" > <f:selectItems value="#{department.employeesNames}" /> </h:selectManyListbox>
I Now i need to link EmployeeQuery.resultlist with the second List. Does any one know how to do that. Or if i need to make a Map where can i make it and then how to refer it.
Thanks.
Syed