2.1.3.3 Action

Target namespace: http://schemas.microsoft.com/windows/2007/BusinessDataCatalog

Referenced by: Actions

A complex type that specifies an Action of an Entity.

Child Elements:

LocalizedDisplayNames: A LocalizedDisplayNames element (section 2.1.3.28) that specifies the localized names of the Model.

Properties: A Properties element (section 2.1.3.39) that specifies the Properties of the Model.

ActionParameters: An ActionParameters element (section 2.1.3.5) that specifies the Parameters of the Action.

Attributes:

Position: An ActionPosition attribute (section 2.1.4.1) that specifies the suggested position of this Action among the other Actions of this Entity. An application reading the structure can use this ordering as guidance in an implementation-specific algorithm that represents the Actions in the user interface.

IsOpenedInNewWindow: An xs:boolean attribute that specifies whether the results of executing an Action are presented in a new user interface context. An application reading the structure can use this value as guidance on creating new user interface context when the Action is executed.

Value

Description

False

Open in the same user interface context.

True

Open in a new user interface context.

Url: A UrlString attribute (section 2.1.4.17) that specifies an abstract command that is interpreted by an application reading this structure. The interpretation is implementation-specific.<1> The attribute includes text and placeholders. The application instantiates the abstract command by replacing the placeholders with values associated with the Action's ActionParameters in an implementation-specific manner.<2>

The value of this attribute MUST be in the following format as expressed in ABNF as specified in [RFC5234]:

 Url = 1*( Text / EscapedLeftBracket / EscapedRightBracket / Placeholder )
 Text = %x21-7A / %x7C / %x7E
 EscapedLeftBracket = %x7B %x7B 
 EscapedRightBracket = %x7D %x7D
 Placeholder = %x7B Index [%x2C Alignment] [%x3A Format] %x7D
 Index = 1*DIGIT
 Alignment = [%x2D] 1*DIGIT
 Format = 1*ALPHA

The Text rule is used to produce any visible character other than a curly bracket.

When instantiating the command, the EscapedLeftBracket and EscapedRightBracket rules MUST be changed to the following definitions:

 EscapedLeftBracket = %x7B
 EscapedRightBracket = %x7D

The Placeholder rule corresponds to a string segment that MUST be replaced with an implementation-specific value of an ActionParameter of the Action. The ActionParameter that MUST be used is identified by having the Index attribute equal to the integer value specified by the Index rule.

The Index rule corresponds to a string segment that represents an integer in base ten. The value of this integer MUST be identical to the value of Index attribute of exactly one ActionParameter of the Action.

The Alignment and Format rules correspond to string segments that are implementation-specific.<3>

ImageUrl: A UrlString attribute that specifies the Uniform Resource Locator (URL) to the Action’s icon image.<4>

Name: A NameString attribute (section 2.1.4.9) that specifies the name of the Model.

DefaultDisplayName: A NameString attribute that specifies the default display name of the Model.

IsCached: An xs:boolean attribute that specifies whether the Model is used frequently. This MAY<5> be used as a recommendation as to whether to cache the Model. This attribute MUST be set to one of the values listed in the following table.

Value

Description

False

The Model is infrequently used.

True

The Model is frequently used.

The following W3C XML Schema ([XMLSCHEMA1/2] section 2.1) fragment specifies the contents of this complex type.

 <xs:complexType name="Action">
   <xs:complexContent>
     <xs:extension base="bdc:MetadataObject">
       <xs:sequence>
         <xs:element name="ActionParameters" type="bdc:ActionParameters" minOccurs="0">
           <xs:unique name="ActionParameterNameKey">
             <xs:selector xpath="*"/>
             <xs:field xpath="@Name"/>
           </xs:unique>
           <xs:unique name="ActionParameterIndexKey">
             <xs:selector xpath="*"/>
             <xs:field xpath="@Index"/>
           </xs:unique>
         </xs:element>
       </xs:sequence>
       <xs:attribute name="Position" type="bdc:ActionPosition" use="required"/>
       <xs:attribute name="IsOpenedInNewWindow" type="xs:boolean" default="false"/>
       <xs:attribute name="Url" type="bdc:UrlString" use="required"/>
       <xs:attribute name="ImageUrl" type="bdc:UrlString"/>
     </xs:extension>
   </xs:complexContent>
 </xs:complexType>

See section 5.1 for the full W3C XML Schema ([XMLSCHEMA1/2] section 2.1).