cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

How to add custom action in Product Structure Browser?

rl-2
7-Bedrock

How to add custom action in Product Structure Browser?

Hi,

I am unable to add custom actions in Product Structure Explorer (Windchill 10.2). I do not see any error in Method Server as well.

I could not find this information in PTC Customization document.

Can any one help in this regard.

Thanks in advance.

11 REPLIES 11
LoriSood
22-Sapphire III
(To:rl-2)

What kind of action are you trying to add and to where in the PSE? Individual row action? Menu bar?

rl-2
7-Bedrock
(To:LoriSood)

Hi,

Thanks for your comment.

I am tring to add an action to the context menu (the menu that appears after right click of part in PSE) like as shown in the image below.

Is this possible? if not what are the other possible ways of performing an customization in PSE to have our own custom action?

Capture.PNG

LoriSood
22-Sapphire III
(To:rl-2)

Have you taken a look at the "Customizing PSE Menus, Toolbars and Popup Menus" topic in

http://support.ptc.com/WCMS/files/138974/en/WCExplorersCust.pdf?

rl-2
7-Bedrock
(To:LoriSood)

This document describes the customization procedure for Product Structure Explorer and not for Product Stucture Browser . Do you have any other suggetions please?

Hi Vytautas,

Thanks for your reply.

The articales you have shared talks about Report Customization in PSB, If i understand from your comments, You want me to make use this LaunchURLAction class to call my own custom class in the JSP?

Please let me know if my understanding is correct.

Thanks once again.

It depends on your action, what is the purpose of your action...

In my case, i needed to add Move action so I build custom URL and redirected with javascript:

My jsp, which I'm calling from RMB menu looks like this:

<%@ include file="/netmarkets/jsp/util/begin.jspf" %>

<%
String prURL = ext.psb.ContainerMoveAction.URL(commandBean);
%>

<script>
window.location.href = '<%=prURL%>';
</script>

<%@ include file="/netmarkets/jsp/util/end.jspf" %>

Hi Vytautas,

The following is my need/requirement.

I would like to add several custom actions on to the PSB like Approve, Reject ... etc.

For ex: When i click on Approve the Part has to be Approved by assigning the status as Approved along with its 2D and 3D drawings.

Do you have any suggestions or solutions for this please?

Thanks once again.

So you don't need any UI window, so I think is quite easy.

So you will call JSP from RMB action and java method from JSP and with commandbean as java method parameter you will have all information what is selected.

Hi Vytautas,

This is the first and postivite hopeful answer i have received till date.

We tried but were unable to call our Java method from the JSP. If possible can you please provide me with the syntax or code snippet please?

As example you should look at these two articles:

http://www.ptc.com/cs/help/windchill_hc/wc101_hc/index.jspx?id=WCCG_BusLogicCust_ReportGeneration_ReportSelection&action=show

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS160511&posno=1&q=customActionGWT&nav=&source=Search

1. Prepare your action/actionmodels

2. Calll the custom jsp

3. Call the method from jsp

I used these two articles as basis for my customization. For simple customization everything is ready(OOTB from PTC) , you need to remove some comments from actionmodels file.

In <WT_HOME>/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>
Announcements


Top Tags