简体   繁体   中英

Confluence - How to pass data from java to javascript?

In app development for Confluence, is it possible to pass data from the server-side code to the javascript execution on the frontend?

I do some permission checking in my app on the server-side and want to execute some javascript code based on that information on the client-side.

I explicitly do not want this check to be done on the client-side, there I want only the result.

Is it possible to pass additional data to the frontend that can be accessed via javascript (eg the AJS object)? I could of course create my own rest endpoint and query it via a separate api call in javascript, but I wish to do this in the initial page load if possible.

You must create some api in java side (back end), then call those apis from front end (javascript).

Call those apis at the begining of front end render.

You cannot just pass data magically from back end and front end only in backend side.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM