%ZEN.Component.object
deprecated class %ZEN.Component.object extends %Library.RegisteredObject, %XML.Adaptor
Base class for all ZEN components. An object, by itself, can be used to create objects that can be shared between a server and a browser client environment. All visual component, are derived from component, which is a subclass of object.Property Inventory
- %condition
- %import
- %includeFiles
- %page
- %resource
- aux
- composite
- id
- index
- name
- onupdate
- parent
- tuple
- visible
- window
Method Inventory
- %AddToSaveSet()
- %Attr()
- %BindExport()
- %ConstructClone()
- %DrawHTML()
- %DrawJSStrings()
- %Eval()
- %EvalC()
- %ForceClientRender()
- %GetEventHandlers()
- %GetXMLName()
- %MakeId()
- %NormalizeObject()
- %OnAddToPageAfter()
- %OnAddToPageBefore()
- %OnDrawObjectProperties()
- %OnObjectSynch()
- %OnZENDeserialize()
- %QuoteValue()
- %QuoteValueL10N()
- %RemoveFromSaveSet()
- %Self()
- %ValidateObject()
- XMLDTD()
- XMLExport()
- XMLExportToStream()
- XMLExportToString()
- findElement()
- fireOnUpdateEvent()
- getProperty()
- getSettings()
- getType()
- invokeSuper()
- isOfType()
- makeId()
- onCreate()
- onDelete()
- onSerialize()
- onloadHandler()
- onunloadHandler()
- onupdateHandler()
- render()
- renderContents()
- renderSVG()
- setProperty()
Parameters
By default, the file extension (.js or .css) is used to determine whether an item in the list is a script include or a style include. You can override this behavior by adding the terms "script:" or "style:" to the beginning of the file name or names. This prefix is not used as part of the include filename.
The available choices are:
- "schema" - update the schema used by Studio Assist when editing page definitions.
- "HTML" - Regenerate any JS or CSS files associated with this class.
- "SVG" - Regenerate any JS or SVG CSS files associated with this class.
This is intended for use with packages that are mapped so as to be visible to every namespace.
All Zen classes within the same package must have the same value for this parameter. It is the developer's responsibility to ensure this.
If XMLIGNORENULL is set = 1, then both missing tags in the XML and empty strings are input as "", and both "" and $c(0) are output as empty tags (i.e. <tag></tag>).
If XMLIGNORENULL is set = "inputonly", then both missing tags in the XML and empty strings are input as "". Output of "" and $c(0) are for XMLIGNORENULL = 0: $c(0) is output as an empty tag (i.e. <tag></tag>) and "" is output as no tag.
If XMLIGNORENULL = "runtime" (runtime is not case sensitive), then the behavior of XMLIGNORENULL is determined by the format parameter of XMLExport, XMLImport and %XML.Reader.OpenFile. The default behavior for XMLIGNORENULL="runtime is the same as XMLIGNORENULL=0. Adding "ignorenull" to the format argument changes the behavior to that of XMLIGNORENULL=1. "ignorenull" shoud be separated by a comma from literal/encoded part of the format. Example values for format are "", ",ignorenull", "literal,ignorenull" and "encoded,ignorenull". Note that "inputonly" is equivalent to using ,ignorenull for XMLExport and not for %XML.Reader.
Properties
This property is not available on the client.
This property is not available on the client.
Applications should not set this property.
This property is not available on the client.
Every object within a Zen page must have a unique id value. You can find an object with a given id value using the page object's getComponentById() method.
Applications can use but should not set this property.
This is primarily used to specify the name used for identifying a control within a form. It is also used to identify values that are submitted by controls on a form.
It is defined here for convenience.
For visual components, this is typically set to the group that contains the component.
For auxiliary components, this is set to the object that referred to this component in the page definition.
Applications should not set this property.
Applications should not set this property; Sub-classes can set this via the DEFAULTVISIBLE.
Applications should not set this property.
Methods
This method adds the current object to the SaveSet containing objects that are part of the current %Save() for persistent classes or %GetSwizzleObject for serial classes. A queue of objects to be saved or serialized is also constructed. Only modified objects are included in the save queue. The value (OID or serial value in OID form) of each object is also placed in the SaveSet.
This method will invoke the %OnAddToSaveSet method if it is implemented. See that method for more information.
%AddToSaveSet should not ever be invoked directly except from %OnAddToSaveSet().
This method takes these parameters:
depth, with these values:
1: | Include this object in the SaveSet and, if it has not been serialized put it in the save queue and invoke %AddToSaveSet on any objects referenced by this object to the SaveSet with a depth of 1. |
2: | Include this object in the SaveSet and save queue. Also invoke %AddToSaveSet on any referenced objects in the SaveSet with a depth of 1. |
3: | Include this object in the SaveSet and, if modified, the save queue. Also invoke %AddToSaveSet on any referenced objects in the SaveSet with a depth of 3. |
0: | Add this object to the save set only if it isn't already included. |
1: | Add this object to the SaveSet even if it already exists. This causes object dependencies to be rebuilt. Typically, this value is only passed by %OnAddToSaveSet when it modifies objects other than the current one. |
Note: Swizzled serial objects always have an empty serial value and will always be placed in the save queue and the SaveSet. the value of depth simply gets passed on to its referenced objects.
Note that even if deep=0 when you clone a parent object in a parent child relationship or a one object of a one to many relationship then it will construct clones of all the child/many objects. This is because a child/many object can only point at a single parent and so if we did not create a clone of these then you would have a relationship with zero items in it. If you really just want to clone the object without these child/many objects then pass deep=-1 to this method.
After the clone is constructed it will call %OnConstructClone(object,deep,.cloned) on the clone if it is defined so that you can perform any additional steps e.g. taking out a lock. This works just the same way as %OnNew() does.
The object is the oref of the original object that was cloned. The cloned array is just used internally when doing a deep clone to prevent recursive loops, do not pass anything in at all for this parameter on the initial call. If you write a %OnConstructClone and from here you wish to call %ConstructClone on another object pass in the cloned array, e.g. 'Do oref.%ConstructClone(1,.cloned)' so that it can prevent recursive loops.
The location is used internally to pass the new location for stream objects.
Subclasses implement this in order to render the static HTML contents of a component.
pIgnore is an array of names of events that should be ignored.
If the properties W3CEVENT parameter is set to 0, then it will be ignored.
If value starts and ends with #( )#, then return an expression
This method removes the current object from the SaveSet. If this object is also in the save queue it is removed from there as well.
onclick="#(..%Self())#.someMethod();"
This method validates an object.
The %Save() method of a persistent class calls this method before filing any objects in the database. The %ValidateObject() of a referencing object can call it. You can also call it explicitly at any time.
%ValidateObject() does the following:
- If present, it will call a user-supplied %OnValidateObject() method.
- It checks if any required property values are missing.
- If the PROPERTYVALIDATION class parameter is set to ValidateOnSave, it validates each non-null property value by calling the property method IsValid on each literal property and the %ValidateObject method for each object-valued embedded object property (properties whose type extend %SerialObject).
- If checkserial is 1, it forces the checking of any embedded object properties by calling their %ValidateObject method after swizzling this property.
- If checkserial is 2, it forces the checking of any collections of serial types by iterating over those collections and calling their %ValidateObject() method after swizzling this property, in addition to the validation that occurs when checkserial is 1.
%ValidateObject() returns a %Status indicating success or error. It is up to the caller to process the error value.
%ValidateObject() does not validate object-valued reference properties (properties whose type extends %Persistent) due to the possibility of circular dependencies between objects. The %Save() method of a persistent class automatically detects and handles circular references between objects. If you require the validation of reference properties, you can override this method in a subclass or call %Save() directly.
top is the optional tag to be used for the top-level tag.
format is the parameter formatting type. DTDs may only be generated for the default "literal" format.
input=true means that the DTD for the input XML will be generated, otherwise the DTD for the output XML will be generated. The default is input=false. Normally, this argument is not relevant since the all properties of a class participate in input and output.
The dtdlist argument is used internally to track DTD generation for referenced objects.
IMPORTANT: The XMLExport method does not directly support many of the XML parameters. If you want control of the format of the export, do not use this method. Instead create an instance of %XML.Writer and use its OutputToDevice() method.
The supported arguments for XMLExport are:
top is the optional tag to be used for the top-level tag.
format is the parameter formatting type ("literal", "encoded" or "encoded12") to be used for this object. The default value for format is "" which currently is the same as the "literal" formatting, but may be a unique encoding in the future.
**********
**********
All the following arguments are for internal use only and may change
**********
**********
namespaces is the %XML.Namespaces class instance for this XML document.
Instead of namespaces typesPrefix is still supported for compatability and
is the optional namespace prefix to be used for all element tags and ObjectScript types.
attrs is a multidimensional array of extra attributes for the top node:
attrs is number of attributes
attrs(i) is name of ith attribute
attrs(i,0) is value of the ith attribute
If the createId is not "", then an id field with this id value is created.
If the typeAttr is not "", then add a type attribute to the top element if the this class's name is not typeAttr.
The idlist and oreflist arguments are used internally to track deferred object export and should normally not be specified.
initialIndent is the initial indentation for use when the format is indent.
local specifies if the element is treated as a local element. A global element is specified by a false value of local which can be either 0 to represent a global element in the namespace specified by the namespace argument or a string which is the namespace to which the global element belongs. The default for local is 0.
If the class is to be exported as an XOP package for use by SOAP MTOM, mimeAttachments is the MIME part which contains the list of MIME parts for all the attachments in the XOP package.
IMPORTANT: The XMLExportToStream method does not directly support many of the XML parameters. If you want control of the format of the export, do not use this method. Instead create an instance of %XML.Writer and use its OutputToStream() method.
The supported arguments for XMLExportToStream are:
export is the exported stream. If export is the oref of a stream, the XML document will be written to this existing stream at the current position. If export is "", then a new %FileCharacterStream will be created to contain the XML document and its oref returned. In this case, export must be passed by reference.
top is the optional tag to be used for the top-level tag.
format is the parameter formatting type ("literal", "encoded" or "encoded12") to be used for this object. The default value for format is "" which currently is the same as the "literal" formatting, but may be a unique encoding in the future.
**********
**********
All the following arguments are for internal use only and may change
**********
**********
namespaces is the %XML.Namespaces class instance for this XML document.
Instead of namespaces typesPrefix is still supported for compatability and
is the optional namespace prefix to be used for all element tags and ObjectScript types.
attrs is a multidimensional array of extra attributes for the top node:
attrs is number of attributes
attrs(i) is name of ith attribute
attrs(i,0) is value of the ith attribute
If the createId is not "", then an id field with this id value is created.
If the typeAttr is not "", then add a type attribute to the top element if the this class's name is not typeAttr.
The idlist and oreflist arguments are used internally to track deferred object export and should normally not be specified.
initialIndent is the initial indentation for use when the format is indent.
IMPORTANT: The XMLExportToString method does not directly support many of the XML parameters. If you want control of the format of the export, do not use this method. Instead create an instance of %XML.Writer and use its OutputToString() method.
The supported arguments for XMLExportToString are:
top is the optional tag to be used for the top-level tag.
format is the parameter formatting type ("literal", "encoded" or "encoded12") to be used for this object. The default value for format is "" which currently is the same as the "literal" formatting, but may be a unique encoding in the future.
**********
**********
All the following arguments are for internal use only and may change
**********
**********
namespaces is the %XML.Namespaces class instance for this XML document.
Instead of namespaces typesPrefix is still supported for compatability and
is the optional namespace prefix to be used for all element tags and ObjectScript types.
attrs is a multidimensional array of extra attributes for the top node:
attrs is number of attributes
attrs(i) is name of ith attribute
attrs(i,0) is value of the ith attribute
If the createId is not "", then an id field with this id value is created.
If the typeAttr is not "", then add a type attribute to the top element if the this class's name is not typeAttr.
The idlist and oreflist arguments are used internally to track deferred object export and should normally not be specified.
initialIndent is the initial indentation for use when the format is indent.
local specifies if the element is treated as a local element. Default is 0 (false).
Returns null if this is not a property of this object.
key is an optional argument used for properties (such as collections) that may need a key to find a specific value.
This list is returned by inserting the property names in the associative array (object) settings. Note: this method is automatically generated by DrawClassDefinition.
This is simply a client-side version of %MakeId().
Note that this must be a client-side method.
Note that this must be a client-side method.
This is a wrapper for the renderContents() method (if present). Applications should call ()render() to display dynamic components, but implement ()renderContents() to implement dynamic components.()
This is used by components that render themselves using client-side, dynamic content (i.e., instead of using the %DrawHTML() method).
Subclasses override this for cases where setting a property requires some additional side effect to happen.
The optional value2 argument is used in cases, such as collections, where a key and a value are needed. In this case value is used as a key and value2 is the value.
Return true if the property was explicitly handled and false for the default behavior (setting the property directly).
Inherited Members
Inherited Methods
- %ClassIsLatestVersion()
- %ClassName()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %ObjectModified()
- %OriginalNamespace()
- %PackageName()
- %SerializeObject()
- %SetModified()
- XMLNew()
- XMLSchema()
- XMLSchemaNamespace()
- XMLSchemaType()
Subclasses
- %DeepSee.Component.SVG.scoreCardColumn
- %DeepSee.Component.calculatedMember
- %DeepSee.Component.controlDefinition
- %DeepSee.Component.dataPropertyDefinition
- %DeepSee.Component.dataSeriesDefinition
- %DeepSee.Component.pivotCondition
- %DeepSee.Component.pivotLevel
- %DeepSee.Component.queryChunk
- %ZEN.Auxiliary.axis
- %ZEN.Auxiliary.column
- %ZEN.Auxiliary.condition
- %ZEN.Auxiliary.dataBag
- %ZEN.Auxiliary.dataSet
- %ZEN.Auxiliary.gridCell
- %ZEN.Auxiliary.gridColumn
- %ZEN.Auxiliary.gridColumnDescriptor
- %ZEN.Auxiliary.gridRow
- %ZEN.Auxiliary.gridRowDescriptor
- %ZEN.Auxiliary.locatorLink
- %ZEN.Auxiliary.option
- %ZEN.Auxiliary.parameter
- %ZEN.Auxiliary.radialNode
- %ZEN.Component.component
- %ZEN.SVGComponent.svgComponent
- %ZEN.SVGComponent.svgObject