cancel
Showing results for 
Search instead for 
Did you mean: 

use the value of a global Variable in an HTML Mockup component using its javascript ?

0 Kudos

Hi every body ,

i created an application which have an Html Mockcup component , and i wanna to display the value of global variables on this component using its javascript function or jquery !

the error is that the javascript code of the HTML component can't get the value of the global variable of the Application !

as attachments you'll find :

  • the proprties of the global variable
  • the Mockup component which i'm talking about
  • a simple Html of the Mockup component
  • the error displayed on the browser Console

i'll be so grateful if you help me to fix this issue

Have a great day 🙂

mbensan thibault.robin

Accepted Solutions (0)

Answers (1)

Answers (1)

reiner_hille-doering
Active Contributor
0 Kudos

Hello,

The Global Script variables of Lumira Designer apps are no global JavaScript variables on the browser. All state of a Lumira app is stored on the server - and all scrips are also executed on the server.The SDK that was used to create the HTML mockup component allows to transport data from server to browser, but most likely the mockup component would need to be extended for your usecase.

If you want to try it yourself: The sourcecode of the community components is available at GitHub and the Lumira Developer guide can be downloade from help.sap.com. The mockup component would need to have some script APIs (in contribution.ztl) like "setVariableValue". In you script you would call this API to transfer the value from server to browser.

Reiner.