Hello,
I'm trying to integrate a viewer tool that has been developed separately using javascript that maniplutaes SVG components. I've attached a sample .xhtml file that can be played around with. The extension must be changed to .xhtml (I could only upload a .html file).
Two things I would like to do:
1. Display the output of the javascript within the <body> tags in a page containing SmartGWT widgets.
2. Be able to call functions from within the viewer i.e. functions like makeText() with parameters from a Datasource (e.g. when someone selects a ListGrid row).
How can this best be achieved?
I have tried the following:
Create a HTMLFlow object, insert all of the code between <body> tags and tried calling makeText() using JSNI on my client page. Now, when I examine my html page, the <div id="svgdiv"> exists but I can't call any functions, "makeText() is not defined" is the error I get and so I can't make the viewer display.
Is there any easy way to achieve both aims above? Am I trying the wrong approach?
The idea of having a separate file with this viewer code is that it can be updated easily (by simply replacing the file with the viewer code) because we maintain the same interface functions.
This is giving me real headache, please help!! My decision to buy a pro license depends if this functionality is possible.
I'm trying to integrate a viewer tool that has been developed separately using javascript that maniplutaes SVG components. I've attached a sample .xhtml file that can be played around with. The extension must be changed to .xhtml (I could only upload a .html file).
Two things I would like to do:
1. Display the output of the javascript within the <body> tags in a page containing SmartGWT widgets.
2. Be able to call functions from within the viewer i.e. functions like makeText() with parameters from a Datasource (e.g. when someone selects a ListGrid row).
How can this best be achieved?
I have tried the following:
Create a HTMLFlow object, insert all of the code between <body> tags and tried calling makeText() using JSNI on my client page. Now, when I examine my html page, the <div id="svgdiv"> exists but I can't call any functions, "makeText() is not defined" is the error I get and so I can't make the viewer display.
Is there any easy way to achieve both aims above? Am I trying the wrong approach?
The idea of having a separate file with this viewer code is that it can be updated easily (by simply replacing the file with the viewer code) because we maintain the same interface functions.
This is giving me real headache, please help!! My decision to buy a pro license depends if this functionality is possible.
Comment