component-attributtet
Angir navnet på redigeringskomponenten som det skal refereres til i action-attributtet for et button-element.
Type
xsd:enumeration
Merknader
component-attributtet er et obligatorisk attributt for editWith-elementet.
Gyldige komponentnavn er xCollection, xOptional, xReplace, xTextList, xField, xImage og xFileAttachment.
Eksempel
Eksemplet nedenfor viser bruk av component-attributtet i editWith-elementet:
<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>
Nedenfor følger et eksempel på bruk av component-attributtet i editWith-elementet, der verdien for component-attributtet er 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>