A
object is a dependently persistable object; it has no
method and therefore cannot be independently saved. Because any given
object is dependent on the independently persistable
object to which it belongs, its state is not saved until you call the
method of the
object that owns it. For a given
object to belong to a
object, it must be added to the
collection that is returned by the
object's
property.
The type of data that a
object can represent is determined by the
constant value that you specify with its
property. This property determines whether a
object represents an integer-type choice item, a string-type choice item, a group node for a nested collection of integer-type choice items, or a group node for a nested collection of string-type choice items.
Localization is provided by the
property, using the same mechanism that
and
objects use. However, unlike those objects, the
object does not have a
property. To localize a
object, set its
property to a
object containing a collection of
objects. Each object in this collection represents a locale-specific, user-readable display name that can be used for a
object; set its
property to a locale ID and its
property to the localized text for the display name. Once you have set the
property, the server will automatically set the value of the
property to the
property value of the
object in the
collection that corresponds to the object store's default locale.
A
object's display name, or label, identifies it and is stored by its
property. You can either set the
property directly or you can set it indirectly by setting the
property. Setting the
property is the preferred method. You must set either a
object's
property or its
property; you cannot set both. If you set the
property, the server will automatically create a
object with its
property set to the object store's default locale and add it as a single item in the
property's
collection. If you set the
property directly, localization will be bypassed and the language of its text may not match the specified locale. For example, if you store English text (en-us) in the
property and the default locale is French (fr-fr), the
property will return a collection containing a single
object that specifies a French locale with English text. Note that this behavior is unique to
objects.
A
object's display name, which is always a string value, should not be confused with its value, which can be a string, an integer, or a collection of
objects (when a
object acts as a group node). A
object's display name is assigned with the
property, while its value is assigned using the appropriate property, depending on its type:
for integer-type choice items,
for string-type choice items, or
for group nodes. Although the server does not check the display names and values of the choice items within a given choice list for uniqueness, it is recommended that they be unique to avoid ambiguity.
To create a
object, call the
method. In order to save the state of a new
object (when you save the
object to which it belongs), you must, at a minimum, set its
and
properties. The
property can be either set directly, by setting it to a
object; or set indirectly, by setting the
property. To create a list collection of
objects (
object), call the
method.
The following tables list the members exposed by IChoice.
Public Properties
Name | Description | |
---|---|---|
![]() | ChoiceIntegerValue | The value of a object that holds an integer data type in a choice list. |
![]() | ChoiceStringValue | The value of a object that holds a string data type in a choice list. |
![]() | ChoiceType | Specifies a constant that determines the type of data that a object represents: an integer-type choice item, a string-type choice item, a group node for a nested collection of integer-type objects, or a group node for a nested collection of string-type objects. |
![]() | ChoiceValues | A object representing a set of allowable values. If it is associated with a property, provides a discrete set of possible values that the property can hold. Otherwise, if a is associated with a object, it defines the set of possible values in a choice list group. |
![]() | DisplayName | The user-readable, provider-specific name of an object. This property is usually the designated Name property of the object's class. |
![]() | DisplayNames | Specifies a object containing a collection of objects, each of which represents a locale-specific, user-readable display name for a class definition, property template, or choice. |
![]() | Id | A representation of the Globally Unique Identifier (GUID), a unique 128-bit number, that is assigned to this Content Engine object when the object is created. When converted to a string, the Id property is typically depicted as 32 hexadecimal characters enclosed by brackets in the following format: {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}. For example, {3F2504E0-4F89-11D3-9A0C-0305E82C3301}. For For a given property representation, the Id property has the following characteristics:
For a newly created document object, you can override the Id property of its associated |
![]() | Name | The name for this object. For most classes, this property is read-only and returns the value of the designated name property for the object, or its ID if there is no name property. If For a |