I get the following exceptions if I cancel a find.:
This before I changed a code line for debugging.:
org.mozilla.javascript.WrappedException: Wrapped java.lang.ClassCastException: com.servoy.j2db.dataprocessing.Record cannot be cast to com.servoy.j2db.dataprocessing.FindState (H:\servoy_workspace_git\boss\svy_search\globals.js#85)
Then after the user entered their criteria and hit enter:
forms.ContractsInfo.controller.search()
But does not in Servoy 7 – it says ‘record cannot be cast to’ like the above user. Or it spits into the console the below while providing a blank error to the user. If I turn off the change of tabs, it works if I am on the tab that shows Contracts Info. It does not otherwise.
this is a very old issue and the problem was in the solution…
Because before doing search(), an loadAllRecords() was already triggered first on a relation that was also in find mode
Do then the search() is just confused.
What is the exact stack (full stacktrace) that you have?
Because i have no idea if it is really the same.
yes this is exactly the above scenario
where i already told there that somehow you do a load(All)Records() on a related foundset where the parent foundset is in find() mode.
That should not be done, that is a weird state,
If you go in find then don’t also try to load data through the related foundset of that parent find state.
If you have a (sample) solution where this happens we can have a look if you create a case for this.
Maybe we can test for this and ignore this relation completely, but i want to first see a valid use case.