All variables defined and returned from controllers starting with "_" (underscore) are grouped in sub-namespace called "app" whether every dictionary in variable that starts with "plugin_" generates a sub-namespace with the same identifier.
<script type="text/javascript" charset="utf-8"> {{wupdate = dict([([k[1:], v]) for k,v in response._vars.items() if k.startswith('_')])}} window.app = jQuery.extend(true, window.app, {{=XML(jsdumps(wupdate))}}); {{for k,v in response._vars.items():}} {{if k.startswith('plugin_'):}} window.{{=k}} = jQuery.extend(true, window.{{=k}}, {{=XML(jsdumps(v))}}); {{pass}} {{pass}} </script>
Comments (1)
0
dmitry-ermolaev-10781 10 years ago
may it do dinamic content? if _my_var1 on server is changed client will see that?