[gen] Allow an ajax request to return a message, carried as a custom HTTP header and retrieved by appy.js to display a message.
This commit is contained in:
parent
8d03f6ca9c
commit
4a393e76af
5 changed files with 33 additions and 15 deletions
|
@ -632,10 +632,12 @@ class AbstractWrapper(object):
|
|||
x=resp.setHeader('Content-type', ztool.xhtmlEncoding);
|
||||
x=resp.setHeader('Expires', 'Thu, 11 Dec 1975 12:05:00 GMT+2');
|
||||
x=resp.setHeader('Content-Language', lang);
|
||||
x=resp.setHeader('CacheControl', 'no-cache')">
|
||||
x=resp.setHeader('Cache-Control', 'no-cache')">
|
||||
|
||||
<!-- If an action is defined, execute it on p_zobj or on p_field. -->
|
||||
<x if="action" var2="x=ztool.executeAjaxAction(action, obj, field)"></x>
|
||||
<x if="action"
|
||||
var2="msg=ztool.executeAjaxAction(action, obj, field) or '';
|
||||
x=resp.setHeader('Appy-Message', msg)"></x>
|
||||
|
||||
<!-- Then, call the PX on p_obj or on p_field. -->
|
||||
<x if="not field">:getattr(obj, px[0])</x>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue