Project

General

Profile

Integrating Wt app with third part Javascript plugin

Added by luigi forlano 7 months ago

Hello,

I have read many posts in the forum but I was not able to solve my doubts. Please be patient if I ask stupid questions.

I have a C++ desktop application and I am exploring how to make it a web app. I need only to replace the previous GUI interface and Wt seems very promising for this task.
One important part of my GUI require the interaction of a data grid with a database. Instead to replicate it with Wt, in order to save time, I would like to replace this part of the GUI with a javascript plugin (https://tabulator.info , it uses in turn the JQuery library).

The question is: can I import such library and use it as part of my single page application?

Thank you very much for your kind attention,

Luigi


Replies (1)

RE: Integrating Wt app with third part Javascript plugin - Added by Matthias Van Ceulebroeck 5 months ago

Hello Luigi,

I apologize for the very late response, it has been very busy lately.

I have not looked at the specific library, but generally speaking you can use WApplication::require() to load JavaScript libraries.
If you then need to initialize the library in some way, you can use WApplication::doJavaScript().

You'll probably need an element to show the information on, which you can do by simply creating an empty WContainerWidget and setting its id (which you can then use in the library).

I hope that helps you along,

Best,
Matthias

    (1-1/1)