Support #8108
openEmbedded widget
0%
Description
I'm trying to insert WT-based widget to a HTML page. I found an example that looks like the best solution for me: https://www.webtoolkit.eu/wt/news/2010/12/17/widgetset_mode_and_cross_origin_requests
The first question I have: how can I create JS script file for my widget similar to chat.js that is used in the example?
Updated by Korneel Dumon almost 4 years ago
Hi Alex,
have a look at the example in 'feature/widgetset'. Wt will create the JS file for you.
Updated by Alex Fedorov almost 4 years ago
Thank you, but unfortunately the short way didn't work. The example doesn't work as expected. I see no embedded widget on the HTML page. All I see is the empty frame. The application construction function registered in Widgetset entry point is not called. I also can't find "hello.js" file on my disk.
Please explain what WT class/method generates the JS file. What is the location of this file? How to debug this problem (what should I check first)?
Updated by Alex Fedorov almost 4 years ago
More details:
I start hello console application using these parameters:
"hello.exe --http-address=0.0.0.0 --http-port=8080 --deploy-path=/hello --docroot=."
I can see the widget if I open browser for "http://localhost:8080/hello", but see an empty box if I try to run hello.html from your example
Updated by Korneel Dumon almost 4 years ago
I'm not sure what is going wrong. Maybe you can use the browser debugger to check the response? The call for 'hello.js' should go to the createWidgetSet() function.
Updated by Alex Fedorov almost 4 years ago
Browser can't load JS file with this error message "Failed to load resource: net::ERR_FILE_NOT_FOUND"
which means hello.js is not found.
Please explain what WT class/method generates the JS file. What is the location of this file?
Should I change something in server configuration parameters to see something on the webpage?
Updated by Alex Fedorov almost 4 years ago
I see the same situation like in issue opened 6 years ago: https://redmine.webtoolkit.eu/issues/3580
Is there something about widgetset and localhost combination I don't know
Updated by Korneel Dumon almost 4 years ago
The file isn't anywhere on the filesystem, it is generated on the fly using createWidgetSet()
.
Updated by Alex Fedorov almost 4 years ago
I found the problem solution here: https://witty-interest.narkive.com/eiZA7jY5/wt-interest-wt-interest-using-codemirror-with-wt
Thank you! Please close the issue.