This section describes the declarative syntax used by rules that define SmartForm-based editors / palettes.<h2>Syntax</h2>
<pre>
<i>editor-rule:</i>
<i>editor-clause</i>
<i>editor-clause</i> <i>editor-rule</i>
<i>editor-clause:</i>
<i>append-tag</i>
<i>appendToGroup-tag</i>
<i>remove-tag</i>
<i>clear-tag</i>
</pre>
<h2><append> tag</h2>
Appends one or more editor groups.
<pre>
<i>append-tag</i>:
<append>
<i>group-tag</i><sub>many</sub>
</append>
</pre>
<div class="INSET">
<b><group> inner tag</b><br/>
Defines a editor group. All standard editor group attributes are supported (see
<q ref="core.env:KitEditors!EDITOR_GROUP">EDITOR_GROUP</q> for details). Use the 'priority' attribute to control the order of groups in the editor.
</div>
<pre>
<i>group-tag</i>:
<group <i>group-attributes...</i>>
<i>item-tag</i><sub>many</sub>
</group>
</pre>
<div class="INSET">
<b><item> inner tag</b><br/>
Defines a editor item. All standard editor item types and attributes are supported (see
<q ref="core.env:KitEditors!EDITOR_ELEM">EDITOR_ELEM</q> for details). Use the 'priority' attribute to control the order of items in the group.
</div>
<pre>
<i>item-tag</i>:
<<i>itemType</i> <i>item-attributes...</i>/>
</pre>
<div class="INSET">
A special 'class' attribute is also provided as a shortcut for creating editor items based on class metadata.
</div>
<h2><appendToGroup> tag</h2>
Appends one or more editor items to an existing editor group.
<pre>
<i>appendToGroup-tag</i>:
<appendToGroup id="<i>groupId</i>">
<i>item-tag</i><sub>many</sub>
</appendToGroup>
<i>item-tag</i>:
<<i>itemType</i> <i>item-attributes...</i>/>
</pre>
<h2><remove> tag</h2>
Removes a specified editor item / group.
<pre>
<i>remove-tag</i>:<sub>one of</sub>
<remove item="<i>itemId</i>"/>
<remove group="<i>groupId</i>"/>
</pre>
<h2><clear> tag</h2>
Clears a specified editor group. If the group identifier is omitted, then the entire editor is cleared.
<pre>
<i>clear-tag</i>:<sub>one of</sub>
<clear group="<i>groupId</i>"/>
<clear/>
</pre>
<h2>Example</h2>
<pre>
<extend rule="definePalette">
<constraint>(unit isa gml2:Module) and (board isa svg:ZDrawing)</constraint>
<comments>[Components]</comments>
<append>
<group id="COMPONENTS" title="Components" toggle="on">
<item class="gml2:Scenario"/>
<item class="gml2:Service"/>
<item class="gml2:Process"/>
<item class="gml2:Module"/>
</group>
</append>
</extend>
</pre>(c) SAP AG 2003-2006. All rights reserved.