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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

API call through table builder

WM_9965332
11-Garnet

API call through table builder

Hi all, 

I have a wizard jsp page where I have defined an MVC table and a html button. The intent is once the user clicks the button, system will reload the table using PTC.jca.table.Utils.reload. My table builder contains code which makes an API request to get some validation response which will be displayed on the table. A wizard button on UI will be enabled/disabled based on table row output (safe to assume table will always have one entry).

 

I have noticed that once I reload the table and try to get the updated row(s) I don't get any values since the table is still reloading by the time the program calls "PTC.jca.table.Utils.getTableRows". To mitigate this I set a timeout so it waits for table to finish reload, but I cannot determine on average how long it would take to make the call. 
Is it possible to have some async/await in this scenario? Or perhaps use a different approach?

 

I went with the above approach since I want the user to know an operation is happening (system making API call) and be able to see response without using window.alert

 

1 REPLY 1

Hi WM_9965332,


Thank you for your question. 

 

I’d like to recommend to bring more context to your initial inquiry. 

It also helps to have screenshot(s) to better understand what you are trying to do in your process. 

This will increase your chances to receive meaningful help from other Community members. 
 

Regards,

Anurag 
 

Top Tags