Advanced Customization > Business Logic Customization > Report Generation > Report Selection List Customization > Right Click Menu Customization
  
Right Click Menu Customization
However, it is possible to add a menu item to the right-click context menus in the structure that can launch actions or other jsp pages (e.g., reports). There is an example action that can be used as a basis for creating custom actions or reports.
Perform the following steps see the example action.
1. There is an example jsp file installed in the following location: <Windchill>/codebase/netmarkets/jsp/part/custom/customAction.jsp.
2. In <Windchill>/codebase/config/actions/psb-actionmodels.xml, find the psbRelatedPartsTreeContextMenu model and uncomment the "customActionGWT" action by removing the <!-- and --> delimiters.
<model name="psbRelatedPartsTreeContextMenu">
...<snip>...
<!-- <action name="customActionGWT" type="psb"/> -->
</model>
The customActionGWT is defined in the <Windchill>/codebase/config/actions/psb-actions.xml file:
<action name="customActionGWT" ajax="component">
<command class="com.ptc.cat.ui.client.action.LaunchURLAction"
method="execute" url="/ptc1/psb/customAction" windowType="popup"/>
<supportedTypes>
<type value="wt.part.WTPart" />
<type value="wt.part.WTPartUsageLink" />
<type value="wt.part.PartUsesOccurrence" />
<type value="wt.part.RTPartPathOccurrence" />
</supportedTypes>
</action>
3. Restart the MethodServer and navigate to the Structure tab of a Part information page.
4. Right-click on any part in the structure and select Custom Action in the menu. This launches a window as defined by customAction.jsp.
5. To create custom actions or report, define the action in the appropriate *-actions.xml file (e.g., psb-actions.xml) using the customActionGWT as an example.
Change the name of the action, the url parameter and supportedTypes as needed.
Add the resourceBundle parameter to specify the file that contains the label of the action (see “Resource Info (.rbInfo) Files” section).
Then update the model definition in the appropriate *-actionmodels.xml file to include the action defined.