onShow of a form we load a dataset into a treeView (servoy-extra component). Then we call setExpandNode and receive the warning
WARN com.servoy.j2db.server.ngclient.api - You are calling a component sync api method (to browser) in form ‘XY’ before the form is available in browser’s DOM. This should be avoided.
Is there a hook, where we can call setExpandNode? A hook after the form is available in the DOM? Like ‘afterAvailable’?
Thank you for the answer. I actually did try with onReady, but the event is triggered continuously, not just once. Do you know, how I can unregister the event, if it got triggered the first time?
Thank you for the hint with onReady. Good to know, that it should work.
I’ll simplify my form and check, if triggering stops. To figure out what fires the event.