Class Index | File Index

Classes


Class gxe.control.Control

Base class for all renderable controls.

Controls are created and rendered based upon the configuration objects associated with an editor (i.e. elements that define the editor).

Controls will only be rendered if an associated HTML tag name can be determined.



The processing flow is as follows:
Defined in: gxe.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
 
the associated editor configuration object (i.e.
 
the editor context
 
a unique auto-generated ID for the control
 
the configured HTML attributes for the control
 
the HTML element to which the control is attached
 
the configured tag name for the HTML element
 
the configured text node content for the HTML element
 
the parent of this control
 
the targeted XML node.
 
the parent element of the targeted XML node
Method Summary
Method Attributes Method Name and Description
 
build(htmlParentElement, domProcessor, domNode)
Builds the user interface control.
 
Creates the HTML element associated with the control.
 
ensureVisibility(subjectXmlNode)
Ensures the visibility of the HTML element associated with the control.
 
Evaluates a configuration value.
 
execBuild(htmlParentElement, domProcessor, domNode)
Executes the build of the the user interface control.
 
findFirstChildControl(sDojoSelector, the)
Finds the first child control that matches a Dojo query expression.
 
focus(subjectXmlNode)
Ensures the visibility of and focuses the HTML element associated with the control.
 
Gets the label text associated with a control.
 
Imports configuration properties into the current control.
 
Imports configuration attributes within the GXE HTML namespace into the current control.
 
initialize(context, cfgObject)
Initializes the instance.
 
processCfgAttribute(cfgAttribute, htmlParentElement, xmlParentElement, domProcessor, domNode)
Processes a configuration object associated with a targeted XML attribute (g:attribute).
 
processCfgElement(cfgElement, htmlParentElement, xmlParentElement, domProcessor, domNode)
Processes a configuration object associated with a targeted XML element (g:element).
 
processChildren(cfgObject, htmlParentElement, xmlNode, domProcessor, domNode)
Processes the children of a configuration object.
Event Summary
Event Attributes Event Name and Description
 
Explicitly fires the onEvent method.
 
onChildControlCreated(control, domProcessor, domNode)
Fired on a parent control when a child has been created.
 
onEvent(e, gxeControl, htmlEventName, gxeEventName)
Fired for certain events triggered by the control.
 
onHtmlChildrenCreated(domProcessor, domNode)
Fired when all of the children for a control have been created.
 
onHtmlElementCreated(domProcessor, domNode)
Fired when the HTML element for a control has been created.
Class Detail
gxe.control.Control()
Field Detail
{cfgObject} cfgObject
the associated editor configuration object (i.e. an editor definition element)

{gxe.Context} context
the editor context

{String} gxeId
a unique auto-generated ID for the control

{gxe.html.HtmlAttributes} htmlAttributes
the configured HTML attributes for the control

{Element} htmlElement
the HTML element to which the control is attached

{String} htmlTag
the configured tag name for the HTML element

{String} htmlTextContent
the configured text node content for the HTML element

{gxe.control.Control} parentControl
the parent of this control

{gxe.xml.XmlNode} xmlNode
the targeted XML node. This is section based, many component controls target the same node. (e.g. a header div, a label, an input text box can all target the same XML node)

{gxe.xml.XmlElement} xmlParentElement
the parent element of the targeted XML node
Method Detail
build(htmlParentElement, domProcessor, domNode)
Builds the user interface control.
Parameters:
{Element} htmlParentElement
the parent HTML element (a new control will be appended to this parent)
{gxe.xml.DomProcessor} domProcessor
an XML processor (when opening an existing document)
{Node} domNode
the DOM node that is actively being processed (when opening an existing document)

{Element} createHtmlElement()
Creates the HTML element associated with the control.
Returns:
{Element} the HTML element (can be null)

ensureVisibility(subjectXmlNode)
Ensures the visibility of the HTML element associated with the control.
By default, no action is taken and the ensureVisibility method is triggered for the parent control.
Parameters:
{gxe.xml.XmlNode} subjectXmlNode
the subject XML node (can be null)

{Object} evaluateValue(value)
Evaluates a configuration value.
Parameters:
{Object} value
the value
Returns:
{Object} the evaluated value

execBuild(htmlParentElement, domProcessor, domNode)
Executes the build of the the user interface control.
Parameters:
{Element} htmlParentElement
the parent HTML element (a new control will be appended to this parent)
{gxe.xml.DomProcessor} domProcessor
an XML processor (when opening an existing document)
{Node} domNode
the DOM node that is actively being processed (when opening an existing document)

findFirstChildControl(sDojoSelector, the)
Finds the first child control that matches a Dojo query expression.
Parameters:
{String} sDojoSelector
the Dojo query expression
{gxe.control.Control} the
first matching child control (null if none)

focus(subjectXmlNode)
Ensures the visibility of and focuses the HTML element associated with the control.
Parameters:
{gxe.xml.XmlNode} subjectXmlNode
the subject XML node (can be null)

getLabelText()
Gets the label text associated with a control.
Returns:
the label text (can be null)

importCfgProperties(cfgObject)
Imports configuration properties into the current control.
Parameters:
{cfgObject} cfgObject
the associated configuration object

importHtmlAttributes(cfgObject)
Imports configuration attributes within the GXE HTML namespace into the current control.
(i.e. namespace "http://www.esri.com/geoportal/gxe/html")
Parameters:
{cfgObject} cfgObject
the associated configuration object

initialize(context, cfgObject)
Initializes the instance.
Parameters:
{gxe.Context} context
the editor context
{cfgObject} cfgObject
the associated editor configuration object (i.e. an editor definition element)

processCfgAttribute(cfgAttribute, htmlParentElement, xmlParentElement, domProcessor, domNode)
Processes a configuration object associated with a targeted XML attribute (g:attribute).
Parameters:
{cfgObject} cfgAttribute
the configuration object to process
{Element} htmlParentElement
the parent HTML element (new controls will be appended to this parent)
{gxe.xml.XmlElement} xmlParentElement
the targeted XML parent element
{gxe.xml.DomProcessor} domProcessor
an XML processor (when opening an existing document)
{Node} domNode
the DOM node that is actively being processed (when opening an existing document)

processCfgElement(cfgElement, htmlParentElement, xmlParentElement, domProcessor, domNode)
Processes a configuration object associated with a targeted XML element (g:element).
Parameters:
{cfgObject} cfgElement
the configuration object to process
{Element} htmlParentElement
the parent HTML element (new controls will be appended to this parent)
{gxe.xml.XmlElement} xmlParentElement
the targeted XML parent element
{gxe.xml.DomProcessor} domProcessor
an XML processor (when opening an existing document)
{Node} domNode
the DOM node that is actively being processed (when opening an existing document)

processChildren(cfgObject, htmlParentElement, xmlNode, domProcessor, domNode)
Processes the children of a configuration object.
Parameters:
{cfgObject} cfgObject
the configuration object to process
{Element} htmlParentElement
the parent HTML element (new controls will be appended to this parent)
{gxe.xml.XmlNode} xmlNode
the target XML node
{gxe.xml.DomProcessor} domProcessor
an XML processor (when opening an existing document)
{Node} domNode
the DOM node that is actively being processed (when opening an existing document)
Event Detail
fireOnEvent(e)
Explicitly fires the onEvent method.
Parameters:
{Event} e
the underlying browser event

onChildControlCreated(control, domProcessor, domNode)
Fired on a parent control when a child has been created.
This event fires after the child has been fully processed.
Parameters:
{gxe.control.Control} control
the child control
{gxe.xml.DomProcessor} domProcessor
an XML processor (when opening an existing document)
{Node} domNode
the DOM node that is actively being processed (when opening an existing document)

onEvent(e, gxeControl, htmlEventName, gxeEventName)
Fired for certain events triggered by the control.
Parameters:
{Event} e
the underlying browser event
{gxe.control.Control} gxeControl
the control that fired the event
{String} htmlEventName
the HTML event name (e.g. "onclick")
{String} gxeEventName
a GXE name for the event (e.g. "onLabelClicked")

onHtmlChildrenCreated(domProcessor, domNode)
Fired when all of the children for a control have been created.
This event fires after all child controls have been added to the HTML DOM.
Parameters:
{gxe.xml.DomProcessor} domProcessor
an XML processor (when opening an existing document)
{Node} domNode
the DOM node that is actively being processed (when opening an existing document)

onHtmlElementCreated(domProcessor, domNode)
Fired when the HTML element for a control has been created.
This event fires prior to the creation of child controls.
Parameters:
{gxe.xml.DomProcessor} domProcessor
an XML processor (when opening an existing document)
{Node} domNode
the DOM node that is actively being processed (when opening an existing document)