ImageGallery Events
ImageGallery has the following event associated with it:
onSelection Event
An event callback that is invoked by the platform when an Image is selected in ImageGallery.
Syntax
Read/Write
Read + Write
Example
Platform Availability
Available in the IDE.
Available on all platforms.
postOnclickJS Event
This event allows the developer to execute custom javascript function after the onClick callback of the ImageGallery is invoked. This is applicable only for Mobile Web channel.The function must exist in a javascript file under project>module>js folder.
Syntax
Read/Write
Read + Write
Remarks
In for the events preOnclickJS and postOnclickJS you cannot access application model or APIs, as these functions are executed in browser whereas the remaining JavaScript modules are executed in server. For these events you can access browser objects ( window, document etc..) to change UI or perform some validation before server event. If the event preOnclickJS returns true, only then the request is sent to server for subsequent action. You have to specify the modules to be loaded in browser using import JavaScript tab, only then these files get included in.html script tag otherwise you will not be able to access the objects defined in those modules.
Example
Platform Availability
Available in the IDE.
Available on Server side Mobile Web (Advanced) platform only.
preOnclickJS Event
This event allows the developer to execute custom javascript function when the ImageGallery is invoked. This is applicable only for Mobile Web channel. The function must exist in a javascript file under project>module>js folder.
Syntax
Read/Write
Read + Write
Remarks
In for the events preOnclickJS and postOnclickJS you cannot access application model or APIs, as these functions are executed in browser whereas the remaining JavaScript modules are executed in server. For these events you can access browser objects ( window, document etc..) to change UI or perform some validation before server event. If the event preOnclickJS returns true, only then the request is sent to server for subsequent action. You have to specify the modules to be loaded in browser using import JavaScript tab, only then these files get included in.html script tag otherwise you will not be able to access the objects defined in those modules.
Example
Platform Availability
Available in the IDE.
Available on Server side Mobile Web (BJS and Advanced) platform only.