Basic Customization > User Interface Customization > Adding Actions and Hooking Them Up in the UI > Action Framework for Windchill Client Architecture > Defining a New Action Model
  
Defining a New Action Model
Action models are defined in an XML file that follows the structure based on codebase/config/actions/actionsmodels.dtd.
Here is a simple example of an action model definition used for the folder browser toolbar:
<!-- default toolbar for the Folder page -->
<model name="folder_list_toolbar">
<action name="list_cut" type="object"/>
<action name="list_copy" type="object"/>
<action name="fbpaste" type="object"/>
<action name="pasteAsCopy" type="saveas"/>
<action name="list_paste_sharing" type="folder"/>
<action name="list_delete" type="object"/>
<action name="CONTAINERMOVE" type="pdmObject"/>
<action name="PAGERELOADINGMULTICHECKOUT" type="folder"/>
<action name="WFADDTOWORKSPACE" type="folder"/>
<action name="separator" type="separator"/>
<action name="create" type="folder"/>
<action name="create" type="document"/>
<action name="createMulti" type="document"/>
<action name="createPartWizard" type="part"/>
<action name="createMultiPart" type="part"/>
<action name="add_link" type="bookmark"/>
<action name="create" type="problemReport"/>
<action name="create" type="changeRequest"/>
<action name="create" type="changeNotice"/>
<action name="separator" type="separator"/>
</model>
The objecttype name is a way to create a name space as well as packaging for actions related to a specific object or functional area. In the above example, the name “document” creates a unique name space for actions that apply to wt.doc.WTDocument.
It is also possible to create an action model which itself references another action model. The folder browser Actions menu contains a submodel for the New group of actions. For example, the action model for the New group of actions might be defined as follows:
<model name="folder_file_new" resourceBundle="com.ptc.core.ui.tableRB">
<action name="create" type="document" resourceBundle="com.ptc.core.ui.tableRB" />
<!-- More actions here --!>
</model>
Then, in the action model for the Actions menu, include the submodel “folder_file_new”:
<model name="folder_file">
<submodel name="folder_file_new"/>
<action name="create" type="document"/>
<!-- More actions here --!>
</model>
See the figure below for how this appears in the user interface: