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

The PTC Community email address has changed to community-mailer@ptc.com. Learn more.

API - Need API to navigate to a specific tab within the part property page

API - Need API to navigate to a specific tab within the part property page

Within V10.1 APIs we can navigate to a specific part property page, but we cannot navigate to a specific tab within that page - for example the Related Docs or Structure tab. Need API so that our users are presented with the specific tab. See C11478531.

7 Comments
JørnAHansen
2-Guest

Are you looking for something similar to what's mentioned under the "Loading a Specific Tab" heading at http://www.ptc.com/cs/help/windchill_hc/wc101_hc/index.jspx?id=WCCG_UICust_InfoPages_InfoPages&action=show ?

GaryWalling
3-Visitor

Jørn, thanks for the pointer. We think that this documentation is to build internal urls from within a WT session. We need to create the url from an external jsp page that will open a specific part property page on a specific tab.

PTC tech suppport told us that what we want is currently unavailable - hence the enhancement suggestion.

Cheers.

JørnAHansen
2-Guest

Gary,

Yes you are right it is. But if you build a small extension within the WT session encapsulating this moving to the specific tab then you do not need to expose that Windchill internal knowledge to the external jsp. With that problem now taken out of the equation your external jsp and the code in the WT session only needs to agree on how to navigate to the right part based on e.g. Part number or something. I hope you are able to follow along my line of though here.

ptc-263244
2-Guest

Jørn, I'm working with Gary on this issue.  I'm a bit confused on what needs to be done to accomplish this.  I'm including a snippet of code from the jsp that builds the URL to the property page where objectRef = the object ref of the part.  Do you have an example of what needs to be added to the jsp to accomplish this move to the specific tab??

URLFactory url_factory = new URLFactory();

     String URLProcessor = "wt.enterprise.URLProcessor";
     String URLTemplateAction = "URLTemplateAction";

     HashMap hashmapProp = new HashMap();
     hashmapProp.put("action","ObjProps");

     hashmapProp.put("oid",objectRef);
     URL urlProp = GatewayServletHelper.buildAuthenticatedURL(url_factory,URLProcessor,URLTemplateAction,hashmapProp);

thanks!

eric

JørnAHansen
2-Guest

Eric,

Sorry - no time right now to check up on the API you are using to make sure an example would work. Here is a string manipulation based example I think we carried over from Windchill 9.1. TypeBasedIncludeServlet is probably infoPage in 10.1. But luckily for us PTC translates the old URLs to the new locations.

static String webapp = "/Windchill/servlet/TypeBasedIncludeServlet?tlnType=part&tlnAction=relatedPartsDocuments&oid=";

String url = webapp + oid;

tlnType and tlnAction for different actions/tables can AFAIK be found in Windchill\codebase\config\actions\xxx-actionModel.xml or xxx-actions.xml also you can easily experiment by pasting the URLs to a fresh browser window and see if it works. I just did that with /Windchill/app/#ptc1/tcomp/infoPage?tlnType=part&tlnAction=relatedPartsDocuments&oid=<some-oid-for-a-part> and it jumps to the Related Objects tab.

I hope this brings you a few steps closer to the goal.

ptc-263244
2-Guest

Thank you for the help Jørn!

PTCModerator
Emeritus
Status changed to: Archived