Difference between revisions of "Grid Gadget Attributes"
From Lianjapedia
Yvonne.milne (Talk | contribs) |
Yvonne.milne (Talk | contribs) |
||
Line 182: | Line 182: | ||
|- | |- | ||
|valign="top"|[[Users and Roles|Read roles]]||A comma separated list of roles that can read (and view) the data. | |valign="top"|[[Users and Roles|Read roles]]||A comma separated list of roles that can read (and view) the data. | ||
− | |valign="top"|permRead||Character | + | |valign="top"|permRead||valign="top"|Character |
|- | |- | ||
|valign="top"|[[Users and Roles|Update roles]]||A comma separated list of roles that can perform update operations on the data. | |valign="top"|[[Users and Roles|Update roles]]||A comma separated list of roles that can perform update operations on the data. | ||
− | |valign="top"|permUpdate||Character | + | |valign="top"|permUpdate||valign="top"|Character |
|- | |- | ||
|} | |} | ||
Line 192: | Line 192: | ||
{| class="wikitable" width="100%" | {| class="wikitable" width="100%" | ||
!width="20%"|Attribute | !width="20%"|Attribute | ||
− | !width=" | + | !width="50%"|Description |
+ | !width="20%"|Name | ||
+ | !width="10%"|Type | ||
|- | |- | ||
− | |valign="top"|[[UI Presentation Rules#Desktop|Desktop]]||Include this gadget in a Desktop client (True | False). | + | |valign="top"|[[UI Presentation Rules#Desktop|Desktop]]||Include this gadget in a Desktop client (True | False). |
+ | |valign="top"|desktopUI||valign="top"|Boolean | ||
|- | |- | ||
|valign="top"|[[UI Presentation Rules#Web|Web]]||Include this gadget in a Web client (True | False). | |valign="top"|[[UI Presentation Rules#Web|Web]]||Include this gadget in a Web client (True | False). | ||
+ | |valign="top"|webUI||valign="top"|Boolean | ||
|- | |- | ||
|valign="top"|[[UI Presentation Rules#Tablet|Tablet]]||Include this gadget in a Tablet client (True | False). | |valign="top"|[[UI Presentation Rules#Tablet|Tablet]]||Include this gadget in a Tablet client (True | False). | ||
+ | |valign="top"|tabletUI||valign="top"|Boolean | ||
|- | |- | ||
|valign="top"|[[UI Presentation Rules#Phone|Phone]]||Include this gadget in a Phone client (True | False). | |valign="top"|[[UI Presentation Rules#Phone|Phone]]||Include this gadget in a Phone client (True | False). | ||
+ | |valign="top"|mobileUI||valign="top"|Boolean | ||
|- | |- | ||
|valign="top"|[[UI Presentation Rules#UI States|UI States]]||UI states that affect this gadget. Specify multiple states as a comma separated list. | |valign="top"|[[UI Presentation Rules#UI States|UI States]]||UI states that affect this gadget. Specify multiple states as a comma separated list. | ||
+ | |valign="top"|state||valign="top"|Character | ||
|- | |- | ||
|valign="top"|[[UI Presentation Rules#Initial UI state|Initial UI state]]||The initial UI state for this gadget. | |valign="top"|[[UI Presentation Rules#Initial UI state|Initial UI state]]||The initial UI state for this gadget. | ||
+ | |valign="top"|uiStateInit||valign="top"|Character | ||
|- | |- | ||
|valign="top"|[[UI Presentation Rules#Readonly when|Readonly when]]||Gadget is readonly at runtime if specified expression evaluates to true. | |valign="top"|[[UI Presentation Rules#Readonly when|Readonly when]]||Gadget is readonly at runtime if specified expression evaluates to true. | ||
+ | |valign="top"|readonlyWhen||valign="top"|Character | ||
|- | |- | ||
|valign="top"|[[UI Presentation Rules#Visible when|Visible when]]||Gadget is visible at runtime if specified expression evaluates to true. | |valign="top"|[[UI Presentation Rules#Visible when|Visible when]]||Gadget is visible at runtime if specified expression evaluates to true. | ||
+ | |valign="top"|visibleWhen||valign="top"|Character | ||
|- | |- | ||
|valign="top"|[[UI Presentation Rules#Display orientation|Display orientation]]||Display depending on mobile device orientation for Tablets and Phones. (Always | Portrait | Landscape) | |valign="top"|[[UI Presentation Rules#Display orientation|Display orientation]]||Display depending on mobile device orientation for Tablets and Phones. (Always | Portrait | Landscape) | ||
+ | |valign="top"|displayOrientation||valign="top"|Character | ||
|- | |- | ||
|valign="top"|[[UI Presentation Rules#Apply rules on change|Apply rules on change]]||Apply UI presentation rules (Visible when and Readonly when) when data is changed interactively or when navigating records (True | False). | |valign="top"|[[UI Presentation Rules#Apply rules on change|Apply rules on change]]||Apply UI presentation rules (Visible when and Readonly when) when data is changed interactively or when navigating records (True | False). | ||
+ | |valign="top"|applyRulesOnChange||valign="top"|Boolean | ||
|- | |- | ||
|} | |} | ||
[[Category:Attributes|4 Grid Gadget]] | [[Category:Attributes|4 Grid Gadget]] |
Revision as of 10:36, 5 July 2016
Contents
Getting and Setting Attributes
The setAttribute(name, value) method can be used to set the value of an Attribute:
Lianja.get("pageid.sectionid.fieldid").setAttribute("caption","Formitem1")
Note: the shortened form setAttr(name,value) is also available.
The getAttribute(name) method can be used to get the value of an Attribute:
cTitle = Lianja.get("pageid.sectionid.fieldid").getAttribute("caption")
Note: the shortened form getAttr(name) is also available.
Details
Attribute | Description |
---|---|
Name | The name for this gadget (unique to the section) |
Meta types | A comma separated list of metatype names |
Type | The type of control: Gadget (readonly) |
Gadget type | The type of gadget: webview (readonly) |
Margin | Margin size around the gadget |
Fixed width | Fixed gadget width in pixels |
Fixed height | Fixed gadget height in pixels |
Inline | Render the gadget inline rather than it its own column (True | False) |
Stretch width | Auto stretch the width of the gadget into the width of the section (True | False) |
Geometry
Attribute | Description |
---|---|
Absolute | Enable or disable absolute positioning (True | False) |
Top | Top position in pixels |
Left | Left position in pixels |
Width | Width in pixels |
Height | Height in pixels |
CSS style | CSS style (separate attributes with ; or use app:/filename.css) |
Caption
Attribute | Description |
---|---|
Caption | The caption for the gadget |
Background color | The background color for the caption |
Foreground color | The foreground color for the caption |
Font | The font for the caption |
Icon | The image for the caption (png | jpg | gif). Use app:/imagename.ext for app specific images. |
Border width | The caption border width |
Border color | The caption border color |
Transparency | Specify a transparency percentage from 0 to 100 |
Gradient colors | Render the caption color as a gradient (True | False) |
Gradient type | Specify the gradient type |
Gradient start color | Gradient start color |
Gradient end color | Gradient end color |
Data
Attribute | Description |
---|---|
Data source | The table or SQL SELECT statement to display in the grid. |
Editable | Data is editable (True | False) |
Hide OK/Cancel Buttons | Hide the OK/Cancel buttons (True | False) |
Hide actionbar | Hide actionbar buttons (True | False) |
Filter | The filter expression that restricts the records that will be included in the grid |
CSS style | CSS style for the gadget (separate attributes with ; or use app:/filename.css) |
Pagination | Grid is always rendered using pagination (for large data sets)(True | False) |
Automatic pagination | Grid is rendered using pagination if the number of records exceeds below amount (True | False) |
Automatic pagination size | Grid is rendered using pagination if Automatic pagination is true and the number of records exceeds this amount |
Grid row height | Height of the grid rows |
Background color | The background color for the gadget |
Foreground color | The foreground color for the gadget |
Other Options
Attribute | Description |
---|---|
Hide header | Hide gadget header at runtime (True | False) |
Custom Delegates
Attribute | Description |
---|---|
Init | The delegate for the Init event |
Load | The delegate for the Load event |
Ready | The delegate for the Ready event |
Activate | The delegate for the Activate event |
Deactivate | The delegate for the Deactivate event |
Change | The delegate for the Change event |
Before Data Create | The delegate for the BeforeCreated event |
After Data Create | The delegate for the AfterCreated event |
After Data Changed | The delegate for the dataChanged event (after data is read) |
Before Data Update | The delegate for the BeforeUpdate event |
After Data Update | The delegate for the AfterUpdate event |
Before Data Delete | The delegate for the BeforeDelete event |
After Data Delete | The delegate for the AfterDelete event |
Refresh | The delegate for the Refresh event |
Parent data changed | The delegate for the ParentDataChanged event |
Click | The delegate for the item Clicked event. |
Double click | The delegate for the dblClick event |
Sort | The delegate for the column Sort event fired when the header is clicked. This is called with two arguments: nColumn, nDirection |
Timer | The delegate for the Timer event |
Timer interval | The timer interval in seconds that the Timer event will be called at runtime |
Permissions and Roles
Attribute | Description | Name | Type |
---|---|---|---|
Read roles | A comma separated list of roles that can read (and view) the data. | permRead | Character |
Update roles | A comma separated list of roles that can perform update operations on the data. | permUpdate | Character |
UI Presentation Rules
Attribute | Description | Name | Type |
---|---|---|---|
Desktop | Include this gadget in a Desktop client (True | False). | desktopUI | Boolean |
Web | Include this gadget in a Web client (True | False). | webUI | Boolean |
Tablet | Include this gadget in a Tablet client (True | False). | tabletUI | Boolean |
Phone | Include this gadget in a Phone client (True | False). | mobileUI | Boolean |
UI States | UI states that affect this gadget. Specify multiple states as a comma separated list. | state | Character |
Initial UI state | The initial UI state for this gadget. | uiStateInit | Character |
Readonly when | Gadget is readonly at runtime if specified expression evaluates to true. | readonlyWhen | Character |
Visible when | Gadget is visible at runtime if specified expression evaluates to true. | visibleWhen | Character |
Display orientation | Display depending on mobile device orientation for Tablets and Phones. (Always | Portrait | Landscape) | displayOrientation | Character |
Apply rules on change | Apply UI presentation rules (Visible when and Readonly when) when data is changed interactively or when navigating records (True | False). | applyRulesOnChange | Boolean |