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

How to create Custom Table in Custom Tab with MVC. Need really help :-)


How to create Custom Table in Custom Tab with MVC. Need really help :-)

Hi Guys,

I have a question to a topic which is currently really annoying me. I tried to create a custom table with MVC at first like described in this PTC Article:

(I also tried the Customization Guide Windchill 10.1 M50 from page 590 to 627 and page 264 to 291. But I didn't bring a step forward.)

It sounds very simple to me, so I tried to realize it in my testing instance. Just to see how a new table integration works in Windchill. I have done that before only in Windchill 9.1 with JSP code. Point 4 and 5 are not so clear to me so I have done it like shown in the screenshots. For point 4 see screenshot3_custom-actions.xml. For point 5 I tried two options, first with the custom-actionmodel.xml and second with the PartClient-actionsmodels.xml directly (see screenshot4 and screenshot5)I. But both options don't give me a table in die relations tab in Parts. In screenshot 6 you can see the registering of the custombuilder in the /mvc/custom.xml file. All steps did not bring me success. My code can be seen in screenshot2.

My goal at the end is to create a tab manually in die system via the GUI and use the customize button to add my custom table (see screenshot1). My custom table should show WTChangeActivity2 objects which are linked to a document which I would like to realize with the method ChangeHelper2.service.getAffectingChangeActivities.

Thank you for all your help in advance. Small hints are also welcome as a detailed description 😉

Best Regards,



Re: How to create Custom Table in Custom Tab with MVC. Need really help :-)

Hi Daniel -  Did you create a resource bundle for your custom action?  You will need that to get a custom action to display.

Re: How to create Custom Table in Custom Tab with MVC. Need really help :-)

Hi Daniel,

could you get it work as you expected? I would be really interested to know the key steps for implementing such a customization.

Best Regards,


Re: How to create Custom Table in Custom Tab with MVC. Need really help :-)

Hi Daniel,

To add a new tab with custom Table I did the followings:

(//code changes to you components, name…etc)

1.       Your component builder Java Code:


import com.ptc.mvc.components.AbstractComponentBuilder;

import com.ptc.mvc.components.ColumnConfig;

import com.ptc.mvc.components.ComponentBuilder;

import com.ptc.mvc.components.ComponentConfig;

import com.ptc.mvc.components.ComponentConfigFactory;

import com.ptc.mvc.components.ComponentParams;

import com.ptc.mvc.components.TableConfig;

import com.ptc.mvc.util.ClientMessageSource;


import wt.util.WTException;

// This annotation is VERY important.


public class RelatedCompanionPartsTableBuilder extends AbstractComponentBuilder{


   private static final String RESOURCE = "";

   private final ClientMessageSource messageSource = getMessageSource(RESOURCE);



   public ComponentConfig buildComponentConfig(ComponentParams paramComponentParams) throws WTException {

          //get the ComponentConfigFactory

          ComponentConfigFactory factory = getComponentConfigFactory();

          //get an instance of TableConfig

          TableConfig table = factory.newTableConfig();

          // General table properties







          //add columns


          ColumnConfig col1 = factory.newColumnConfig("name", true);




          ColumnConfig col2 = factory.newColumnConfig("number", false);




          ColumnConfig col3 = factory.newColumnConfig("type", true);


          // Last Modified

          ColumnConfig col4 = factory.newColumnConfig("thePersistInfo.modifyStamp", true);



          // If you want different column name as Display name, use setLabel("New Name") function on column

          // If you data as link use setInfoPageLink(true) function on column


          return table;



   public Object buildComponentData(ComponentConfig paramComponentConfig, ComponentParams paramComponentParams) throws Exception {


          // your code which return a Query result containing the desired Parts




In your other custom Table builder use the annotation: @ComponentBuilder("”);

2.       Define custom actions in custom-action.xml


<!-- actions for tgt object type -->

   <objecttype name="tgt" class=""


          <action name="relatedCompanionParts" uicomponent="COMPANION_PARTS"

                 resourceBundle="" required="true">


                 name=" " />


          <action name="relatedChangeActivities" uicomponent="CHANGE_ACTIVITIES"

                 resourceBundle="" required="true">


                 name="" />



3.       Define A new custom action in InfoPage-actiomodels.xml in the section where you want the new menu item to appear:

<action name="relatedCompanionParts" type="tgt"/> <!-- Companion Part -->

<action name="relatedChangeActivities" type="tgt"/> <!—Change Activities -->

4.       Adding a custom TAB

Create a new TAB as you did in your screentshot1_xxx.png

Rename is as you wish.

Export the tabs from Windchill Shell using the with the command

java com.ptc.core.ui.ixb.ClientTabExport “My Custom Tab”.

A jar file will be exported which contain all tabs with the name “My Custom Tab”.

Change the content of the XML (TAG-ClientTab-0.xml) or create (MyCustomTab.xml) it manually as follows:

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE ClientTab SYSTEM "standardX24.dtd">


<csvname>My Custom Tab</csvname>






The changed/ created XML can be imported with the following command:

windchill wt.load.LoadFromFile -d "D:\ MyCustomTab.xml.xml" -CONT_PATH "/" -u “user” -p “password”

5.       RB File

Create a custom RB file where you have all the new texts:


public class CustomTabRB extends WTListResourceBundle


// component link text    

@RBEntry("Related Companion Parts")

public static final String PRIVATE_CONSTANT_1 = "tgt.relatedCompanionParts.description";


// component link text

@RBEntry("Related Change Activities")

public static final String PRIVATE_CONSTANT_2 = "tgt.relatedChangeActivities.description";


// table title

@RBEntry("Related Companion Parts ")



// table title

@RBEntry("Related Change Activities ")



6.       Changes is custom.xml

In custom.xml (wtCustom\codebase\config\mvc\custom.xml) ad the following line:

       <bean class=""/>

       <bean class=""/>

7.      Rebuild, Synchronize eclipse, restart server….

Re: How to create Custom Table in Custom Tab with MVC. Need really help :-)


As much as possible, try to use the jcaDebug=1 option in the URL to find out what actions.xml and action-models.xml are used and follow the same steps as in the OOTB code. This will help.


Windchill Customers

What browser do you most commonly use? (Chrome, Firefox, Edge Chromium, Internet Explorer 11, Safari, Other)

Learn more about how we are using our browser poll here