Class gxe.control.ControlArray
Extends
gxe.control.Control.
An array backed collection of GXE controls.
Defined in: gxe.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
indicates if the control should be displayed inline
(default=false, i.e.
|
|
indicates if the control is using exclusive display
(default=false)
|
- Fields borrowed from class gxe.control.Control:
- cfgObject, context, gxeId, htmlAttributes, htmlElement, htmlTag, htmlTextContent, parentControl, xmlNode, xmlParentElement
Method Attributes | Method Name and Description |
---|---|
activateIndex(nIndex)
Activates the control at a given index.
|
|
findIndex(control)
Finds the index associated with a control.
|
|
findIndexByXmlNode(subjectXmlNode)
Finds the index associated with a target XML node.
|
|
Fires the onArrayModified event.
|
|
Gets the active index.
|
|
getItem(nIndex)
Gets the item at the specified index.
|
|
Gets the length of the array.
|
|
insertAt(nIndex, control, bActivate)
Inserts a control at a specified index.
|
|
push(control, bActivate)
Appends a control to the array.
|
|
removeIndex(nIndex, bActivate)
Removes the control at the specified index from the array.
|
|
setDisplayStyle(bShow)
Explicitly sets the display style for the control array.
|
|
swapPosition(nFromIndex, nToIndex, bActivate)
Swaps the positions of two controls within the array.
|
|
syncDisplay(bForce)
Ensures that the active control for an exclusively displayed array is properly displayed.
|
|
Toggles the display style of the control array.
|
- Methods borrowed from class gxe.control.Control:
- build, createHtmlElement, ensureVisibility, evaluateValue, execBuild, findFirstChildControl, focus, getLabelText, importCfgProperties, importHtmlAttributes, initialize, processCfgAttribute, processCfgElement, processChildren
Event Attributes | Event Name and Description |
---|---|
onArrayModified(count, activeIndex)
Fired when the array structure has been modified.
|
- Events borrowed from class gxe.control.Control:
- fireOnEvent, onChildControlCreated, onEvent, onHtmlChildrenCreated, onHtmlElementCreated
Field Detail
{boolean}
displayInline
indicates if the control should be displayed inline
(default=false, i.e. block display)
{boolean}
isExclusive
indicates if the control is using exclusive display
(default=false)
Method Detail
activateIndex(nIndex)
Activates the control at a given index.
- Parameters:
- {Integer} nIndex
- the index of the control to activate
{Integer}
findIndex(control)
Finds the index associated with a control.
- Parameters:
- {gxe.control.Control} control
- the subject control
- Returns:
- {Integer} the associated index (-1 if not located)
{Integer}
findIndexByXmlNode(subjectXmlNode)
Finds the index associated with a target XML node.
- Parameters:
- {gxe.xml.XmlNode} subjectXmlNode
- the subject XML node (element or attribute)
- Returns:
- {Integer} the associated index (-1 if not located)
fireOnArrayModified()
Fires the onArrayModified event.
{Integer}
getActiveIndex()
Gets the active index.
- Returns:
- {Integer} the active index
{gxe.control.Control}
getItem(nIndex)
Gets the item at the specified index.
- Parameters:
- {Integer} nIndex
- the index
- Returns:
- {gxe.control.Control} the corresponding control
{Integer}
getLength()
Gets the length of the array.
- Returns:
- {Integer} the length
insertAt(nIndex, control, bActivate)
Inserts a control at a specified index.
- Parameters:
- {Integer} nIndex
- the index (same as JavaScript Array.splice)
- {gxe.control.Control} control
- the control to insert
- {boolean} bActivate
- (not currently used)
push(control, bActivate)
Appends a control to the array.
- Parameters:
- {gxe.control.Control} control
- the control to add
- {boolean} bActivate
- if true then activate the newly added control
removeIndex(nIndex, bActivate)
Removes the control at the specified index from the array.
- Parameters:
- {Integer} nIndex
- the index of the control to remove
- {boolean} bActivate
- if true then activate an appropriate index following removal
setDisplayStyle(bShow)
Explicitly sets the display style for the control array.
- Parameters:
- {boolean} bShow
- if true then show the control
swapPosition(nFromIndex, nToIndex, bActivate)
Swaps the positions of two controls within the array.
- Parameters:
- {Integer} nFromIndex
- the from index
- {Integer} nToIndex
- the to index
- {boolean} bActivate
- if true then activate the "to" index following the swap
syncDisplay(bForce)
Ensures that the active control for an exclusively displayed array is properly displayed.
- Parameters:
- {boolean} bForce
- if true then ensure that the control array itself is properly displayed
toggleDisplay()
Toggles the display style of the control array.
Event Detail
onArrayModified(count, activeIndex)
Fired when the array structure has been modified.
- Parameters:
- {Integer} count
- the number of controls in the array
- {Integer} activeIndex
- the index of the active control