- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2022 05:45 AM - edited 12-15-2022 05:58 AM
Hello everyone 🙂
So the issue that I'm facing is adding input to an evaluate in the page.
I basically have a g:evaluate that need to run some serverside code and return an response, i.e. a string.
The issue is that this need to be based the value in one of the UI fields (input). I've searched high and low, but found nothing that works.
Some say that having (jelly="true") should allow fetching variables within the eval, i.e. via a jelly.jvar_myvariable - but it doesnt seem to work.
Test example HTML:
<input type="hidden" id="jvar_myvariable" name="jvar_myvariable" value="Test"/>
<g:evaluate var="jvar_gr" jelly="true">
jelly.jvar_myvariable; // This should return
</g:evaluate>
Client script call:
alert('$[jvar_gr]'); // This shows up empty - should show text "test".
Edit: BTW - it would be even better if I could simply add a parameter to the evaluate when calling it. Is this possible?
Also, note that its a field on the actual UI page - it cannot be transferred via setpreferences in UI action.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2022 04:24 AM
Seems its not possible due to evaluate being processed on load.
If interested, it was answered here- https://stackoverflow.com/questions/74823398/ui-page-jelly-how-to-use-dynamic-data-in-gevaluate
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2022 04:24 AM
Seems its not possible due to evaluate being processed on load.
If interested, it was answered here- https://stackoverflow.com/questions/74823398/ui-page-jelly-how-to-use-dynamic-data-in-gevaluate