Hi everybody, I am Chaitanya, I have a link which when clicked requests list of users present. There is a model which selects the list of users with their names.
If it is one single user all his information is retrieved and dumped in to the Bean. Now I am retrieving list of users with their names only. Not the entire details.
I have setter and getter methods in Bean. So if I retrieve 10 user names, then I should have a array of 10 Beans. Can I do like this?
And this Bean consists of 25 setter and getter methods. Here I am using only set user name property. The rest of the setter and getter methods are useless.
Can I go with Beans or simply create an array? If I should go with Beans, then, can I use the previous Bean which consists of 25 setter and getter properties. Or shall I create another Bean which exactly consists the name property?
Bear Bibeault wrote:You need to check your basic Java logic.
Everything is fine, it is working with String Array, not with Bean Array. I just replaced the Bean class with String. It worked fine. Coming to Beans it is not working.
The error lies in the while loop. I also checked whether there are any records in the faculty table. There are 3 records. So the Bean is initialized to array of size 3.