Difference between revisions of "Section"

From Lianjapedia
Jump to: navigation, search
(Created page with '====Properties==== This class supports the '''Common properties''' plus the following: {| class="wikitable" !width="20%"|Property !Access (R/RW) !Value !width="50%"|Description…')
 
(Methods)
 
(62 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
Note: property, method and event names should be referred to in lowercase in case-sensitive scripting languages.
 +
 
====Properties====
 
====Properties====
  
This class supports the '''Common properties''' plus the following:
+
This class supports the [[:Category:Common Properties|Common properties]] plus the following:
  
{| class="wikitable"
+
{| class="wikitable" width="100%"
 
!width="20%"|Property
 
!width="20%"|Property
 
!Access (R/RW)
 
!Access (R/RW)
Line 9: Line 11:
 
!width="50%"|Description
 
!width="50%"|Description
 
|-
 
|-
 
+
|ActiveControl
 +
|RW
 +
|Object
 +
|Currently active Control
 +
|-
 +
|ActivePage
 +
|RW
 +
|Character
 +
|Currently active Page
 +
|-
 +
|BackColor
 +
|RW
 +
|Character
 +
|Section's background color
 +
|-
 +
|Caption
 +
|RW
 +
|Character
 +
|Text displayed in the section header
 +
|-
 +
|valign="top"|Command
 +
|valign="top"|RW
 +
|valign="top"|Character
 +
|valign="top"|Custom BROWSE or EDIT command to be executed in the section
 +
|-
 +
|Count
 +
|R
 +
|Numeric
 +
|Number of formitems in the section
 +
|-
 +
|Database
 +
|RW
 +
|Character
 +
|The section's associated database
 +
|-
 +
|Editing
 +
|R
 +
|Boolean
 +
|Whether section is in Edit mode
 +
|-
 +
|Expanded
 +
|R
 +
|Boolean
 +
|Whether section is expanded
 +
|-
 +
|valign="top"|Filter
 +
|valign="top"|RW
 +
|valign="top"|Character
 +
|valign="top"|Filter expression to restrict the records included in the data
 +
|-
 +
|FooterCaption
 +
|RW
 +
|Character
 +
|Text displayed in section footer
 +
|-
 +
|FooterMenu
 +
|RW
 +
|Character
 +
|Custom footer menu
 +
|-
 +
|FooterVisible
 +
|RW
 +
|Boolean
 +
|Whether section footer is displayed
 +
|-
 +
|Grid
 +
|R
 +
|Object
 +
|Reference to [[Grid]] contained in section
 +
|-
 +
|HideActionbar
 +
|RW
 +
|Boolean
 +
|Whether section actionbar is hidden
 +
|-
 +
|HideHeader
 +
|RW
 +
|Boolean
 +
|Whether section header is hidden
 +
|-
 +
|Id
 +
|R
 +
|Character
 +
|Section's id
 +
|-
 +
|Menu
 +
|RW
 +
|Character
 +
|Custom menu (shown at top of section)
 +
|-
 +
|MenuVisible
 +
|RW
 +
|Boolean
 +
|Whether section menu is displayed
 +
|-
 +
|PageId
 +
|R
 +
|Character
 +
|Section's parent Page id
 +
|-
 +
|Picture
 +
|RW
 +
|Character
 +
|Filename of background image
 +
|-
 +
|Readonly
 +
|RW
 +
|Boolean
 +
|Whether section is read only
 +
|-
 +
|valign="top"|ReportColumns
 +
|valign="top"|RW
 +
|valign="top"|Character
 +
|Comma-separated list of column positions for the selected fields (Report only)
 +
|-
 +
|ReportColumnHeadings
 +
|RW
 +
|Character
 +
|Comma-separated list of column headings (Report only)
 +
|-
 +
|valign="top"|ReportFields
 +
|valign="top"|RW
 +
|valign="top"|Character
 +
|Comma-separated list of fields or expressions for table select statement (Report only)
 +
|-
 +
|ReportFilter
 +
|RW
 +
|Character
 +
|Filter expression (Report only)
 +
|-
 +
|ReportGridLines
 +
|RW
 +
|Boolean
 +
|Whether grid lines are displayed (Report only)
 +
|-
 +
|ReportGroupBy
 +
|RW
 +
|Character
 +
|Field name or expression for group by subtotalling (Report only)
 +
|-
 +
|ReportHeading
 +
|RW
 +
|Character
 +
|Heading text (Report only)
 +
|-
 +
|valign="top"|ReportHeadings
 +
|valign="top"|RW
 +
|valign="top"|Character
 +
|Comma-separated list of column headings (Report only, same as ReportColumnHeadings)
 +
|-
 +
|valign="top"|ReportHyperlinks
 +
|valign="top"|RW
 +
|valign="top"|Character
 +
|Comma-separated list of field names to render as hyperlinks for searching (Report only)
 +
|-
 +
|valign="top"|ReportOtherOptions
 +
|valign="top"|RW
 +
|valign="top"|Character
 +
|Ampersand-separated list of option=value pairs defining additional report options (Report only)
 +
|-
 +
|valign="top"|ReportSubTotals
 +
|valign="top"|RW
 +
|valign="top"|Character
 +
|Comma-separated list of column positions for the selected fields to subtotal on (Report only)
 +
|-
 +
|Searchpanelvisible
 +
|RW
 +
|Boolean
 +
|Whether section search panel is visible
 +
|-
 +
|valign="top"|Sql
 +
|valign="top"|RW
 +
|valign="top"|Character
 +
|The SQL statement used to populate a virtual table.
 +
|-
 +
|valign="top"|State
 +
|valign="top"|R
 +
|valign="top"|Character
 +
|Comma separated list of [[UI States]] that the Section handles.
 +
|-
 +
|valign="top"|Stretch
 +
|valign="top"|RW
 +
|valign="top"|Numeric
 +
|valign="top"|Whether background image should be scaled to fit section: 0 = do not scale, 1 = scale
 +
|-
 +
|Table
 +
|RW
 +
|Character
 +
|The section's associated table
 +
|-
 +
|valign="top"|Tabview
 +
|valign="top"|R
 +
|valign="top"|Object
 +
|valign="top"|Reference to [[Pageframe]] if the section is a tabview, otherwise .F..
 +
|-
 +
|valign="top"|Type
 +
|valign="top"|R
 +
|valign="top"|Character
 +
|valign="top"|Section's type: form, grid, webview, imagestrip, tabview, attachments, canvas, report, chart, custom, timeline, notifications
 +
|-
 +
|valign="top"|UIState
 +
|valign="top"|R
 +
|valign="top"|Character
 +
|The last [[UI States|UI State]] applied to the Section.
 +
|-
 +
|Url
 +
|RW
 +
|Character
 +
|URL rendered by section (WebView only)
 +
|-
 +
|Visible
 +
|RW
 +
|Boolean
 +
|Whether section is displayed
 +
|-
 +
|WebView
 +
|R
 +
|Object
 +
|Reference to [[Webview]] contained in section
 +
|-
 +
|valign="top"|Where
 +
|valign="top"|RW
 +
|valign="top"|Character
 +
|valign="top"|See Requery() method. This is applied as a parameter to Requery.
 +
|-
 
|}
 
|}
  
 
====Methods====
 
====Methods====
  
This class supports the '''Common methods''' plus the following:
+
This class supports the [[:Category:Common_Methods|Common Methods]] plus the following:
  
{| class="wikitable"
+
{| class="wikitable" width="100%"
 
!width="20%"|Method
 
!width="20%"|Method
 
!Args
 
!Args
 
!width="50%"|Description
 
!width="50%"|Description
 
+
|-
 +
|Add
 +
|None
 +
|Add a record and enter edit mode for the new record
 +
|-
 +
|valign="top"|addFormitem
 +
|valign="top"|type as Character
 +
|valign="top"|Add a formitem of the specified type to this Canvas section.  An object reference to the new [[FormItem|formitem]] is returned.  From v9.2.6.
 +
|-
 +
|valign="top"|addFormitem
 +
|valign="top"|database as Character, table as Character, column as Character
 +
|valign="top"|Add a data-bound formitem to this Canvas section.  An object reference to the new [[FormItem|formitem]] is returned.  From v9.2.6.
 +
|-
 +
|valign="top"|AddObject
 +
|valign="top"|existing as Object | newobject as Character, class as Character
 +
|valign="top"|Add an existing object or a new object, in which case the object's class must also be specified
 +
|-
 +
|valign="top"|AddSearchPanel
 +
|valign="top"|existing as Object
 +
|valign="top"|Add an existing container object into the custom search panel for a section
 +
|-
 +
|ApplyMetaData
 +
|None
 +
|Apply MetaData for the section
 +
|-
 +
|valign="top"|ApplyRules
 +
|valign="top"|None
 +
|valign="top"|Apply UI presentation rules for the section
 +
|-
 +
|Cancel
 +
|None
 +
|Cancel data changes
 +
|-
 +
|valign="top"|clearNamedParameters
 +
|valign="top"|None
 +
|valign="top"|Clear all named parameters previously set using setNamedParameter(name,value).
 +
|-
 +
|Collapse
 +
|None
 +
|Collapse the section
 +
|-
 +
|Delete
 +
|None
 +
|Delete the current record
 +
|-
 +
|Edit
 +
|None
 +
|Toggle edit mode for the current record
 +
|-
 +
|Editmode
 +
|None
 +
|Enter edit mode for the current record
 +
|-
 +
|Evaluate
 +
|Character string containing a JavaScript expression
 +
|Evaluate the specified JavaScript expression inside a webview section.
 +
|-
 +
|Expand
 +
|None
 +
|Expand the section
 +
|-
 +
|First
 +
|None
 +
|Move to the first data record
 +
|-
 +
|valign="top"|GoTo
 +
|valign="top"|recordnumber as Numeric
 +
|valign="top"|Move to the specified data record number
 +
|-
 +
|valign="top"|GetJSON
 +
|valign="top"|None
 +
|valign="top"|Return the current section data as JSON
 +
|-
 +
|Item
 +
|position as Numeric
 +
|Return a reference to the formitem object at the specified position
 +
|-
 +
|Last
 +
|None
 +
|Move to the last data record
 +
|-
 +
|valign="top"|LoadReport
 +
|valign="top"|reportname as Character
 +
|valign="top"|Load the specified [[Report Builder]] report.  The Section must be a [[Report Section Attributes|Report Section]].
 +
|-
 +
|MoveFirst
 +
|None
 +
|Move to the first data record
 +
|-
 +
|MoveLast
 +
|None
 +
|Move to the last data record
 +
|-
 +
|MoveNext
 +
|None
 +
|Move to the next data record
 +
|-
 +
|MovePrevious
 +
|None
 +
|Move to the previous data record
 +
|-
 +
|Next
 +
|None
 +
|Move to the next data record
 +
|-
 +
|Previous
 +
|None
 +
|Move to the previous data record
 +
|-
 +
|Print
 +
|None
 +
|Print the section
 +
|-
 +
|valign="top"|Requery
 +
|valign="top"|SQL SELECT or WHERE condition as Character
 +
|valign="top"|Requery a Virtual Table that the section is bound to
 +
|-
 +
|Refresh
 +
|None
 +
|Refresh the section
 +
|-
 +
|valign="top"|RefreshHeaderBadge
 +
|valign="top"|label as Character, recordCount as Number
 +
|valign="top"|Update the section header badge as used by [[Lianja_5_Getting_Started_2#Using_Instant_Search|Instant Search]] and [[Lianja_5_Getting_Started_2#Using_Instant_Selections|Instant Selections]] with the specified label text and record count.  refreshHeaderBadge("", 0) will hide the badge that has been manually shown.  From v5.5.
 +
|-
 +
|RemoveObject
 +
|existing as Object
 +
|Remove the specified object
 +
|-
 +
|valign="top"|ReopenTable
 +
|valign="top"|None
 +
|valign="top"|This can be used with [[Virtual Tables]] to reopen parameterized views.  It is available in desktop/web/mobile.
 +
|-
 +
|Save
 +
|None
 +
|Save data changes
 +
|-
 +
|valign="top"|Search
 +
|valign="top"|searchstring as Character
 +
|valign="top"|Search the current index for the specified text
 +
|-
 +
|valign="top"|setAllSelected
 +
|valign="top"|property as Character, value as Expression
 +
|valign="top"|Set the specified property to the specified value for all currently selected UI controls ([[Canvas Section Attributes|Canvas Section]]).
 +
|-
 +
|valign="top"|setJSON
 +
|valign="top"|jsondata as Character
 +
|valign="top"|Load JSON encoded data into the current section
 +
|-
 +
|valign="top"|setNamedParameter
 +
|valign="top"|name as Character, value as Character
 +
|valign="top"|Set the specified named parameter to the specified value. This can be used to set {parameter} or ?parameter macros in [[Virtual Tables|virtual table]] definitions.
 +
|-
 +
|valign="top"|setRelationship
 +
|valign="top"|childSection as character,<br>parentKey as character,<br>childKey as character
 +
|valign="top"|Relate to another section. From v5.0.
 +
|-
 +
|valign="top"|updateCursor
 +
|valign="top"|None
 +
|valign="top"|Update the underlying cursor with the Section's field values in Web Apps. This can be used with a Page [[Page_Attributes#Custom_Actions|Custom Save Action]]. From v5.3.
 +
|-
 
|}
 
|}
  
 
====Events====
 
====Events====
  
This class supports the '''Common events''' plus the following:
+
In Lianja, scripting language independent delegates are used to handle "events".
  
{| class="wikitable"
+
A full description of custom delegates is described in the [[Custom Delegates]] documentation.
!width="20%"|Event
+
!Args
+
!width="50%"|Description
+
  
|}
+
The order in which delegates are dispatched is described in the [[Event Delegate Sequences]] documentation.
 +
 
 +
There are many section specific delegates. For example look at the [[Form Section Attributes]].
 +
 
 +
[[Category:Documentation]]
 +
[[Category:Framework Classes]]

Latest revision as of 05:51, 18 September 2023

Note: property, method and event names should be referred to in lowercase in case-sensitive scripting languages.

Properties

This class supports the Common properties plus the following:

Property Access (R/RW) Value Description
ActiveControl RW Object Currently active Control
ActivePage RW Character Currently active Page
BackColor RW Character Section's background color
Caption RW Character Text displayed in the section header
Command RW Character Custom BROWSE or EDIT command to be executed in the section
Count R Numeric Number of formitems in the section
Database RW Character The section's associated database
Editing R Boolean Whether section is in Edit mode
Expanded R Boolean Whether section is expanded
Filter RW Character Filter expression to restrict the records included in the data
FooterCaption RW Character Text displayed in section footer
FooterMenu RW Character Custom footer menu
FooterVisible RW Boolean Whether section footer is displayed
Grid R Object Reference to Grid contained in section
HideActionbar RW Boolean Whether section actionbar is hidden
HideHeader RW Boolean Whether section header is hidden
Id R Character Section's id
Menu RW Character Custom menu (shown at top of section)
MenuVisible RW Boolean Whether section menu is displayed
PageId R Character Section's parent Page id
Picture RW Character Filename of background image
Readonly RW Boolean Whether section is read only
ReportColumns RW Character Comma-separated list of column positions for the selected fields (Report only)
ReportColumnHeadings RW Character Comma-separated list of column headings (Report only)
ReportFields RW Character Comma-separated list of fields or expressions for table select statement (Report only)
ReportFilter RW Character Filter expression (Report only)
ReportGridLines RW Boolean Whether grid lines are displayed (Report only)
ReportGroupBy RW Character Field name or expression for group by subtotalling (Report only)
ReportHeading RW Character Heading text (Report only)
ReportHeadings RW Character Comma-separated list of column headings (Report only, same as ReportColumnHeadings)
ReportHyperlinks RW Character Comma-separated list of field names to render as hyperlinks for searching (Report only)
ReportOtherOptions RW Character Ampersand-separated list of option=value pairs defining additional report options (Report only)
ReportSubTotals RW Character Comma-separated list of column positions for the selected fields to subtotal on (Report only)
Searchpanelvisible RW Boolean Whether section search panel is visible
Sql RW Character The SQL statement used to populate a virtual table.
State R Character Comma separated list of UI States that the Section handles.
Stretch RW Numeric Whether background image should be scaled to fit section: 0 = do not scale, 1 = scale
Table RW Character The section's associated table
Tabview R Object Reference to Pageframe if the section is a tabview, otherwise .F..
Type R Character Section's type: form, grid, webview, imagestrip, tabview, attachments, canvas, report, chart, custom, timeline, notifications
UIState R Character The last UI State applied to the Section.
Url RW Character URL rendered by section (WebView only)
Visible RW Boolean Whether section is displayed
WebView R Object Reference to Webview contained in section
Where RW Character See Requery() method. This is applied as a parameter to Requery.

Methods

This class supports the Common Methods plus the following:

Method Args Description
Add None Add a record and enter edit mode for the new record
addFormitem type as Character Add a formitem of the specified type to this Canvas section. An object reference to the new formitem is returned. From v9.2.6.
addFormitem database as Character, table as Character, column as Character Add a data-bound formitem to this Canvas section. An object reference to the new formitem is returned. From v9.2.6.
AddObject existing as Object | newobject as Character, class as Character Add an existing object or a new object, in which case the object's class must also be specified
AddSearchPanel existing as Object Add an existing container object into the custom search panel for a section
ApplyMetaData None Apply MetaData for the section
ApplyRules None Apply UI presentation rules for the section
Cancel None Cancel data changes
clearNamedParameters None Clear all named parameters previously set using setNamedParameter(name,value).
Collapse None Collapse the section
Delete None Delete the current record
Edit None Toggle edit mode for the current record
Editmode None Enter edit mode for the current record
Evaluate Character string containing a JavaScript expression Evaluate the specified JavaScript expression inside a webview section.
Expand None Expand the section
First None Move to the first data record
GoTo recordnumber as Numeric Move to the specified data record number
GetJSON None Return the current section data as JSON
Item position as Numeric Return a reference to the formitem object at the specified position
Last None Move to the last data record
LoadReport reportname as Character Load the specified Report Builder report. The Section must be a Report Section.
MoveFirst None Move to the first data record
MoveLast None Move to the last data record
MoveNext None Move to the next data record
MovePrevious None Move to the previous data record
Next None Move to the next data record
Previous None Move to the previous data record
Print None Print the section
Requery SQL SELECT or WHERE condition as Character Requery a Virtual Table that the section is bound to
Refresh None Refresh the section
RefreshHeaderBadge label as Character, recordCount as Number Update the section header badge as used by Instant Search and Instant Selections with the specified label text and record count. refreshHeaderBadge("", 0) will hide the badge that has been manually shown. From v5.5.
RemoveObject existing as Object Remove the specified object
ReopenTable None This can be used with Virtual Tables to reopen parameterized views. It is available in desktop/web/mobile.
Save None Save data changes
Search searchstring as Character Search the current index for the specified text
setAllSelected property as Character, value as Expression Set the specified property to the specified value for all currently selected UI controls (Canvas Section).
setJSON jsondata as Character Load JSON encoded data into the current section
setNamedParameter name as Character, value as Character Set the specified named parameter to the specified value. This can be used to set {parameter} or ?parameter macros in virtual table definitions.
setRelationship childSection as character,
parentKey as character,
childKey as character
Relate to another section. From v5.0.
updateCursor None Update the underlying cursor with the Section's field values in Web Apps. This can be used with a Page Custom Save Action. From v5.3.

Events

In Lianja, scripting language independent delegates are used to handle "events".

A full description of custom delegates is described in the Custom Delegates documentation.

The order in which delegates are dispatched is described in the Event Delegate Sequences documentation.

There are many section specific delegates. For example look at the Form Section Attributes.