Dear Pedro,
I have observed that the issue where setting client variables makes the JSON disappear, still exists with the latest version. I saw that you have already provided a solution under this post along with the OML:
https://www.outsystems.com/forums/discussion/88545/json-pretty-format-reactive-setting-client-variables-causing-issues-with-json-p/
I downloaded the OML that you provided here and the modified component code in it. This indeed solves the original issue, BUT, it introduces a new issue due to the JavaScript code that you have been using in the OnRender of this OML. This causes an infinite loop of OnRender as the JavaScript Code changes the elements of the web block which re-triggers the OnRender.
The application becomes un-responsive because of this infinite loop.
Can you please devise a possible solution for this?
Kind regards,
Shounak
Hi Shounak, how are you doing?
I'm sorry but i do believe that you are, somehow, mixing topics.
The original component doesn't have any OnRender event included. Most likely, the OML given as an example, contains that event for troubleshooting purposes.
Also, there's a discussion already where it's quite clear that Client Variables are not advisable to be used with this component.
See more details here:https://www.outsystems.com/forums/discussion/89364/json-pretty-print-only-working-sometimes-on-the-first-time-page-is-loaded/#Post457552
Let me know if you have any more questions.
Cheers,
Pedro Domingues
Hi Pedro,
Thanks for the clarification. I now understand that there is a technical limitation here because of how the platform behaves with client variables.
KR,
Hi Shounak,
I'm glad that i could help.
Feel free to reach out if you need more help.