
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2024 06:56 AM - edited 06-30-2024 06:58 AM
Hi All,
I am passing a parameter from UI action to UI page.
I am able to get the parameter value in HTML page which I am assigning to "jvar_userId" variable in HTML.
I want to access "jvar_userId" variable in client script of UI Page using "gel" function but I can see its not getting fetch. Also UI Page is not getting closed after clicking on "Submit" button. (refer snap)
What may be the reason ? is there any other way to implement this ? please help me.
Regards,
Virendra
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2024 09:38 AM
There is no "client side" of UI Page.
UI Pages are HTML (and client script) generators.
They generate HTML server side, which is than transported to client side.
That means that absolutely no UI Page/run-time variable is accessible in the page displayed client side.
The Client script, like the HTML is also "generated", so you could write something like
var appId = gel('${ jvar_userId }');
but after generating the final script and when running in the browser that will actually become something like:
var appId = gel('27084be69707c210a3d3ff0de053aff1');
which raises the question which element would have that id, cause your HTML "generator" contains nothing that would end up in an element with that id.
In other words a UI Page is like a php source file: it is interpreted and the result is transported to the browser and the same way as you don't have access to php run-time variable in the browser, the same way you don't have access to Jelly/UI Page run-time variables in the browser.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2024 09:38 AM
There is no "client side" of UI Page.
UI Pages are HTML (and client script) generators.
They generate HTML server side, which is than transported to client side.
That means that absolutely no UI Page/run-time variable is accessible in the page displayed client side.
The Client script, like the HTML is also "generated", so you could write something like
var appId = gel('${ jvar_userId }');
but after generating the final script and when running in the browser that will actually become something like:
var appId = gel('27084be69707c210a3d3ff0de053aff1');
which raises the question which element would have that id, cause your HTML "generator" contains nothing that would end up in an element with that id.
In other words a UI Page is like a php source file: it is interpreted and the result is transported to the browser and the same way as you don't have access to php run-time variable in the browser, the same way you don't have access to Jelly/UI Page run-time variables in the browser.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2024 11:35 AM
Thank you @-O-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2024 11:37 AM
You're most welcome, hope it helped 🙂