Page 1 of 1

afterLoad event

Posted: Fri Oct 06, 2017 7:41 pm
by SeanTyree
We have a rich application that gets called directly from Atrium as a menu item, and it also gets called from inside of a Genie application.
I have custom widget code that runs in the pui-onload as a global event, but it does not run when the application is run from Genie. I have tried adding calls from the Genie skin's afterLoad event, but it still does not run.

Is there something wrong or should I put this code someplace else in order to run from inside Genie?

Thanks,
Sean

Re: afterLoad event

Posted: Fri Oct 06, 2017 11:12 pm
by Scott Klement
Do you mean pui.onload? Is it possible that this is the problem, that you made it "pui-onload" instead of "pui.onload"?

The 5250 events like afterLoad are not run for Rich Displays. Put, pui.onload is. In fact, one of the Genie skins that we ship with the product (Hybrid) uses pui.onload as part of the skin to make certain features work in Rich Displays that are run from that skin.

Now that I'm thinking about that -- could that be the problem? Maybe your Genie skin defines pui.onload somewhere else, and it is replacing your definition? Since pui.onload is global, you can only have one defined. If you try to re-define it, it'll replace the previous definition.

I'd look for those two things, above. And, if not one of those, debug things and see why it's not working.

Re: afterLoad event

Posted: Mon Oct 09, 2017 1:12 pm
by SeanTyree
Scott, yes I did mean pui.onload (typo).

I think you might have pinpointed the problem. I will look for the Genie skin overriding the pui.onload definition.

Thanks,
Sean

EDIT: I found the problem. It wasn't getting redefined, the custom widget .js file was loading first in the Genie skin start.html and was throwing a pui undefined error.

Thanks again Scott!