Difference between revisions of "Custom Delegates"
Yvonne.milne (Talk | contribs) |
Yvonne.milne (Talk | contribs) |
||
Line 137: | Line 137: | ||
==Change== | ==Change== | ||
− | The delegate for the | + | The delegate for the change event. |
===Supported by=== | ===Supported by=== | ||
Line 148: | Line 148: | ||
==Click== | ==Click== | ||
− | The delegate for the | + | The delegate for the click event. |
===Supported by=== | ===Supported by=== | ||
Line 155: | Line 155: | ||
==Collapsed== | ==Collapsed== | ||
− | The delegate for the | + | The delegate for the collapsed event. |
===Supported by=== | ===Supported by=== | ||
Line 220: | Line 220: | ||
==Deactivate== | ==Deactivate== | ||
− | The delegate for the | + | The delegate for the deactivate event. |
===Supported by=== | ===Supported by=== | ||
Line 242: | Line 242: | ||
==Destroy== | ==Destroy== | ||
− | The delegate for the | + | The delegate for the destroy event. |
===Supported by=== | ===Supported by=== | ||
Line 284: | Line 284: | ||
==Expanded== | ==Expanded== | ||
− | The delegate for the | + | The delegate for the expanded event. |
===Supported by=== | ===Supported by=== | ||
Line 304: | Line 304: | ||
==Gestures== | ==Gestures== | ||
− | The catch all delegate for the | + | The catch all delegate for the gestures event. |
===Supported by=== | ===Supported by=== | ||
Line 311: | Line 311: | ||
==Got Focus== | ==Got Focus== | ||
− | The delegate for the | + | The delegate for the gotFocus event. |
===Supported by=== | ===Supported by=== | ||
Line 318: | Line 318: | ||
==Hotkey== | ==Hotkey== | ||
− | The delegate for the | + | The delegate for the hotkey event, e.g. F1 - F10, Ctrl+F1. |
===Supported by=== | ===Supported by=== | ||
Line 326: | Line 326: | ||
==Inactive== | ==Inactive== | ||
− | The delegate for the | + | The delegate for the inactive event. |
===Supported by=== | ===Supported by=== | ||
Line 337: | Line 337: | ||
==Init== | ==Init== | ||
− | The delegate for the | + | The delegate for the init event. |
===Supported by=== | ===Supported by=== | ||
Line 344: | Line 344: | ||
===Notes=== | ===Notes=== | ||
* Init is the first of the four key events to be called when an App is opened: | * Init is the first of the four key events to be called when an App is opened: | ||
− | |||
# Init | # Init | ||
# Load | # Load | ||
# Ready | # Ready | ||
# Activate | # Activate | ||
− | + | * See [[Event Delegate Sequences#Opening an App|Opening an App]] for more details. | |
− | See [[Event Delegate Sequences#Opening an App|Opening an App]] for more details. | + | |
==Interactive Change== | ==Interactive Change== | ||
− | The delegate for the | + | The delegate for the interactiveChange event. This is called after each key is pressed. |
===Supported by=== | ===Supported by=== | ||
Line 377: | Line 375: | ||
==Load== | ==Load== | ||
− | The delegate for the | + | The delegate for the load event. |
===Supported by=== | ===Supported by=== | ||
Line 384: | Line 382: | ||
===Notes=== | ===Notes=== | ||
* Load is the second of the four key events to be called when an App is opened: | * Load is the second of the four key events to be called when an App is opened: | ||
− | |||
# Init | # Init | ||
# Load | # Load | ||
# Ready | # Ready | ||
# Activate | # Activate | ||
− | + | * See [[Event Delegate Sequences#Opening an App|Opening an App]] for more details. | |
− | See [[Event Delegate Sequences#Opening an App|Opening an App]] for more details. | + | |
==Lost Focus== | ==Lost Focus== | ||
− | The delegate for the | + | The delegate for the lostFocus event. |
===Supported by=== | ===Supported by=== | ||
Line 400: | Line 396: | ||
==Middle Click== | ==Middle Click== | ||
− | The delegate for the | + | The delegate for the middleClick event. |
===Supported by=== | ===Supported by=== | ||
Line 407: | Line 403: | ||
==Mouse Down== | ==Mouse Down== | ||
− | The delegate for the | + | The delegate for the mouseDown event. |
===Supported by=== | ===Supported by=== | ||
Line 414: | Line 410: | ||
==Mouse Enter== | ==Mouse Enter== | ||
− | The delegate for the | + | The delegate for the mouseEnter event. |
===Supported by=== | ===Supported by=== | ||
Line 421: | Line 417: | ||
==Mouse Leave== | ==Mouse Leave== | ||
− | The delegate for the | + | The delegate for the mouseLeave event. |
===Supported by=== | ===Supported by=== | ||
Line 428: | Line 424: | ||
==Mouse Move== | ==Mouse Move== | ||
− | The delegate for the | + | The delegate for the mouseMove event. |
===Supported by=== | ===Supported by=== | ||
Line 435: | Line 431: | ||
==Mouse Up== | ==Mouse Up== | ||
− | The delegate for the | + | The delegate for the mouseUp event. |
===Supported by=== | ===Supported by=== | ||
Line 442: | Line 438: | ||
==Pan gesture== | ==Pan gesture== | ||
− | The | + | The pan gesture delegate. |
===Supported by=== | ===Supported by=== | ||
Line 456: | Line 452: | ||
==Pinch gesture== | ==Pinch gesture== | ||
− | The | + | The pinch gesture delegate. |
===Supported by=== | ===Supported by=== | ||
Line 463: | Line 459: | ||
==Ready== | ==Ready== | ||
− | The delegate for the | + | The delegate for the ready event. |
===Supported by=== | ===Supported by=== | ||
Line 470: | Line 466: | ||
===Notes=== | ===Notes=== | ||
* Ready is the third of the four key events to be called when an App is loaded: | * Ready is the third of the four key events to be called when an App is loaded: | ||
− | |||
# Init | # Init | ||
# Load | # Load | ||
# Ready | # Ready | ||
# Activate | # Activate | ||
− | + | * See [[Event Delegate Sequences#Opening an App|Opening an App]] for more details. | |
− | See [[Event Delegate Sequences#Opening an App|Opening an App]] for more details. | + | |
==Refresh== | ==Refresh== | ||
− | The delegate for the | + | The delegate for the refresh event. |
===Supported by=== | ===Supported by=== | ||
Line 486: | Line 480: | ||
==Resize== | ==Resize== | ||
− | The delegate for the | + | The delegate for the resize event. |
===Supported by=== | ===Supported by=== | ||
Line 492: | Line 486: | ||
===Notes=== | ===Notes=== | ||
+ | * Called when the Canvas Section parent container is resized. | ||
+ | * See [[Advanced Canvas Control Custom Delegates]] for more on the custom delegates supported by each [[Advanced Canvas Control Attributes|EditBox, Image, Label and Rich Text Editor Canvas Section Advanced Controls]]. | ||
==Resized== | ==Resized== | ||
− | The delegate for the | + | The delegate for the resized event. |
===Supported by=== | ===Supported by=== | ||
Line 500: | Line 496: | ||
===Notes=== | ===Notes=== | ||
+ | * Called when the Canvas Section is resized. | ||
==Selection Changed== | ==Selection Changed== | ||
Line 509: | Line 506: | ||
==Sort== | ==Sort== | ||
− | The delegate for the column | + | The delegate for the column sort event fired when the column header is clicked. |
===Supported by=== | ===Supported by=== | ||
Line 565: | Line 562: | ||
==Timer== | ==Timer== | ||
− | The delegate for the | + | The delegate for the timer event. |
===Supported by=== | ===Supported by=== | ||
Line 576: | Line 573: | ||
==Unload== | ==Unload== | ||
− | The delegate for the | + | The delegate for the unload event. |
===Supported by=== | ===Supported by=== | ||
Line 583: | Line 580: | ||
===Notes=== | ===Notes=== | ||
* The Unload delegate is called before the Destroy delegate when closing an App. | * The Unload delegate is called before the Destroy delegate when closing an App. | ||
− | + | * See [[Event Delegate Sequences#Closing an App|Closing an App]] for more details. | |
− | See [[Event Delegate Sequences#Closing an App|Closing an App]] for more details. | + | |
==Valid When== | ==Valid When== | ||
− | The delegate for the | + | The delegate for the validWhen event. |
===Supported by=== | ===Supported by=== | ||
Line 594: | Line 590: | ||
==Visible When== | ==Visible When== | ||
− | The delegate for the | + | The delegate for the visibleWhen event. |
===Supported by=== | ===Supported by=== | ||
Line 602: | Line 598: | ||
* Called on desktop runtime only. | * Called on desktop runtime only. | ||
* The Visible When delegate is called when the UI Presentation Rules 'Visible when' attribute is checked when an App is opened. | * The Visible When delegate is called when the UI Presentation Rules 'Visible when' attribute is checked when an App is opened. | ||
− | + | * See [[Event Delegate Sequences#Opening an App|Opening an App]] for more details. | |
− | See [[Event Delegate Sequences#Opening an App|Opening an App]] for more details. | + | |
− | + | ||
* The Visible When delegate is also called when the UI Presentation Rules 'Visible when' attribute is checked when moving between Pages. | * The Visible When delegate is also called when the UI Presentation Rules 'Visible when' attribute is checked when moving between Pages. | ||
− | + | * See [[Event Delegate Sequences#Navigating between Pages|Navigating between Pages]] for more details. | |
− | See [[Event Delegate Sequences#Navigating between Pages|Navigating between Pages]] for more details. | + | |
=Event Sequences= | =Event Sequences= |
Revision as of 09:55, 30 March 2016
Under Construction
Contents
- 1 Scripting Language
- 2 Custom Library
- 3 Custom Delegates
- 3.1 Activate
- 3.2 After Data Changed
- 3.3 After Data Create
- 3.4 After Data Delete
- 3.5 After Data Update
- 3.6 After Row Change
- 3.7 Before Data Create
- 3.8 Before Data Delete
- 3.9 Before Data Update
- 3.10 Change
- 3.11 Click
- 3.12 Collapsed
- 3.13 Context Menu
- 3.14 Custom footer menu
- 3.15 Custom search command
- 3.16 Custom section menu
- 3.17 Data Changed
- 3.18 Deactivate
- 3.19 Default Action
- 3.20 Destroy
- 3.21 Dialog button delegate
- 3.22 Double click
- 3.23 Enabled When
- 3.24 Expanded
- 3.25 Gestures
- 3.26 Got Focus
- 3.27 Hotkey
- 3.28 Inactive
- 3.29 Init
- 3.30 Interactive Change
- 3.31 Instant Search
- 3.32 Link Click
- 3.33 Load
- 3.34 Lost Focus
- 3.35 Middle Click
- 3.36 Mouse Down
- 3.37 Mouse Enter
- 3.38 Mouse Leave
- 3.39 Mouse Move
- 3.40 Mouse Up
- 3.41 Pan gesture
- 3.42 Parent data changed
- 3.43 Pinch gesture
- 3.44 Ready
- 3.45 Refresh
- 3.46 Resize
- 3.47 Resized
- 3.48 Selection Changed
- 3.49 Sort
- 3.50 Swipe down gesture
- 3.51 Swipe left gesture
- 3.52 Swipe right gesture
- 3.53 Swipe up gesture
- 3.54 Tap gesture
- 3.55 Tap and hold gesture
- 3.56 Timer
- 3.57 Unload
- 3.58 Valid When
- 3.59 Visible When
- 4 Event Sequences
- 5 Other Delegates
- 6 Inline Delegates
Scripting Language
The scripting language for custom code.
Supported by
App, Page, all Sections (except Page Center).
Notes
Available choices are:
Scripting Language | Notes |
---|---|
Inherit | This is the default. The scripting language is inherited from the parent container, i.e. Section inherits from Page, Page from App. For the App, the scripting language must be specified. |
Recital | Desktop Apps only. |
Visual FoxPro | Desktop Apps only. |
Python | Desktop Apps only. |
JavaScript | Desktop and Web/Mobile Apps. |
PHP | Desktop Apps only. |
Custom Library
The name of the custom library containing the delegate code. This library is loaded when the App is opened.
Supported by
App, Page, all Sections (except Page Center).
Notes
- A filename can be entered.
- Clicking the [...] button will automatically create a file. The file is created with a name based on the name of the current container and with a file extension to match the selected scripting language, e.g. lib_page1_section1.js for section1 in page1 with JavaScript selected. The file is automatically opened in the Script Editor in the Apps workspace.
- There is no need to specify a Custom Library. When the [...] is clicked next to a Custom Delegate, e.g. Activate, the hierarchy is checked for an existing Custom Library: Section, Page, App and a file automatically created for the current container if none exists. As before, the file is automatically opened in the Script Editor in the Apps workspace.
- Note that if you want to have all the event delegate code stored in a single Custom Library, just click the [...] for the App Custom Library and any subsequently added event delegate code will be added to the automatically created file.
Custom Delegates
Activate
The delegate for the activate event.
Supported by
App, Page, all Sections (except Page Center), Checklistview Gadget, Grid Gadget, Listview Gadget, Treeview Gadget, Form Section Fields, Canvas Section Advanced Controls.
Notes
- Activate is the fourth of the four key events to be called when an App is opened:
- Init
- Load
- Ready
- Activate
- See Opening an App for more details.
- The Activate delegate is also called when moving between Pages.
- See Navigating between Pages for more details.
After Data Changed
The delegate for the dataChanged event called after the data is read on opening the App, navigating between records or after data modification operations.
Supported by
Attachments Section, Canvas Section, Form Section, Grid Section, Image Strip Section, Grid Gadget
Notes
- See Event Delegate Sequences for more details.
- See Data Changed for the Form Section Field and Canvas Section Advanced Control dataChanged event delegate.
- For Attachments Sectiona, Grid Sections and Image Strip Sections, the Data Changed event delegate is only called when the Section is the primary Section on the Page (tied to the Page actionbar). When they are related to a parent Section, their Parent Data Changed event delegate is called.
After Data Create
The delegate for the afterCreated event.
Supported by
Attachments Section, Canvas Section, Form Section, Grid Section, Grid Gadget
Notes
- Called after a new record has been added.
- See Adding a new record for more details.
After Data Delete
The delegate for the afterDelete event.
Supported by
Attachments Section, Canvas Section, Form Section, Grid Section, Grid Gadget
Notes
- Called after a record has been deleted.
- See Deleting a record for more details.
After Data Update
The delegate for the afterUpdate event.
Supported by
Attachments Section, Canvas Section, Form Section, Grid Section, Grid Gadget
Notes
- See Updating a record for more details.
After Row Change
The delegate for the afterRowChange event called when moving to a new row in a Canvas Section TreeGrid Advanced Control.
Supported by
Canvas Section TreeGrid Advanced Control
Notes
- See Advanced Canvas Control Custom Delegates for more on the custom delegates supported by each Canvas Section Advanced Control.
Before Data Create
The delegate for the beforeCreated event.
Supported by
Attachments Section, Canvas Section, Form Section, Grid Section, Grid Gadget
Notes
- The first event to be called when the Add button is clicked in the Page, Section or Gadget actionbar.
- See Adding a new record for more details.
Before Data Delete
The delegate for the beforeDelete event.
Supported by
Attachments Section, Canvas Section, Form Section, Grid Section, Grid Gadget
Notes
- The first event to be called when the Delete button is clicked in the Page, Section or Gadget actionbar.
- See Deleting a record for more details.
Before Data Update
The delegate for the beforeUpdate event.
Supported by
Attachments Section, Canvas Section, Form Section, Grid Section, Grid Gadget
Notes
- See Updating a record for more details.
Change
The delegate for the change event.
Supported by
Form Section Field, Canvas Section Advanced Control, Checklistview Gadget
Notes
- Called when the Enter or Tab key is pressed in a Form Section Field or Canvas Section Advanced Control or when an item is checked in a Checklistview Gadget.
- See Advanced Canvas Control Custom Delegates for more on the custom delegates supported by each Canvas Section Advanced Control.
- Not to be confused with the Data Changed event delegate, which is called on Form Section Fields or Canvas Section Advanced Controls when navigating between records and after data modification operations (Form Section Fields only).
Click
The delegate for the click event.
Supported by
Notes
Collapsed
The delegate for the collapsed event.
Supported by
All Sections (except Page Center)
Notes
- The Collapsed delegate is called when a collapsible Section is collapsed by clicking/tapping on its header.
- The Collapsed delegate is not called in Development View in the Lianja App Builder.
- When a Section is collapsed programmatically, the Collapsed delegate is not called. Sections can be collapsed using any of the following:
Lianja.get("pageid.sectionid").collapse() Lianja.showDocument("page:pageid.sectionid?action=collapse") Lianja.showDocument("section:sectionid?action=collapse")
- The Collapsable attribute determines whether a Section can be collapsed or whether it is always expanded. This is overridden in these cases:
- The last Section on a Page with the 'Stretch last section' attribute set to True cannot be collapsed (desktop).
- The last Section on a Page cannot be collapsed (Web/Mobile).
- Sections with the 'Hide header' attribute set to True cannot be collapsed.
Context Menu
The delegate for the Context Menu event.
Supported by
Notes
The delegate for the footer menu event.
Supported by
all Sections (except Page Center)
Notes
See Section Footers for more details.
Custom search command
The delegate for the search event.
Supported by
Notes
The delegate for the section menu event.
Supported by
all Sections (except Page Center)
Notes
See Section Menus for more details.
Data Changed
The delegate for the dataChanged event.
Supported by
Form Section Fields, Canvas Section Advanced Controls
Notes
- Called when navigating between records.
- Also called after data modification operations (Form Section Fields only).
- See Event Delegate Sequences for more details.
- See After Data Changed for the Section and Grid Gadget dataChanged event delegate.
- Not to be confused with the Change event delegate, which is called when the Enter or Tab key is pressed in a Form Section Field or Canvas Section Advanced Control or when an item is checked in a Checklistview Gadget.
Deactivate
The delegate for the deactivate event.
Supported by
App, Page, all Sections (except Page Center), Checklistview Gadget, Grid Gadget, Listview Gadget, Treeview Gadget, Form Section Fields, Canvas Section Advanced Controls
Notes
- The Deactivate delegate is called when moving between Pages.
See Navigating between Pages for more details.
Default Action
The default action for this control.
Supported by
Canvas Section Advanced Controls.
Notes
- For CommandButtons this will be performed on a Click event. For other applicable controls, it will be performed on the Change event.
- Lianja/VFP scripting in Desktop Client only.
Destroy
The delegate for the destroy event.
Supported by
App, Page, all Sections (except Page Center).
Notes
- The Destroy delegate is called after the Unload delegate when closing an App.
See Closing an App for more details.
Dialog button delegate
The delegate for the dialogButtonClicked event.
Supported by
Notes
- If a dialogbutton on a Field has no delegate, the Section delegate will be called. If the section has no delegate, then the Page delegate will be called.
Double click
The delegate for the row doubleClicked event.
Supported by
Notes
Enabled When
The delegate for the enabledWhen event.
Supported by
Page, Attachments Section, Canvas Section, Custom Section, Form Section, Grid Section, Image Strip Section, Notifications Section, TabView Section, Timeline Section, Webview Section, Canvas Section Advanced Controls
Notes
- Called on desktop runtime only.
- The Enabled When delegate is called when the UI Presentation Rules 'Readonly when' attribute is checked when an App is opened.
See Opening an App for more details.
- The Enabled When delegate is also called when the UI Presentation Rules 'Readonly when' attribute is checked when moving between Pages.
See Navigating between Pages for more details.
Expanded
The delegate for the expanded event.
Supported by
All Sections (except Page Center).
Notes
- The Expanded delegate is called when a collapsed collapsible Section is expanded by clicking/tapping on its header.
- The Expanded delegate is not called in Development View in the Lianja App Builder.
- When a Section is expanded programmatically, the Expanded delegate is not called. Sections can be expanded using any of the following:
Lianja.get("pageid.sectionid").expand() Lianja.showDocument("page:pageid.sectionid?action=expand") Lianja.showDocument("section:sectionid?action=expand")
- The Collapsable attribute determines whether a Section can be collapsed or whether it is always expanded. This is overridden in these cases:
- The last Section on a Page with the 'Stretch last section' attribute set to True cannot be collapsed (desktop).
- The last Section on a Page cannot be collapsed (Web/Mobile).
- Sections with the 'Hide header' attribute set to True cannot be collapsed.
Gestures
The catch all delegate for the gestures event.
Supported by
Notes
Got Focus
The delegate for the gotFocus event.
Supported by
Notes
Hotkey
The delegate for the hotkey event, e.g. F1 - F10, Ctrl+F1.
Supported by
Notes
- The key is passed as a parameter, e.g. "F1".
Inactive
The delegate for the inactive event.
Supported by
App.
Notes
Inactive interval
The interval in seconds that the Inactive delegate will be called at runtime.
Init
The delegate for the init event.
Supported by
App, Page, all Sections (except Page Center), Checklistview Gadget, Grid Gadget, Listview Gadget, Treeview Gadget, Form Section Fields, Canvas Section Advanced Controls.
Notes
- Init is the first of the four key events to be called when an App is opened:
- Init
- Load
- Ready
- Activate
- See Opening an App for more details.
Interactive Change
The delegate for the interactiveChange event. This is called after each key is pressed.
Supported by
Notes
Instant Search
The delegate for the Instant Search event.
Supported by
Page.
Notes
The Instant Search delegate is called each time a printable character is typed in the Instant Search Box. The current Instant Search Box value is passed to the delegate as a parameter.
Link Click
The delegate for the Hyperlink/Button Click event.
Supported by
Notes
- This is called with two arguments: functionname(controlsource,text).
Load
The delegate for the load event.
Supported by
App, Page, all Sections (except Page Center), Checklistview Gadget, Grid Gadget, Listview Gadget, Treeview Gadget, Form Section Fields, Canvas Section Advanced Controls.
Notes
- Load is the second of the four key events to be called when an App is opened:
- Init
- Load
- Ready
- Activate
- See Opening an App for more details.
Lost Focus
The delegate for the lostFocus event.
Supported by
Notes
Middle Click
The delegate for the middleClick event.
Supported by
Notes
Mouse Down
The delegate for the mouseDown event.
Supported by
Notes
Mouse Enter
The delegate for the mouseEnter event.
Supported by
Notes
Mouse Leave
The delegate for the mouseLeave event.
Supported by
Notes
Mouse Move
The delegate for the mouseMove event.
Supported by
Notes
Mouse Up
The delegate for the mouseUp event.
Supported by
Notes
Pan gesture
The pan gesture delegate.
Supported by
Notes
Parent data changed
The delegate for the ParentDataChanged event.
Supported by
Notes
Pinch gesture
The pinch gesture delegate.
Supported by
Notes
Ready
The delegate for the ready event.
Supported by
App, Page, all Sections (except Page Center), Checklistview Gadget, Grid Gadget, Listview Gadget, Treeview Gadget, Form Section Fields, Canvas Section Advanced Controls.
Notes
- Ready is the third of the four key events to be called when an App is loaded:
- Init
- Load
- Ready
- Activate
- See Opening an App for more details.
Refresh
The delegate for the refresh event.
Supported by
Notes
Resize
The delegate for the resize event.
Supported by
Canvas Section Advanced Controls
Notes
- Called when the Canvas Section parent container is resized.
- See Advanced Canvas Control Custom Delegates for more on the custom delegates supported by each EditBox, Image, Label and Rich Text Editor Canvas Section Advanced Controls.
Resized
The delegate for the resized event.
Supported by
Canvas Section and Custom Section.
Notes
- Called when the Canvas Section is resized.
Selection Changed
The delegate for the Selection Changed event (for multi row selection).
Supported by
Notes
Sort
The delegate for the column sort event fired when the column header is clicked.
Supported by
Attachments Section, Grid Section and Grid Gadget.
Notes
- The Sort delegate is called on desktop runtime only.
- The Sort delegate is called with two arguments: nColumn, nDirection. Starting from 1, nColumn is the number of the column clicked. The nDirection argument indicates whether the requested sort is ascending (1) or descending (-1).
- The Attachments Section or Grid Section must have the Sortable attribute set to True for the Sort delegate to be called.
- If the Sort delegate is defined, the automatic sorting of sortable Attachments and Grid Sections is disabled (desktop only).
See Sortable Grid Sections (Video) for more on automatic sorting.
Swipe down gesture
The Swipe Down gesture delegate.
Supported by
Notes
Swipe left gesture
The Swipe Left gesture delegate.
Supported by
Notes
Swipe right gesture
The Swipe Right gesture delegate.
Supported by
Notes
Swipe up gesture
The Swipe Up gesture delegate.
Supported by
Notes
Tap gesture
The Tap gesture delegate.
Supported by
Notes
Tap and hold gesture
The Tap and Hold gesture delegate.
Supported by
Notes
Timer
The delegate for the timer event.
Supported by
Page, all Sections (except Page Center), Grid Gadget.
Notes
Timer interval
The timer interval in seconds that the Timer event will be called at runtime.
Unload
The delegate for the unload event.
Supported by
App, Page, all Sections (except Page Center).
Notes
- The Unload delegate is called before the Destroy delegate when closing an App.
- See Closing an App for more details.
Valid When
The delegate for the validWhen event.
Supported by
Notes
Visible When
The delegate for the visibleWhen event.
Supported by
Page, Attachments Section, Canvas Section, Custom Section, Form Section, Grid Section, Image Strip Section, Notifications Section, TabView Section, Timeline Section, Webview Section, Canvas Section Advanced Controls
Notes
- Called on desktop runtime only.
- The Visible When delegate is called when the UI Presentation Rules 'Visible when' attribute is checked when an App is opened.
- See Opening an App for more details.
- The Visible When delegate is also called when the UI Presentation Rules 'Visible when' attribute is checked when moving between Pages.
- See Navigating between Pages for more details.
Event Sequences
Loading an App
- Init
- Load
- DataChanged
- ParentDataChanged
- Refresh
- VisibleWhen (Runtime only)
- EnabledWhen (Runtime only)
- Ready
- Resized (Canvas and Custom Sections)
- Activate
For more details see Event Delegate Sequences: Opening an App
Closing an App
- Unload
- Destroy
For more details see Event Delegate Sequences: Closing an App
- See Event Delegate Sequences: Navigating between Pages
- See Event Delegate Sequences: Navigating Form Section
- See Event Delegate Sequences: Navigating Grid Section
Data Operations
- See Event Delegate Sequences: Adding a new record
- See Event Delegate Sequences: Updating a record
- See Event Delegate Sequences: Deleting a record
Other Delegates
App
Dynamic tile producer
The dynamic tile producer used to update the dynamic tile in the App Center. This can be a procedure or a URL.
Session data changed
The delegate for the Session Data Changed event
Page
Custom Actions
Add action
Delegate called when the 'Add New Record' button is clicked in the Page actionbar.
Cancel action
Delegate called when the 'Undo Changes' button is clicked in the Page actionbar.
Delete action
Delegate called when the 'Delete Record' button is clicked in the Page actionbar.
Edit action
Delegate called when the 'Edit Record' button is clicked in the Page actionbar.
First action
Delegate called when the 'First Record' button is clicked in the Page actionbar.
Last action
Delegate called when the 'Last Record' button is clicked in the Page actionbar.
Next action
Delegate called when the 'Next Record' button is clicked in the Page actionbar.
Previous action
Delegate called when the 'Previous Record' button is clicked in the Page actionbar.
Refresh action
Delegate called when the 'Refresh Page' button is clicked in the Page actionbar.
Save action
Delegate called when the 'Save Changes' button is clicked in the Page actionbar.
Calendar Section
Click delegate
Delegate to call when a calendar event is clicked.
See Calendar Section Options: Click delegate.
Custom delegate library
Custom library containing the day and event dynamic color delegates.
See Calendar Section Options: Custom delegate library.
Dynamic day backcolor
Delegate to return the background colors and dates. You should return this as a comma separated list. The delegate is called with one parameter: 'dates' or 'colors'. The currently selected cursor contains the selected records.
See Calendar Section Options: Dynamic day backcolor.
Dynamic event backcolor
Delegate to return the background color of the event for the specified event type, which is passed as a parameter.
See Calendar Section Options: Dynamic event backcolor.
Dynamic event forecolor
Delegate to return the foreground color of the event for the specified event type, which is passed as a parameter.
See Calendar Section Options: Dynamic event forecolor.
CatalogView Section
Caption delegate
The inline delegate to invoke when the caption is clicked.
Custom library
Custom library containing the Tile producer delegate.
Read more delegate
The inline delegate to invoke when the 'Read more' link is clicked. Alternatively, the 'Click' delegate can be used.
Tile producer
Delegate to call to render a custom tile. This should just output the HTML.
Charts Section and Charts Gadget
Delegate
An optional delegate to be called when segments of the chart are selected. By default the 'tooltip' for the segment selected will be used as a search key in any child sections.
GalleryView Section
Custom library
Custom library containing the Tile producer and Content producer delegates.
See GalleryView Section: Custom library
Content producer
Delegate to call to render the content. This should just output the HTML.
See GalleryView Section: Content producer
Tile producer
Delegate to call to render a custom tile. This should just output the HTML.
See GalleryView Section: Tile producer
Add delegate
Specify a delegate to call when the 'Add' icon is clicked.
Note that you can use an 'inline' delegate like this: $("section:yoursectionid?action=add")
Delete delegate
Specify a delegate to call when the 'Delete' icon is clicked.
Note that you can use an 'inline' delegate like this: $("section:yoursectionid?action=delete")
Selection delegate
Specify a delegate to call when a row is clicked.
Note that you can use an 'inline' delegate like this: $("section:yoursectionid?action=search&text={}").
Notice how {} is used to substitute the value of the item selected.
Org Chart Section
Custom delegate library
Custom library containing the dynamic color delegates.
See Org Chart Options: Custom delegate library
Search Panel
Custom search panel
The delegate used to create the custom search panel.
WebView Section
Also applies to Report Sections.
Delegate script
Delegate script name to be called when hyperlink is clicked (URL is passed as character string).
Fields and Columns
Validation
The Validation expression for editable Form Section fields, Grid Section columns and Canvas Section controls can be a call to a user defined function.
Inline Delegates
Inline Delegates - a single command - must be used for the Default Action, but they can also be used for other delegates in place of a function or procedure call.
Desktop
! Prefix
Prefix the command with a !:
Lianja/VFP
!? "Hello World"
JavaScript
!print("Hello World")
PHP
!echo "Hello World"
Python
!print "Hello World"
Lianja Methods
Call supported Lianja methods with no prefix:
All
Lianja.writeLog("Hello World")
PHP
Lianja::writeLog("Hello World")
$ Prefix
Prefix Lianja.showdocument() actions with a $:
$("page:page2")
is the equivalent of:
Lianja.showDocument("page:page2")
|| Chaining
As with the full Lianja.showDocument() method or the SHOWDOCUMENT() function, multiple actions can be chained by separating them with ||, e.g.
$("section:section3?action=hide||section:section2?action=hide")
Web App
Inline delegates must be written in JavaScript.
Commands and supported Lianja methods can be written without any prefix:
window.alert("Hello World") Lianja.writeLog("Hello World") Lianja.getElementByID("page1.section1").hide()
$ Prefix
Prefix Lianja.showdocument() actions with a $:
$("page:page2")
is the equivalent of:
Lianja.showDocument("page:page2")
|| Chaining
As with the full Lianja.showDocument() method or the SHOWDOCUMENT() function, multiple actions can be chained by separating them with ||, e.g.
$("section:section3?action=show||section:section2?action=show")