Skip to main content
1-Visitor
May 4, 2015
Solved

I have a custom column in a table. I am not able to update the column by selecting all the values present in the table. This is a table in Associate Distribution Target.

  • May 4, 2015
  • 3 replies
  • 7818 views

I have a custom column in a table. I am not able to update the column by selecting all the values present in the table. This is a table in Associate Distribution Target.

Best answer by IsmailShaik

Hi,

Could you elaborate your question? If possible, add screen shots to make it more clear.

3 replies

1-Visitor
May 5, 2015

Hi,

Could you elaborate your question? If possible, add screen shots to make it more clear.

sahmed1-VisitorAuthor
1-Visitor
May 5, 2015

Hi Ismail,

In my resulting objects table of Change Notice I want to add one column. I have one custom IBA. The values of that IBA will populate the column.

Do you have any idea? What are the steps to add the column?

1-Visitor
May 5, 2015

I think you need to override the method "buildComponentConfig" of the MVC builder "com.ptc.windchill.enterprise.change2.mvc.builders.tables.ResultingItemsTableBuilder".

sahmed1-VisitorAuthor
1-Visitor
May 5, 2015

Hi Ismail,

Thanks for the reply. I am trying this. If I face any issue I will get back to you.

One more query. In the customize view of a table, there is a option called "Available Column". How can I add ootb attribute in that Available Columns"

sahmed1-VisitorAuthor
1-Visitor
May 14, 2015

As I had asked you earlier, its good to have screen shots explaining what you are trying to achieve here. By looking at what you have described, I have few questions.

1) Where is your custom action located? on the resulting Items table?

2) If yes, is it a table level action or row level action?

3) Regarding the JSP page here, is it OOTB associate distribution target page? or some custom page?

Also, it is good to post this in the community instead of a personal question. So that if anyone in the community has an answer, you will get it faster. Also, people can refer it later if they face same/similar issues.

-Ismail

Hi Ismail,

As per you query..

1)My custom action located in resulting Objects table of Change Task.

2)It's a table level action. After the selecting the value from the dropdown in jsp it will update the distribution target column in the table. I want to associate the resultant objects with distribution target.

3) This is not the ootb jsp page, as I have one more dropdown in the table.

My question is how can I get details of the objects I have selected from the table and then map the value to Distribution target iba.?

For your help , Here I have attached the screenshot of my resulting objects table.

Thanks,

Sakil PTC_Case.PNG

1-Visitor
May 15, 2015

Sakil,

Your action should have a form processor or command class configured as shown in the example below.

<action name="Your-action">

<description></description>

<command class="com.ptc.windchill.esi.svc.ESIServicesCommand" method="associateTargets" windowType="popup"/>

</action>

public static FormResult associateTargets(NmCommandBean commandBean) throws WTException {

//The following line of code should give you the selected objects from the resulting objects table.

ArrayList<NmOid> selectedObjects = commandBean.getActionOidsWithWizard();

// Fetch the selected targets using the same command bean

//your logic to associate targets goes here

//Now populate the FormResult with Dynamic refresh info to update the Resulting Items table rows(selected rows only)

List<DynamicRefreshInfo> list = new ArrayList<DynamicRefreshInfo>();

//For each NmOid, add the following to this list

list.add(new DynamicRefreshInfo(NmOid, NmOid,commandBean.DYNAMIC_UPD)

formResult.setDynamicRefreshInfo(list);

return formResult;

}

-----------------------------

Hope this helps.

-Ismail