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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Need to Enable the Combo Box in Change Task Resulting Table in Windchill 12

MA_10111591
4-Participant

Need to Enable the Combo Box in Change Task Resulting Table in Windchill 12

Hi, 

I've used the bleow set of code to enable the combo box in the resulting table of change task.

but I've able to view combo box value as well as the combo box drop down is displayed in the all the Component Mode (Create, Edit and View).

I've append the steps followed below and the sample code snippet. so kindly check and provide some solution.

 

1. Create and extends the ResultingItemsTableBuilders to add the new cloumn name

2. And set the data utility to call the combo box value by extending ChangeLinkAttributeDataUtility

3. create the attribute in the ChangeRecord2

4. make the attribute( column) as visible in the default table view.

 

Made the logic inside DataValue Method in custom dataUtility:

if (viewMode.equals(ComponentMode.CREATE) || viewMode.equals(ComponentMode.EDIT))
{
ArrayList<String> display_name = new ArrayList();
ArrayList<String> internal_name = new ArrayList();
display_name.add("Yes");
display_name.add("No");
internal_name.add("Yes");
internal_name.add("No");
box.setName(comp_id);
box.setId(comp_id);
box.setColumnName(AttributeDataUtilityHelper.getColumnName(arg0, arg1, mc));
box.setInternalValues(internal_name);
return box;
}

Enable the Logic for the TableBuilder

for (int _index = 0; _index < _attributeTypeIdentifier.length; ++_index) {
System.out.println(_attributeTypeIdentifier[_index].toExternalForm());
if ((_attributeTypeIdentifier[_index].toExternalForm()).contains("testAttribute")) {
ColumnConfig _columnConfig = _componentConfigFactory.newColumnConfig(_attributeTypeIdentifier[_index].toExternalForm(), false);
_columnConfig.setDataUtilityId("IBA|testAttribute");
_columnConfig.setComponentMode(_tableConfig.getComponentMode());
_tableConfig.addComponent(_columnConfig);
}

0 REPLIES 0
Announcements


Top Tags