Question: Is there a workaround how I can simulate clicking of an actionButton
within the server
code?
Background: I've got a shiny
app with quite a few parameters that the user is supposed to type in. This part of the app is divided into several UIs, each one created with renderUI
. At the beginning, the user only sees the first UI. Once she has filled in the fields, she is supposed to click on an actionButton
and the second UI is dynamically generated, whereby the fields and the text of the second UI depend on the content of the fields of the first UI.
Once the user has filled in both UIs, I want her to be able to save the content of all the fields as a template and to load the template next time she will use the app. Saving is implemented as simply writing all the values into a csv
in a structured way, and loading is done with update*
-functions (such as updateNumericInput
, updateTextInput
etc.).
The problem is that I have somehow to simulate the clicking on the actionButton
because at the time the template is loaded, the second UI hasn't been created yet. It doesn't help to add a dependency on the template upload button to the second UI, as the second UI needs some values from the first one.