component Attribute
In this article
Specifies the name of the editing component that will be referenced within the action attribute of a button element.
Type
The component attribute is a required attribute of the editWith element.
Valid component names include xCollection, xOptional, xReplace, xTextList, xField, xImage, xFileAttachment.
Example
The following is an example of the component attribute as it is used in the editWith element:
<xsf:editing>
<xsf:xmlToEdit name="CD_10"
item="/CustomUISample/CDCollection/CD"
container="/CustomUISample">
<xsf:editWith caption="CD"
autoComplete="yes"
component ="xCollection">
<xsf:fragmentToInsert>
<xsf:chooseFragment parent="CDCollection">
<CD>
<Title></Title>
<Artist></Artist>
<Tracks>
<Track></Track>
<Track></Track>
</Tracks>
</CD>
</xsf:chooseFragment>
</xsf:fragmentToInsert>
</xsf:editWith>
</xsf:xmlToEdit>
</xsf:editing>
The following is an example of the component attribute as it is used in the editWith element, where the value of the component attribute is "xFileAttachment":
<xsf:xmlToEdit name="some_name" item="/my:myFields/my:field1">
<xsf:editWith allowedFileTypes="doc, xls" component="xFileAttachment"/>
</xsf:xmlToEdit>
<menuArea name="msoStructuralEditingContextMenu">
<button action="xFileAttachment::attach" xmlToEdit="some_name" caption="Attach..." showIf="immediate" />
<button action="xFileAttachment::open" xmlToEdit="some_name" caption="Open" showIf="immediate" />
<button action="xFileAttachment::saveAs" xmlToEdit="some_name" caption="Save As..." showIf="immediate" />
<button action="xFileAttachment::remove" xmlToEdit="some_name" caption="Delete file" showIf="immediate" />
</menuArea>