I am trying to figure out the best way to do the following:
1) When my application starts I detect if it is the first time it is run, if so, navigate to the SystemSettings/FirstRun method, which will load into the RHOM a preloaded record set of 500+ items.
2) When I am in SystemSettings traversing the JSON data set, I want to display progress back to the view so that the user can see that something is going on.
So it is my understanding that the view is not available until after the corresponding method in the controller is executed so does this mean if I want to display status from my controller to the view, that I would have to hook into a load event inside the view and do a ajax call to the controller:
#code to lookl through data insert into Rhom
Webview.execute_js ('jsfunction to display status')
html to display progess and status
js function to display status
js function that gets executed on load to call
Is this the right way to do it? When I try the Webview.execute_js I get:
Error: uninitialized constant SystemSettingsController::Webview
I was looking for discussions about WebView.execute_js and stumbled on your year-old post. I also noticed the problem you are encountering is because of a typo. The class 'Webview', does not exist, it should be 'WebView' instead (notice the capital V).
Your approach is a valid one though.