Hi friends,
I have two dropdown list boxes and one inputfield in my BSP application.One is for employee ID, Task list and employee name.So once employee id is selected from the list ,corresponding tasks for the that should be displayed in the second dropdown list.If i select the any task from the dropdown list it should display the corresponding employee name.This is what my requirement.
But my problem is unable to display the employee name once the task is selected from the list for an employee.
While debugging i have seen the flow how its working.. when i click on the first dropdown lisbox(emp ID) , the corresponding employee task lists are getting filled in the task list drop down.storing this selected employee in a var "sel". now when i click on task list drop down , storing this selected value in "task". Here to get the employee name i need to get the value of "sel"(selected emp code) but in this case the value is zero.
I set the application to stateful.
Now the request is in second drop down.But i want to catch the selected value of the first one.Can anybody augget me how should i do it?
Please help me out.
Thanks in Advance.
Regards
sireesha.
Hi Sireesha,
Are you using MVC approach or page with flow logic?
If you are using MVC approach then you can use MVC binding concepts and you can have the employee id as an model class attribute and then hide it in the view when you are displaying the list of tasks. Once a task is selected the DO_HANDLE_DATA method will retrieve your form fields and you can use employee id from there.
In case you are using page with flow logic...when you select a employee id...store that value into a variable and write it as a hidden field on your layout. Next when you select any task...at the oninputprocessing you can do get form fields--this will retrieve the emp id value since its there in the layout.
I would suggest you to try and use MVC approach to use the model binding concepts also you can eliminate making it a stateful application by having cookies.
Cheers
Add a comment