how to select listbox items while editing

how to select listbox items while editing

Hi , i have employee , dept , employeedept table. an employee can worked for multiple dept. when i create and employee i select multiple dept item from listbox and saved to employeedept table, i want items to be alredy selected when i click on employee link  for that i can see that what depts a employee worked for .

Your Source Record List needs a boolean attribute that holds the selected departments. On edit mode, your query needs to set the boolean attribute do true to the selected itens. 

I usually create a Structure that holds the Department Entity and a boolean, and use this structure on the advanced query to return all departments, with the boolean set to true when it's selected to the employee.


Thanks Victor