Mercurial > libervia-backend
comparison src/tools/xml_tools.py @ 1622:5b24d6bf5d15
core, bridge: actionsGet:
- added a new mechanism to keep actions until they are answered (or timeout-ed)
- keep_id must be explicitly used on actionNew
- actionsGet is used to retrive these actions
- the mechanism is used in deferXMLUI
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 17 Nov 2015 21:28:58 +0100 |
parents | e0a152f2cf6d |
children | f1da3a8d08ce |
comparison
equal
deleted
inserted
replaced
1621:a17a91531fbe | 1622:5b24d6bf5d15 |
---|---|
1269 | 1269 |
1270 xmlui.submit_id = host.registerCallback(onSubmit, with_data=True, one_shot=True) | 1270 xmlui.submit_id = host.registerCallback(onSubmit, with_data=True, one_shot=True) |
1271 action_data = {'xmlui': xmlui.toXml()} | 1271 action_data = {'xmlui': xmlui.toXml()} |
1272 if action_extra is not None: | 1272 if action_extra is not None: |
1273 action_data.update(action_extra) | 1273 action_data.update(action_extra) |
1274 host.actionNew(action_data, profile=profile) | 1274 host.actionNew(action_data, keep_id=xmlui.submit_id, profile=profile) |
1275 return xmlui_d | 1275 return xmlui_d |
1276 | 1276 |
1277 def deferDialog(host, message, title=u'Please confirm', type_=C.XMLUI_DIALOG_CONFIRM, options=None, | 1277 def deferDialog(host, message, title=u'Please confirm', type_=C.XMLUI_DIALOG_CONFIRM, options=None, |
1278 action_extra=None, security_limit=C.NO_SECURITY_LIMIT, profile=C.PROF_KEY_NONE): | 1278 action_extra=None, security_limit=C.NO_SECURITY_LIMIT, profile=C.PROF_KEY_NONE): |
1279 """Create a submitable dialog and manage it with a deferred | 1279 """Create a submitable dialog and manage it with a deferred |