Setup form Issue Web Client

Hello all,

I have this issue of conversion from smart client to web client, one of the issues like:
for example:
form.formName.foundset.loadRecords(ds); // using dataset

it works smoothly in smart client, but in web client: it gives me the error like:
Can’t setup form: formName

java.lang.ClassCastException

Any ideas of what maybe the problem somewhere?

Thank you!

what happens if you change it to:
forms.formName.foundset.loadRecords(query, args);

This is to be preferred anyway, as doing a query in order to retrieve the dataset and using that dataset to do a loadRecords again, will result in 2 queries in the back-end.
Spoil of resources if you ask me.