Refresh/Notify edit UI from backend

Vote:
 

Hi,

We have extended the content reference property with an button to an external image bank. This opens a popup to the external site with a postback url (endpoint on our site). This endpoint (web api) recieves the image and uploads it to episerver and sets the content reference property with the uploaded image reference. This works quite well, but the issue here is that the UI doesn't know that the property has been changed before we do a refresh in the browser. Is there a way to notfiy the UI from code without having the editor refresh the page?

Can we use any of these?:

- Message Service Pool: http://world.episerver.com/documentation/Items/Developers-Guide/Episerver-Framework/7/User-Interface/Message-Service-Pool/

- Web sockets: http://world.episerver.com/documentation/Items/Developers-Guide/Episerver-CMS/9/User-interface/websocket-support/

Thanks

#149365
May 30, 2016 16:51
Vote:
 

Managed to do a workaround with signalR.

Does anyone know how I can trigger a refresh/reload on UI from dojo without doing a page reload?

#149403
May 31, 2016 14:54
Vote:
 

Hi Tim

It sounds like you may be able to publish a Dojo topic to do this. Grzegorz has done a great job blogging about the built in topics:

https://gregwiechec.com/2015/08/using-dojo-topic-publish-and-topic-subscribe/

I would personally start looking at contextchanged as this should refresh the UI panels.

David

#149416
Edited, May 31, 2016 16:07
Vote:
 

Thanks David, I will look into it :)

#149417
May 31, 2016 16:09
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.