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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

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.

sahmed
1-Newbie

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.

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.

1 ACCEPTED SOLUTION

Accepted Solutions
IsmailShaik
4-Participant
(To:sahmed)

Hi,

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

View solution in original post

15 REPLIES 15
IsmailShaik
4-Participant
(To:sahmed)

Hi,

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

sahmed
1-Newbie
(To:sahmed)

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?

IsmailShaik
4-Participant
(To:sahmed)

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

sahmed
1-Newbie
(To:sahmed)

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"

sahmed
1-Newbie
(To:sahmed)

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

IsmailShaik
4-Participant
(To:sahmed)

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

Hi Ismail,

let me try this..but one thing ... This associateTargets method is OOTB method???? Because, it is used in other actions I think.

Anyway, thanks for your help... if I face any difficulty I will get back to you.

IsmailShaik
4-Participant
(To:sahmed)

Yes, associateTargets method is used in other actions. But it is just an example here. You should have your own command class and method.

Ok....Let me try this ....

akhan
1-Newbie
(To:sahmed)

Hi Sakil,

BTW, on click of the action, what values are you setting in the IBA ? How are you reading those values ?

...Abdul Rahim

sahmed
1-Newbie
(To:akhan)

Hi Abdul,

I am getting the values from a xml file. I am going to set the targets name in the distribution target iba.

There might be some problem in my jsp...

sahmed
1-Newbie
(To:sahmed)

Hi Ismail,

Everything is working fine except that, I am not able to publish the name or number of distribution target in that column. Any idea from dataUtility how can I fetch the data from jsp ?
i can see the target I have assigned in the "Related Objects" table of the part.

Thanks,

Sakil

IsmailShaik
4-Participant
(To:sahmed)

Hi Sakil,

Good to know that you are close to the final solution of your problem. In the dataUtility, fetch the target associated with the part and display its name or number in the field.

There are APIs available in ESITargetUtility.java to get the distribution targets associated with your object.

-Ismail

Hi Ismail,

Thanks for your help. Everything is working fine right now. I got all my results correctly.

Thanks,

Sakil

IsmailShaik
4-Participant
(To:sahmed)

Since your issues are resolved, please mark this question as answered.

Top Tags