I am currently working on populating a dropdown from a list of school id's and I am not sure if returning a list of LabelValueBean from Data Access Layer is a good approach? What I mean to say is, I have a application which follows EJB architecture where entry point is the Struts Action or the Command class followed by the Business Delegate-> EJB-> Application Service -> DAO - DB. Now in the DAO layer, I have a query to which I pass the list of school id's and it returns me the filtered list of schools which are present in the Database along with their name. So I have a School Name and School Id which I would like to put into LabelValueBean("schoolName","schoolId") and then returning it to the action, set it into Session / Request attribute and then populate the dropdown using .
Is it preferable to return a list of LabelValueBean from the DAO layer like:
Please help me out on the same.
Meri Zindagi Hain Tab Tak.. Jab Tak Tera Sahara.... Har Taraf Tu Hi Tu Hain SAI Tera Hi Hain Nazara.....