Component Element (Data): Difference between revisions
Line 157: | Line 157: | ||
:{| class="infotable" | :{| class="infotable" | ||
|class="leftnormal"|target | |class="leftnormal"|target | ||
|Set – Designates the target into which picks derived from this component will be displaced. Must be one of these values:<br> | |(Optional) Set – Designates the target into which picks derived from this component will be displaced. Must be one of these values:<br> | ||
hero – Picks are displaced into the hero/actor, regardless of location in the structural hierarchy. | hero – Picks are displaced into the hero/actor, regardless of location in the structural hierarchy. | ||
parent – Picks are displaced into the immediate container. | parent – Picks are displaced into the immediate container. |
Revision as of 07:35, 26 November 2008
Context: HL Kit … Kit Reference … Structural File Reference
The "component" Element
At the heart of every thing are the components that define their shared behaviors. All components define a collection of fields and re-usable behaviors that can be combined into component sets. Each component is specified through the use of a "component" element. The complete list of attributes for this element is below.
id Id – Specifies the unique id of the component. This id is used in all references to the component. name Text – Public name associated with the component. Maximum length of 50 characters. sequence (Optional) Set – Designates the default sorting sequence to be used for picks based on this component. If no sort set is specified, or if the sort set does not yield a difference, picks will be sorted based on this criteria. Must be one of these value:
ascii – Sort alphabetically based on pick name.
nocase – Ignore case while sorting alphabetically.
id – Sort on the unique id of each pick as if it were text.
Default: "nocase".nonusersort (Optional) Set – Designates the special sorting behavior for picks that are not user-ordered when the same table mixes picks that are user-order with those that are non-user-ordered. Must be one of the following:
first – Picks that are not user-ordered are sorted before picks that are user-sorted.
last – Picks that are not user-ordered are sorted after picks that are user-sorted.
none – No differentiation is made between user-ordered picks and those that are not user-ordered.
Default: "none". NOTE! Any attempt by the user to move non-orderable picks will fail, as will any attempt to move user-ordered picks above or below non-orderable picks.usernamable (Optional) Boolean – Indicates whether picks from this component should be user-namable. If a component allows naming, so does any derived component set, unless the component set explicitly says otherwise. Default: "no". autocompset (Optional) Boolean – Indicates whether the Kit should automatically create a new component set with the identical unique id as the component. This new compset will possess exactly one component - this one. Default: "yes". orderfield (Optional) Id – Unique id to be used when automatically defining a special field for the component that will track the details of user-ordering. If empty, then this component does not support user-ordered sequencing of its picks. Default: Empty. unwind (Optional) Id – Unique id of the tag group to utilize for controlling "unwind" logic of picks derived from this component. The unwind mechanism ensures picks are deleted in the reverse order they are added. If omitted, no unwind logic is enabled for the component. Default: Empty. isgear (Optional) Boolean – Indicates whether things derived from this component are considered to be "gear". The gear mechanism automatically provides additional logic to all things designated as gear. Default: "no". denyboot (Optional) Boolean – Indicates whether things derived from this component are denied the ability to be bootstrapped from any source. Default: "no". panellink (Optional) Id – Unique id of an edit panel that is associated with all things derived from this component as the default panel linkage. If a thing also specifies an explicit panel linkage, that will take precedence. If empty, no default panel linkage is established. Default: Empty. hasshortname (Optional) Boolean – Indicates whether all compsets derived from this component should automatically incorporate the "short name" behavior provided by the Kit. Default: "no". ispublic (Optional) Boolean – Indicates whether this component is displayed within the Editor when the user utilizes the "Find Things" mechanism. In general, internal "helper" components should be made non-public so that the user only interacts with components that will be familiar to them. Default: "yes".
The "component" element also possesses child elements that define various facets of the component. The list of these child elements is below and must appear in the order shown. Click on the link to access the details for each element.
field Zero or more "field" elements may appear as defined by the given link. This element specifies the fields that exist for the component. usage Zero or more "usage" elements may appear as defined by the given link. This element specifies the pick-based usage pools associated with all things derived from the component. linkage Zero or more "linkage" elements may appear as defined by the given link. This element specifies the pick linkages that exist for all things derived from the component. identity Zero or more "identity" elements may appear as defined by the given link. This element specifies any identity tag groups that are defined for the component. containerreq Zero or more "containerreq" elements may appear as defined by the given link. This element specifies any container requirements for things derived from the component. displace An optional "displace" element may appear as defined by the given link. This element specifies any displacement behaviors that the component must perform. shadow An optional "shadow" element may appear as defined by the given link. This element specifies any shadowing behaviors that the component must perform. creation An optional "creation" element may appear as defined by the given link. This element defines a Creation Script for the component. deletion An optional "deletion" element may appear as defined by the given link. This element defines a Deletion Script for the component. xactsetup An optional "xactsetup" element may appear as defined by the given link. This element defines an XactSetup Script for the component. xactbuy An optional "xactbuy" element may appear as defined by the given link. This element defines an XactBuy Script for the component. xactsell An optional "xactsell" element may appear as defined by the given link. This element defines an XactSell Script for the component. tag Zero or more "tag" elements may appear as defined by the given link. This element specifies any tags that are automatically assigned to every thing derived from the component. bootstrap Zero or more "bootstrap" elements may appear as defined by the given link. This element specifies any things that are automatically bootstrapped to every thing derived from the component. loadfixup An optional "loadfixup" element may appear as defined by the given link. This element defines a LoadFixup Script for the component. eval Zero or more "eval" elements may appear as defined by the given link. This element specifies any Eval Scripts that must be performed for the component. evalrule Zero or more "evalrule" elements may appear as defined by the given link. This element specifies any EvalRule Scripts that must be performed for the component. prereq Zero or more "prereq" elements may appear as defined by the given link. This element specifies any pre-requisite tests that are applied to every thing derived from the component. merge An optional "merge" element may appear as defined by the given link. This element defines a Merge Script for the component. split An optional "split" element may appear as defined by the given link. This element defines a Split Script for the component.
The "usage" Element
The "usage" element defines a pick-based usage pool to associate with every thing for the component. The complete list of attributes for this element is below.
x –
The "linkage" Element
The "linkage" element defines a linkage to another pick that is associated with every thing for the component. The complete list of attributes for this element is below.
x –
The "identity" Element
The "identity" element defines an identity tag group for the component and all derived things. The complete list of attributes for this element is below.
x –
The "displace" Element
The "displace" element defines the displacement behavior for the component and all derived things. The complete list of attributes for this element is below.
target (Optional) Set – Designates the target into which picks derived from this component will be displaced. Must be one of these values:
hero – Picks are displaced into the hero/actor, regardless of location in the structural hierarchy. parent – Picks are displaced into the immediate container. Default: "hero".
The "shadow" Element
The "shadow" element defines the shadowing behavior for the component and all derived things. The complete list of attributes for this element is below.
target (Optional) Set – Designates the target into which picks derived from this component will be shadowed. Must be one of these values:
hero – Picks are shadowed into the hero/actor, regardless of location in the structural hierarchy. parent – Picks are shadowed into the immediate container. Default: "hero".
The "creation" Element
The "creation" element defines a Creation Script for the component. The complete list of attributes for this element is below.
PCDATA Script – Specifies the code comprising the Creation script.
The "deletion" Element
The "deletion" element defines a Deletion Script for the component. The complete list of attributes for this element is below.
PCDATA Script – Specifies the code comprising the Deletion script.
The "xactsetup" Element
The "xactsetup" element defines an XactSetup Script for the component. The complete list of attributes for this element is below.
PCDATA Script – Specifies the code comprising the XactSetup script.
The "xactbuy" Element
The "xactbuy" element defines an XactBuy Script for the component. The complete list of attributes for this element is below.
PCDATA Script – Specifies the code comprising the XactBuy script.
The "xactsell" Element
The "xactsell" element defines an XactSell Script for the component. The complete list of attributes for this element is below.
PCDATA Script – Specifies the code comprising the XactSell script.
The "loadfixup" Element
The "loadfixup" element defines a LoadFixup Script for the component. The complete list of attributes for this element is below.
PCDATA Script – Specifies the code comprising the LoadFixup script.
The "merge" Element
The "merge" element defines a Merge Script for the component. The complete list of attributes for this element is below.
PCDATA Script – Specifies the code comprising the Merge script.
The "split" Element
The "split" element defines a Split Script for the component. The complete list of attributes for this element is below.
PCDATA Script – Specifies the code comprising the Split script.
Example
The following example demonstrates what a "component" element might look like. All default values are assumed for optional attributes.