Skip to main content
12-Amethyst
February 21, 2024
Solved

Reload MVC table based on arguments

  • February 21, 2024
  • 1 reply
  • 1306 views

HI All

 

I have a MVC table in a wizard that displays a list of CAD Components. In the same wizard, I have a combo box which when changed has to change the components.

 

Example, let say the combo box is a filter for parts and assemblies. When I select Parts in the combobox, the table should reload and display only the parts and vice versa.

 

Any ideas how it can be done? I'm unable to build the table based on the value selected in the combobox.

Best answer by MV_10441462

The requirement was achieved using the below lines in jsp(under the combobox index changed function)

var params = { filter : prt }; 
PTC.jca.table.Utils.reload('CustomTableBuilder', params, true); 

 

The parameters can be read in the Builder class

 

@Override
public Object buildComponentData(ComponentConfig con, ComponentParams param) throws Exception {
JcaComponentParams params = (JcaComponentParams)param;
String filter = params.getHelperBean().getNmCommandBean().getTextParameter("filter");
}

1 reply

MV_1044146212-AmethystAuthorAnswer
12-Amethyst
February 22, 2024

The requirement was achieved using the below lines in jsp(under the combobox index changed function)

var params = { filter : prt }; 
PTC.jca.table.Utils.reload('CustomTableBuilder', params, true); 

 

The parameters can be read in the Builder class

 

@Override
public Object buildComponentData(ComponentConfig con, ComponentParams param) throws Exception {
JcaComponentParams params = (JcaComponentParams)param;
String filter = params.getHelperBean().getNmCommandBean().getTextParameter("filter");
}