onSend REST API更改不会反映在UI中 [英] onSend REST API changes do not reflect in the UI

查看:89
本文介绍了onSend REST API更改不会反映在UI中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用onSend事件来执行一些REST API请求,这些请求可能会更改和更新收件人和草稿项目正文.

We are using the onSend event to perform some REST API requests that may change and update recipients and the draft item body.

但是,这些更改不会反映在UI中,并且在onSend事件完成同时允许send事件继续的情况下,将发送草稿项目,而不会(成功地)通过REST API进行更改.

However, those changes are not reflected in the UI and when the onSend event is completed while allowing the send event to continue, the draft item is sent without the changes (successfully) made through the REST API.

可以确认这种行为吗?如果是这样, 有没有办法在完成onSend事件之前强制UI更新?

Can this behaviour be confirmed ? and if so, is there a way to force the UI to update before completing the onSend event?

我们正在尝试通过也通过REST API发送项目来解决此问题,但这在以下情况下与完成onSend事件冲突:

We are trying to work around this by sending the item through the REST API as well, but that conflicts with completing the onSend event in the following cases:

    通过REST API + onSendEvent.complete(allowEvent:true)发送的
  • 项 我相信OWA尝试发送商品后会收到UI错误

  • item sent through REST API + onSendEvent.complete(allowEvent : true) I believe we get a UI error after OWA tries to send the item

项 什么也没发生,用户界面仍然显示不再存在的草稿

item sent through REST API + onSendEvent.complete(allowEvent : false) Nothing happens, the UI still shows the draft that no longer exists

可能是REST API不会导致UI更新,而是使用OfficeJs API会更新UI吗?

Might it be the case that the REST API does not cause the UI to be updated, but using the OfficeJs API dóes update the UI ?

推荐答案

是的,此行为是预期的. REST API修改服务器上的副本.在onSend事件期间,消息仍在客户端上,并且消息本身不一定已更新到服务器.在onSend事件完成后,OWA将随后将消息更新到服务器并发送.在onSend事件期间或onSend事件完成之前,无法强制OWA从服务器进行更新.

Yes, the behavior is expected. REST API modifies the copy on the server. During onSend event, the message is still on the client and the message itself is not necessarily updated to the server yet. After the onSend event completes, OWA will then update the message to the server and send. There is no way to force OWA to update from the server during onSend event or before onSend event completes.

这篇关于onSend REST API更改不会反映在UI中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆