forms related condition based
Hi I have a formbean which is submitting one user out of 10 user to my action class.
Now In database there is one table which conatins multiple rows.But out of all rows only some rows are shown to user depending upon the user.
now the problem is
I have to write a class where I will get the user name and on the basis of that name I have to fetch data from table.
so how to get this user name from form bean and based on this user condition how to fetch data.
if any once help on this condiation based code.it would be of great help.
SearchForm searchform=(SearchForm) form;
String name=searchForm.getName
ok from here I got the username.Now based on this username I have to recive the user related data.
I have one method in database getallThings().
now I have to get data according to user and things related to him
> SearchForm searchform=(SearchForm) form;
> String name=searchForm.getName
>
> ok from here I got the username.Now based on this
> username I have to recive the user related data.
> I have one method in database getallThings().
> now I have to get data according to user and things
> related to him
Read evnafets reply again - write a new method that has a query with q where clause.
Or use the existing getAllThings() methods and remove the redundant data from the Collection or the array that this object returns.
ram.