Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Hello all,
I need to link a new Action in Action Menu of a Product..
How i can achive this.
Please Check the Image of Required Outcome.
Please tell me the exact way..
Thanks,
Vivek
Solved! Go to Solution.
Hi Vivek,
You can try below. This instructions for Note (subtype of EPMDocument) Object type, but instructions are same for other type too.
1. The RMB menu for Note object uses “epmdocuments details page actions” model from <WT_HOME>\codebase\config\actions\UwgmCadx-actionmodels.xml file
2. Copy this entire model to <WT_HOME>\codebase\config\actions\custom-actionModels.xml file
3. You can add you custom action details in the same model as shown below:
<model name="epmdocuments details page actions" menufor="wt.epm.EPMDocument">
.
.
.
<action name="inflateNotes" type="customInflateNoteActions" resourceBundle="ext.TEST.ActionDefinitionsRB"/> <!-- Custom Action in Objects Action Drop Down List -->
.
</model>
4. In the <WT_HOME>\codebase\config\actions\custom-actions.xml file add objecttype for above action. I below will goes to this file:
<objecttype name="customInflateNoteActions" class="wt.epm.EPMDocument|com.ptc.ptcnet.DynamicDocument|com.ptc.ptcnet.Note" resourceBundle="ext.TEST.ActionDefinitionsRB" >
<action name="inflateNotes" uicomponent="" ajax="component">
<description>Create a Inflate Note</description>
<command class="" method="execute" windowType="popup" url="netmarkets/jsp/ext/custom/InflateNotes/inflateNotes.jsp" />
</action>
</objecttype>
5. Place your inflateNotes.jsp file under <WT_HOME>\codebase\netmarkets\jsp\ext\custom\InflateNotes directory
6. Create a Resource file ActionDefinitionsRB under <WT_HOME>\src\ext\TEST directory which renders Labelling for your custom action
7. Compile this Resource file ActionDefinitionsRB with below command from Windchill Shell: (Do not copy paste above command in Windchill Shell)
tools class -Dclass.includes=ext\TEST\**
8. Make sure BUILD SUCCESSFUL and ActionDefinitionsRB.class file is created under <WT_HOME>\codebase\ext\TEST directory
9. Stop Windchill Method Server
10. Clear Tomcat, Info*Engine cache
11. Restart Windchill Method Server
Hi Vivek,
You can try below. This instructions for Note (subtype of EPMDocument) Object type, but instructions are same for other type too.
1. The RMB menu for Note object uses “epmdocuments details page actions” model from <WT_HOME>\codebase\config\actions\UwgmCadx-actionmodels.xml file
2. Copy this entire model to <WT_HOME>\codebase\config\actions\custom-actionModels.xml file
3. You can add you custom action details in the same model as shown below:
<model name="epmdocuments details page actions" menufor="wt.epm.EPMDocument">
.
.
.
<action name="inflateNotes" type="customInflateNoteActions" resourceBundle="ext.TEST.ActionDefinitionsRB"/> <!-- Custom Action in Objects Action Drop Down List -->
.
</model>
4. In the <WT_HOME>\codebase\config\actions\custom-actions.xml file add objecttype for above action. I below will goes to this file:
<objecttype name="customInflateNoteActions" class="wt.epm.EPMDocument|com.ptc.ptcnet.DynamicDocument|com.ptc.ptcnet.Note" resourceBundle="ext.TEST.ActionDefinitionsRB" >
<action name="inflateNotes" uicomponent="" ajax="component">
<description>Create a Inflate Note</description>
<command class="" method="execute" windowType="popup" url="netmarkets/jsp/ext/custom/InflateNotes/inflateNotes.jsp" />
</action>
</objecttype>
5. Place your inflateNotes.jsp file under <WT_HOME>\codebase\netmarkets\jsp\ext\custom\InflateNotes directory
6. Create a Resource file ActionDefinitionsRB under <WT_HOME>\src\ext\TEST directory which renders Labelling for your custom action
7. Compile this Resource file ActionDefinitionsRB with below command from Windchill Shell: (Do not copy paste above command in Windchill Shell)
tools class -Dclass.includes=ext\TEST\**
8. Make sure BUILD SUCCESSFUL and ActionDefinitionsRB.class file is created under <WT_HOME>\codebase\ext\TEST directory
9. Stop Windchill Method Server
10. Clear Tomcat, Info*Engine cache
11. Restart Windchill Method Server
Not sure what it's like in 10.1 but i know in 10.2 M030 you have to add the <supportedTypes> tag in the action to restrict the command to a specific subtype.
<objecttype name="customInflateNoteActions" class="wt.epm.EPMDocument" resourceBundle="ext.TEST.ActionDefinitionsRB" >
<action name="inflateNotes" uicomponent="" ajax="component">
<description>Create a Inflate Note</description>
<command class="" method="execute" windowType="popup"
url="netmarkets/jsp/ext/custom/InflateNotes/inflateNotes.jsp" />
<supportedTypes>
<type value="WCTYPE|wt.epm.EPMDocument|com.ptc.ptcnet.DynamicDocument|com.ptc.ptcnet.Note" />
</supportedTypes>
</action>
</objecttype>
i did the same steps . but the build failed when i tried to compile the resource file .
i m able to see my action but the label is not visible . rb data is not reflected i guess.Shirishkumar Morkhade can you help me on this ?
What command you used to compile the Resource?
Please sure:
1. Either you remove (or rename) corresponding class file from codebase.
2. Timestamp of .java file must be newer than corresponding .class file?
3. Do not copy paste this command on Windchill Shell instead type it manually.
4. Does this command throws any exception in Windchill Shell while execution?
Regards,
Shirish
Thanks Shirishkumar Morkhade .I got it ! i recreated the eclipse project and it works fine now btw , how can the class file of java be newer . only upon compilation of java file , we ll get the class file right ? and in eclipse navigator , my class file doesnt appear . how ever in the windchill codebase i can see the class file after i compiled the rb . i am able to see the output but dont seem to understand why it is so !
Regards,
Soundarya.