View Full Version : UI Pages with Custom Event Delegates

2013-07-24, 06:23
If you are creating UI Pages (http://www.lianja.com/resources/blog/39-coding-tips/347-working-with-ui-page-libraries) to use with Lianja.showDialog() and Lianja.showDialogPanel() and your UI Page has custom event delegates, you need to make sure that these are also accessed from the Library.

Once you have completed your UI Page and it is ready to be saved to the Page Library, set the path of your Custom Library script to the Library. Depending on the event delegates you have created, your Custom Library script will be set in either the Page Attributes or the Section Attributes. My example here only has a Custom section menu delegate so the Custom library is Section specific. I have added the 'lib:/' prefix to the script filename so that it is accessed from the Library.


Switching to the Apps Workspace, I need to make sure that my script is actually in the Library:



Then back to the Pages Workspace and save my UI Page to the Page Library:


Now, when I call my UI Page from another App using Lianja.showDialogPanel(), the Custom section menu delegate code is called from the Custom library in the Lianja Library.