WebView interaction

Description of the limitation and why it is relevant to address

As a developer I want to be able to write code to enable interaction with the WebView so that I can build better user experiences for my users.

I think this is relevant for the VIKTOR platform because more user friendly apps lead to better adoption of the (new) tools.

Current workarounds

Find another way to define the inputs

@RahmanOzdemir I believe i heard via Roeland that this is a functionality that you would want to have for an app, is that correct?

Hi Matthijs,

This is correct we where looking for a way that allowed us to interaction with the WebView. To be more specific we wanted to be able to draw lines/ polygons on top of charts/graphs and get the information from these lines/polygons back inside the VIKTOR application.

We have looked in Plotly callback functions but these were not working on the VIKTOR platform.

The workaround solution we came up with is a WebView build with JavaScript (charts.js). You have to download the data that you want to show in the chart from the app using a download button, then upload the data to the WebView so the charts get drawn. Then draw your own lines/polygons, download the data from the WebView. To get the data from the lines back in the application, you then have to upload it again using a FileField. We tried using the External VIKTOR API to handle the data flows but that didn’t work due to security limitations in the WebView. As you can imagen this workflow is currently not that user friendly.

1 Like