Difference between revisions of "Field Attributes"

From Lianjapedia
Jump to: navigation, search
Line 134: Line 134:
 
|-
 
|-
 
|valign="top"|[[Data Attributes#Inherit dictionary rules|Inherit dictionary rules]]||Inherit the data dictionary rules (True | False)
 
|valign="top"|[[Data Attributes#Inherit dictionary rules|Inherit dictionary rules]]||Inherit the data dictionary rules (True | False)
 +
|valign="top"|applyDictionary||valign="top"|Boolean
 
|-
 
|-
 
|valign="top"|[[Data Attributes#Data source|Data source]]||The table and column that this field is bound to.  Specify m.varname to bind to a memory variable.
 
|valign="top"|[[Data Attributes#Data source|Data source]]||The table and column that this field is bound to.  Specify m.varname to bind to a memory variable.
 +
|valign="top"|controlSource||valign="top"|Character
 
|-
 
|-
 
|valign="top"|[[Data Attributes#Render as a CommandButton|Render as a CommandButton]]||Render this field as a CommandButton (True | False)
 
|valign="top"|[[Data Attributes#Render as a CommandButton|Render as a CommandButton]]||Render this field as a CommandButton (True | False)
 +
|valign="top"|renderAsCommandButton||valign="top"|Boolean
 
|-
 
|-
 
|valign="top"|[[Data Attributes#CommandButton Caption|CommandButton Caption]]||The caption for the CommandButton control
 
|valign="top"|[[Data Attributes#CommandButton Caption|CommandButton Caption]]||The caption for the CommandButton control
 +
|valign="top"|controlCaption||valign="top"|Character
 
|-
 
|-
 
|valign="top"|[[Data Attributes#CommandButton Icon image|CommandButton Icon image]]||The icon image for the CommandButton control
 
|valign="top"|[[Data Attributes#CommandButton Icon image|CommandButton Icon image]]||The icon image for the CommandButton control
 +
|valign="top"|controlIcon||valign="top"|Character
 
|-
 
|-
 
|valign="top"|[[Instant Search#Search field|Search field]]||This field is its Section Search field (True | False)
 
|valign="top"|[[Instant Search#Search field|Search field]]||This field is its Section Search field (True | False)
 +
|valign="top"|searchField||valign="top"|Boolean
 
|-
 
|-
 
|valign="top"|[[Instant Search#Default search field|Default search field]]||This field is its Section default search field (True | False)
 
|valign="top"|[[Instant Search#Default search field|Default search field]]||This field is its Section default search field (True | False)
 +
|valign="top"|defaultSearchFieldOrder||valign="top"|Boolean
 
|-
 
|-
 
|valign="top"|[[Instant Search#User selectable search field|User selectable search field]]||The user can select this as the Section search field interactively by clicking on it (True | False)
 
|valign="top"|[[Instant Search#User selectable search field|User selectable search field]]||The user can select this as the Section search field interactively by clicking on it (True | False)
 +
|valign="top"|userSelectableSearchField||valign="top"|Boolean
 
|-
 
|-
 
|valign="top"|[[Instant Search#Hide search field indicator|Hide search field indicator]]||Hide the search field indicator (True | False)
 
|valign="top"|[[Instant Search#Hide search field indicator|Hide search field indicator]]||Hide the search field indicator (True | False)
 +
|valign="top"|hideSearchKeyIndicator||valign="top"|Boolean
 
|-
 
|-
 
|valign="top"|[[Section Search Panels|Search panel field]]||Include this field in an auto created Section search panel (True | False)
 
|valign="top"|[[Section Search Panels|Search panel field]]||Include this field in an auto created Section search panel (True | False)
 +
|valign="top"|searchPanelField||valign="top"|Boolean
 
|-
 
|-
 
|valign="top"|[[Data Attributes#Relate on change|Relate on change]]||Relate child Sections when data is changed interactively (True | False)
 
|valign="top"|[[Data Attributes#Relate on change|Relate on change]]||Relate child Sections when data is changed interactively (True | False)
 +
|valign="top"|relateOnChange||valign="top"|Boolean
 
|-
 
|-
 
|valign="top"|[[Data Attributes#Recalculate|Recalculate]]||Recalculate readonly and calculated fields when data is changed interactively (True | False)
 
|valign="top"|[[Data Attributes#Recalculate|Recalculate]]||Recalculate readonly and calculated fields when data is changed interactively (True | False)
 +
|valign="top"|refreshCalculatedOnChange||valign="top"|Boolean
 
|-
 
|-
 
|valign="top"|[[Data Attributes#Ignore after change|Ignore after change]]||After data is edited (TextBox only), the 'Change' delegate only is called and it is assumed to update the field.  This provides the ability to handle custom search logic in the App for this field (True | False)
 
|valign="top"|[[Data Attributes#Ignore after change|Ignore after change]]||After data is edited (TextBox only), the 'Change' delegate only is called and it is assumed to update the field.  This provides the ability to handle custom search logic in the App for this field (True | False)
 +
|valign="top"|ignoreUpdteAfterChange||valign="top"|Boolean
 
|-
 
|-
 
|valign="top"|[[Colors|Background color]]||The background color for the data
 
|valign="top"|[[Colors|Background color]]||The background color for the data
 +
|valign="top"|dataBackColor||valign="top"|Character
 
|-
 
|-
 
|valign="top"|[[Colors|Foreground color]]||The foreground color for the data
 
|valign="top"|[[Colors|Foreground color]]||The foreground color for the data
 +
|valign="top"|dataForeColor||valign="top"|Character
 
|-
 
|-
 
|valign="top"|[[Fonts|Font]]||The font for the data
 
|valign="top"|[[Fonts|Font]]||The font for the data
 +
|valign="top"|dataFont||valign="top"|Character
 
|-
 
|-
 
|valign="top"|[[Formitem Appearance#Data size|Data size]]||The size of the data (Small | Medium | Large | Largest)
 
|valign="top"|[[Formitem Appearance#Data size|Data size]]||The size of the data (Small | Medium | Large | Largest)
 +
|valign="top"|dataSize||valign="top"|Character
 
|-
 
|-
 
|valign="top"|[[Data Attributes#Default|Default]]||Default value as an expression, e.g. date(), 0.0, space(10)
 
|valign="top"|[[Data Attributes#Default|Default]]||Default value as an expression, e.g. date(), 0.0, space(10)
 +
|valign="top"|defaultValue||valign="top"|Character
 
|-
 
|-
 
|valign="top"|[[Input Masks|Input mask type]]||The inputmask type (Custom | Currency | Date | Email Address | Number | Text | Time | Alphabetic | Upper Case | Upper Case Alphabetic)
 
|valign="top"|[[Input Masks|Input mask type]]||The inputmask type (Custom | Currency | Date | Email Address | Number | Text | Time | Alphabetic | Upper Case | Upper Case Alphabetic)
 +
|valign="top"|inputMaskType||valign="top"|Character
 
|-
 
|-
 
|valign="top"|[[Input Masks|Input mask]]||The inputmask for the field, e.g. @c2, @c4, @!, @^, 999,999.99 or ?regularexpression
 
|valign="top"|[[Input Masks|Input mask]]||The inputmask for the field, e.g. @c2, @c4, @!, @^, 999,999.99 or ?regularexpression
 +
|valign="top"|inputMask||valign="top"|Character
 
|-
 
|-
 
|valign="top"|[[Input Masks#Placeholder text|Placeholder text]]||Text to display as grayed-out placeholder text when the field is empty and does not have focus
 
|valign="top"|[[Input Masks#Placeholder text|Placeholder text]]||Text to display as grayed-out placeholder text when the field is empty and does not have focus
 +
|valign="top"|placeHolderText||valign="top"|Character
 
|-
 
|-
 
|valign="top"|[[Input Masks#Password input|Password input]]||Echo characters input as * for entering passwords (True | False)
 
|valign="top"|[[Input Masks#Password input|Password input]]||Echo characters input as * for entering passwords (True | False)
 +
|valign="top"|password||valign="top"|Boolean
 
|-
 
|-
 
|valign="top"|[[Data Attributes#Return tabs|Return tabs]]||Treat the return key as a Tab on this field (True | False)
 
|valign="top"|[[Data Attributes#Return tabs|Return tabs]]||Treat the return key as a Tab on this field (True | False)
 +
|valign="top"|returnTabs||valign="top"|Boolean
 
|-
 
|-
 
|valign="top"|[[Data Attributes#Mandatory_input|Mandatory input]]||Data must be entered in this field (True | False)
 
|valign="top"|[[Data Attributes#Mandatory_input|Mandatory input]]||Data must be entered in this field (True | False)
 +
|valign="top"|mandatory||valign="top"|Boolean
 
|-
 
|-
 
|valign="top"|[[Choices]]||Restrict data input to a list of choices, e.g.<br>Static list of choices:<br>Apples,Oranges,Bananas<br>Dynamic list of choices from a table:<br>@tablename,expression<br>Dynamic list of choices from a table (SQL SELECT):<br>select expression from tablename
 
|valign="top"|[[Choices]]||Restrict data input to a list of choices, e.g.<br>Static list of choices:<br>Apples,Oranges,Bananas<br>Dynamic list of choices from a table:<br>@tablename,expression<br>Dynamic list of choices from a table (SQL SELECT):<br>select expression from tablename
 +
|valign="top"|choiceList||valign="top"|Character
 
|-
 
|-
 
|valign="top"|[[Data Attributes#Validation|Validation]]||Data input validation expression.<br>Note the use of {}, which is substituted with the current data entered, e.g.<br>Contained in a list:<br>inlist("{}","Apples","Oranges","Bananas")<br>Lookup the value entered in a table:<br>rlookup("{}",customers,"custnames")
 
|valign="top"|[[Data Attributes#Validation|Validation]]||Data input validation expression.<br>Note the use of {}, which is substituted with the current data entered, e.g.<br>Contained in a list:<br>inlist("{}","Apples","Oranges","Bananas")<br>Lookup the value entered in a table:<br>rlookup("{}",customers,"custnames")
 +
|valign="top"|validation||valign="top"|Character
 
|-
 
|-
 
|valign="top"|[[Data Attributes#Error message|Error message]]||The error message to display if data input validation fails
 
|valign="top"|[[Data Attributes#Error message|Error message]]||The error message to display if data input validation fails
 +
|valign="top"|validationErrorMessage||valign="top"|Character
 
|-
 
|-
 
|valign="top"|[[Help Attributes#Tooltips|Tooltip]]||The tooltip to display
 
|valign="top"|[[Help Attributes#Tooltips|Tooltip]]||The tooltip to display
 +
|valign="top"|editToolTip||valign="top"|Character
 
|-
 
|-
 
|valign="top"|[[Data Attributes#Hyperlink|Hyperlink]]||Display as a hyperlink (True &#124; False)
 
|valign="top"|[[Data Attributes#Hyperlink|Hyperlink]]||Display as a hyperlink (True &#124; False)
 +
|valign="top"|editHyperLink||valign="top"|Boolean
 
|-
 
|-
 
|valign="top"|[[Formitem Appearance#Text alignment|Text alignment]]||Text alignment (Left &#124; Center &#124; Right)
 
|valign="top"|[[Formitem Appearance#Text alignment|Text alignment]]||Text alignment (Left &#124; Center &#124; Right)
 +
|valign="top"|editAlignment||valign="top"|Character
 
|-
 
|-
 
|valign="top"|[[Autosuggestions#Autosuggestions|Autosuggestions]]||Autosuggest a list of values as the user types, e.g.<br>Static list of choices:<br>Apples,Oranges,Bananas<br>Dynamic list of choices from a table:<br>@tablename,expression<br>Dynamic list of choices from a table (SQL SELECT):<br>select expression from tablename
 
|valign="top"|[[Autosuggestions#Autosuggestions|Autosuggestions]]||Autosuggest a list of values as the user types, e.g.<br>Static list of choices:<br>Apples,Oranges,Bananas<br>Dynamic list of choices from a table:<br>@tablename,expression<br>Dynamic list of choices from a table (SQL SELECT):<br>select expression from tablename
 +
|valign="top"|autoSuggest||valign="top"|Character
 
|-
 
|-
 
|valign="top"|[[Autosuggestions#Autosuggestion headers|Autosuggestion headers]]||A comma separated list of column headers to display for the Autosuggestions
 
|valign="top"|[[Autosuggestions#Autosuggestion headers|Autosuggestion headers]]||A comma separated list of column headers to display for the Autosuggestions
 +
|valign="top"|autoSuggestHeaders||valign="top"|Character
 
|-
 
|-
 
|valign="top"|[[Autosuggestions#Autosuggestion column to search|Autosuggestion column to search]]||The column to search for Autosuggestions
 
|valign="top"|[[Autosuggestions#Autosuggestion column to search|Autosuggestion column to search]]||The column to search for Autosuggestions
 +
|valign="top"|autoSuggestColumn||valign="top"|Int
 
|-
 
|-
 
|valign="top"|[[Help Attributes#Context Menu|Context Menu]]||The context menu to popup when a user right-clicks on the field.  Specify this as a comma separated list.
 
|valign="top"|[[Help Attributes#Context Menu|Context Menu]]||The context menu to popup when a user right-clicks on the field.  Specify this as a comma separated list.
 +
|valign="top"|contextMenu||valign="top"|Character
 
|-
 
|-
 
|valign="top"|[[Data Attributes#Editable|Editable]]||The data is editable (True&#124;False)
 
|valign="top"|[[Data Attributes#Editable|Editable]]||The data is editable (True&#124;False)
 +
|valign="top"|editable||valign="top"|Boolean
 
|-
 
|-
 
|valign="top"|[[Data Attributes#Dialog button|Dialog button]]||The control has a dialog button that can be clicked to call the DialogButtonClicked delegate (True&#124;False)
 
|valign="top"|[[Data Attributes#Dialog button|Dialog button]]||The control has a dialog button that can be clicked to call the DialogButtonClicked delegate (True&#124;False)
 +
|valign="top"|dialogButton||valign="top"|Boolean
 
|-
 
|-
 
|valign="top"|[[Custom Delegates#Dialog button delegate|Dialog button delegate]]||The delegate for the DialogButtonClicked event
 
|valign="top"|[[Custom Delegates#Dialog button delegate|Dialog button delegate]]||The delegate for the DialogButtonClicked event
 +
|valign="top"|dialogButtonAction||valign="top"|Character
 
|-
 
|-
 
|valign="top"|[[Data Mapping|Get data mapping]]||Custom data mapping when reading data.  Specify this as an expression.
 
|valign="top"|[[Data Mapping|Get data mapping]]||Custom data mapping when reading data.  Specify this as an expression.
 +
|valign="top"|dataMappingGet||valign="top"|Character
 
|-
 
|-
 
|valign="top"|[[Data Mapping|Set data mapping]]||Custom data mapping when writing data.  Specify this as an expression.
 
|valign="top"|[[Data Mapping|Set data mapping]]||Custom data mapping when writing data.  Specify this as an expression.
 +
|valign="top"|dataMappingSet||valign="top"|Character
 
|-
 
|-
 
|valign="top"|[[Help Attributes#Help topic|Help topic]]||The help topic to display for this field when F1 is pressed.
 
|valign="top"|[[Help Attributes#Help topic|Help topic]]||The help topic to display for this field when F1 is pressed.
 +
|valign="top"|helpTopic||valign="top"|Character
 
|-
 
|-
 
|valign="top"|[[Data Attributes#Custom attributes|Custom attributes]]||A semicolon separated list of custom attributes which can be used in CSS selectors, e.g.<br>mandatory=1;border=1;hilite=red<br>You should reference these attributes as user_xxx from any delegates or in any custom CSS theming.
 
|valign="top"|[[Data Attributes#Custom attributes|Custom attributes]]||A semicolon separated list of custom attributes which can be used in CSS selectors, e.g.<br>mandatory=1;border=1;hilite=red<br>You should reference these attributes as user_xxx from any delegates or in any custom CSS theming.
 +
|valign="top"|customAttributes||valign="top"|Character
 
|-
 
|-
 
|}
 
|}

Revision as of 09:29, 7 July 2016

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 Type
Name The name for this field (unique to the section) id Character
Meta types A comma separated list of metatype names metatypes Character
Type The type of control: field (readonly) type Character

Geometry

Attribute Description Name Type
Absolute Enable or disable absolute positioning (True | False) absolutePosition Boolean
Top Top position in pixels absolutePositionY Int
Left Left position in pixels absolutePositionX Int
Width Width in pixels absolutePositionWidth Int
Height Height in pixels absolutePositionHeight Int

Appearance

Attribute Description Name Type
CSS style CSS style (separate attributes with ; or use app:/filename.css) cssStyle Character
Caption position The position of the caption (None | Above | Beside | RightToLeft) labelType Character
Caption size The size of the caption (Small | Medium | Large | Largest) labelSize Character
Shading The shading to be applied to the field (None | Light | Dark) shadingType Character
Transparency The transparency type to be applied to the field (None | Light | Dark | Custom) transparencyType Character
Border radius Specify a border radius borderRadius Int

Caption

Attribute Description Name Type
Caption The caption for the field caption Character
Background color The background color for the caption backColor Character
Foreground color The foreground color for the caption foreColor Character
Font The font for the caption captionFont Character
Icon The image for the caption (png | jpg | gif). captionIcon Character
Border width The caption border width captionBorderWidth Int
Border color The caption border color captionBorderColor Character
Transparency Specify a transparency percentage from 0 to 100 transparency Int
Gradient colors Render the caption color as a gradient (True | False) captionGradient Boolean
Gradient type Specify the gradient type captionGradientType Int
Gradient start color Gradient start color captionFromColor Character
Gradient end color Gradient end color captionToColor Character

Data

Attribute Description Name Type
Inherit dictionary rules Inherit the data dictionary rules (True | False) applyDictionary Boolean
Data source The table and column that this field is bound to. Specify m.varname to bind to a memory variable. controlSource Character
Render as a CommandButton Render this field as a CommandButton (True | False) renderAsCommandButton Boolean
CommandButton Caption The caption for the CommandButton control controlCaption Character
CommandButton Icon image The icon image for the CommandButton control controlIcon Character
Search field This field is its Section Search field (True | False) searchField Boolean
Default search field This field is its Section default search field (True | False) defaultSearchFieldOrder Boolean
User selectable search field The user can select this as the Section search field interactively by clicking on it (True | False) userSelectableSearchField Boolean
Hide search field indicator Hide the search field indicator (True | False) hideSearchKeyIndicator Boolean
Search panel field Include this field in an auto created Section search panel (True | False) searchPanelField Boolean
Relate on change Relate child Sections when data is changed interactively (True | False) relateOnChange Boolean
Recalculate Recalculate readonly and calculated fields when data is changed interactively (True | False) refreshCalculatedOnChange Boolean
Ignore after change After data is edited (TextBox only), the 'Change' delegate only is called and it is assumed to update the field. This provides the ability to handle custom search logic in the App for this field (True | False) ignoreUpdteAfterChange Boolean
Background color The background color for the data dataBackColor Character
Foreground color The foreground color for the data dataForeColor Character
Font The font for the data dataFont Character
Data size The size of the data (Small | Medium | Large | Largest) dataSize Character
Default Default value as an expression, e.g. date(), 0.0, space(10) defaultValue Character
Input mask type The inputmask type (Custom | Currency | Date | Email Address | Number | Text | Time | Alphabetic | Upper Case | Upper Case Alphabetic) inputMaskType Character
Input mask The inputmask for the field, e.g. @c2, @c4, @!, @^, 999,999.99 or ?regularexpression inputMask Character
Placeholder text Text to display as grayed-out placeholder text when the field is empty and does not have focus placeHolderText Character
Password input Echo characters input as * for entering passwords (True | False) password Boolean
Return tabs Treat the return key as a Tab on this field (True | False) returnTabs Boolean
Mandatory input Data must be entered in this field (True | False) mandatory Boolean
Choices Restrict data input to a list of choices, e.g.
Static list of choices:
Apples,Oranges,Bananas
Dynamic list of choices from a table:
@tablename,expression
Dynamic list of choices from a table (SQL SELECT):
select expression from tablename
choiceList Character
Validation Data input validation expression.
Note the use of {}, which is substituted with the current data entered, e.g.
Contained in a list:
inlist("{}","Apples","Oranges","Bananas")
Lookup the value entered in a table:
rlookup("{}",customers,"custnames")
validation Character
Error message The error message to display if data input validation fails validationErrorMessage Character
Tooltip The tooltip to display editToolTip Character
Hyperlink Display as a hyperlink (True | False) editHyperLink Boolean
Text alignment Text alignment (Left | Center | Right) editAlignment Character
Autosuggestions Autosuggest a list of values as the user types, e.g.
Static list of choices:
Apples,Oranges,Bananas
Dynamic list of choices from a table:
@tablename,expression
Dynamic list of choices from a table (SQL SELECT):
select expression from tablename
autoSuggest Character
Autosuggestion headers A comma separated list of column headers to display for the Autosuggestions autoSuggestHeaders Character
Autosuggestion column to search The column to search for Autosuggestions autoSuggestColumn Int
Context Menu The context menu to popup when a user right-clicks on the field. Specify this as a comma separated list. contextMenu Character
Editable The data is editable (True|False) editable Boolean
Dialog button The control has a dialog button that can be clicked to call the DialogButtonClicked delegate (True|False) dialogButton Boolean
Dialog button delegate The delegate for the DialogButtonClicked event dialogButtonAction Character
Get data mapping Custom data mapping when reading data. Specify this as an expression. dataMappingGet Character
Set data mapping Custom data mapping when writing data. Specify this as an expression. dataMappingSet Character
Help topic The help topic to display for this field when F1 is pressed. helpTopic Character
Custom attributes A semicolon separated list of custom attributes which can be used in CSS selectors, e.g.
mandatory=1;border=1;hilite=red
You should reference these attributes as user_xxx from any delegates or in any custom CSS theming.
customAttributes Character

Custom Delegates

Attribute Description Name Type
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
Got Focus The delegate for the GotFocus event
Lost Focus The delegate for the LostFocus event
Link Click The delegate for the Hyperlink Click event. This is called with two arguments: functionname(controlsource,text)
Interactive Change The delegate for the InteractiveChange event. This is called after each key is pressed.
Change The delegate for the Changed event. This is called when the Enter key or the Tab key are pressed.
Data Changed The delegate for the DataChanged event. This is called when navigating between records.
Hotkey The delegate for the Hotkey event (e.g. F1-F10, Ctrl+F1). The key is passed as a parameter, e.g. 'F2'.
Context Menu The delegate for the Context Menu event
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 formitem in a Desktop client (True | False). desktopUI Boolean
Web Include this formitem in a Web client (True | False). webUI Boolean
Tablet Include this formitem in a Tablet client (True | False). tabletUI Boolean
Phone Include this formitem in a Phone client (True | False). mobileUI Boolean
UI States UI states that affect this formitem. Specify multiple states as a comma separated list. state Character
Initial UI state The initial UI state for this formitem. uiStateInit Character
Readonly when Formitem is readonly at runtime if specified expression evaluates to true. readonlyWhen Character
Visible when Formitem 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