Skip to main content
12-Amethyst
July 14, 2020
Question

Javascript in MVC Table that calls an action

  • July 14, 2020
  • 2 replies
  • 1423 views

Usecase:

I have an MVC Table like following:

dullnigAlex_2-1594725743807.png

 

Is there a way to implement a Javascript function that calls an Action on doubleclicking a row in the first column.

It should call the same Action like the following one:

dullnigAlex_1-1594725719631.png

Thanks

Alex

2 replies

5-Regular Member
July 14, 2020

HI Alex,

 

Hope you are fine.

Why don't you use in an easier way the follwing :

 

http://support.ptc.com/help/windchill/wc111_hc/whc_en/index.html#page/Windchill_Help_Center/WCCG_UICust_PresentInfoUI_ConstructRender_JCATable_CP11.html

 

Configuring Table — Enabling a Row Selection
Making the rows selectable can be done by using setSelectable() on table config. To make the table non-selectable the value must be set to “false”. By default, table is selectable.
For example:
For setting non-selectable table.
ComponentConfigFactory factory = getComponentConfigFactory();
TableConfig table = factory.newTableConfig();
table.setSelectable(false);
 
 
 
I think it is exactly the same as you are requesting, isn't it ?
 
Hicham
17-Peridot
July 14, 2020

I'm not aware of a double click. Would be cool if that works. Have you opened a ticket at PTC? 

Perhaps you can register your own table event. Have you checked the JS documentation?