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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

How to get Object details from selected row via custom action on separate jsp page

vuchekar
10-Marble

How to get Object details from selected row via custom action on separate jsp page

Hi All,

I have created a Custom Action link, which triggered an jsp page.

This custom Action is made available on Right Click actions and Details page action of an object.

now i want to get the selected object details like name, number on .jsp page. how i can achieve this.

i have tried "NmCommandBean".

Please let me know if you have any information on this.

Regards,

Vivek

3 REPLIES 3
RandyJones
20-Turquoise
(To:vuchekar)

Vivek Uchekar wrote:

Hi All,

I have created a Custom Action link, which triggered an jsp page.

This custom Action is made available on Right Click actions and Details page action of an object.

now i want to get the selected object details like name, number on .jsp page. how i can achieve this.

i have tried "NmCommandBean".

You can try something like the following:

<%@ include file="/netmarkets/jsp/components/beginWizard.jspf"%>

<%@ include file="/netmarkets/jsp/components/includeWizBean.jspf"%>

<%

Object context = commandBean.getPageOid().getRefObject();//get the right clicked object

WTPart wtp = (WTPart)context;//assume object was a WTPart

%>

<br>Part name = <%=wtp.getName() %> number = <%=wtp.getNumber() %>

You also need to check out Felco Solution's "Windchill Customization" course:

FELCO Solutions

This is an excellent course.

ddemay
7-Bedrock
(To:vuchekar)

You should create the Pet example from scratch using the Customizer's guide for this reason.

If you use a debugger, you can actually see multiple NmCommandBeans being exchanged back and forth between client and server.  Sometimes they are arrays or collections of NmCommandBeans.   There is a chance that your code is peering into the wrong NmCommandBean, but without more detail, no further assistance can be provided.

ddemay
7-Bedrock
(To:ddemay)

I should also add that the action you created likely has a problem in its cnfiguration. NmCommandBeans do act wierd when there is a flaw in action configuration.

Announcements

Top Tags