Hi,
Something weird happens with the actions of an onclick event.
Basically, I have 2 pages:
1_Form with some inputs and a submit button
2_Synthesis with a label.
When I click on the button, I call a REST service with the inputs and I would like to display the result (just a string variable) on the second page.
So, on the first page, I call the REST service and bind the output data to a local storage variable. Then I am supposed to be able to display that storage variable on the second page.
To do so, the "onclick" event of my button has 2 actions:
invoke REST Service, binding the output to a local storage variable.
Navigate to page 2
However, it doesn't work: the local storage variable is empty on the 2nd page.
It seems like the 2nd action (navigate) starts after the REST is invoked but before the storage variable is bound.Indeed, if in datasource, I add an alert "A" when I assign the response to the storage variable, and if I add a JS action (alert "B") between "Invoke REST" and "Navigate to page 2", then, "B" pops up before "A", meaning that the actions after "invoke Rest" run although the response hasn't been processed and saved in storage variables.
I don't think it should be the expected result, could you confirm?
How can I solve the problem?
Page 1 with inputs
Call a REST service with these inputs
Display the results on the second page.
As explained before, it looks like there is an issue if I invoke the service before leaving the first page.NB: the REST service is OK, when I add "alert(value)" in JS in the datasource, the value is correct...