Try our conversational search powered by Generative AI!

Trigger refresh of UI

Vote:
 

I have a dojo custom property where the content of another property on the page is edited through a web api call. The web api controller saves a new version of the page.

How can I tell epi to refresh the page?  Much like autosave is triggered when changing a property on the page through the input controls.

#188715
Mar 01, 2018 14:20
Vote:
 

Hi Mari

I'd say you need to publish a Dojo topic to inform the UI to refresh, I'd guess at /epi/cms/contentdata/updated. More info on the topic system in Dojo from the awesome Greg Wiecheć herehttps://gregwiechec.com/2015/08/using-dojo-topic-publish-and-topic-subscribe/

David

#188732
Mar 01, 2018 20:32
Vote:
 

Yes, David, you are right! The following did the trick:

topic.publish("/epi/shell/context/request", {
                       uri: "epi.cms.contentdata:///" + newContentLink
                   }, {
                           sender: this,
                           viewName: this.view,
                           forceContextChange: true,
                           forceReload: true
                       });
#188758
Mar 02, 2018 10:01
Vote:
 

Hey Mari, glad my suggestion helped and thanks for sharing your solution! 

#188772
Mar 02, 2018 14:22
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.