Hi Praful,
Thank you on your quick response. I already readed that article ( and any other that I could find regarding this) and I use it for a start point.
I track what events are triggered on mouse click on CA or CA item and write this JS file :
define([
"dojo",
"dojo/_base/array",
"dojo/_base/lang",
"dojo/_base/declare",
"dojo/topic",
"dijit",
"epi/_Module",
"epi-cms/contentediting/editors/ContentAreaEditor"
],
function (
dojo,
array,
lang,
declare,
topic,
dijit,
_Module,
_contentAreaEditor
) {
return declare([_Module, _contentAreaEditor],
{
initialize: function() {
this.inherited(arguments);
topic.subscribe("focusNode", lang.hitch(this, "_onFocus"));
topic.subscribe("widgetBlur", lang.hitch(this, "_onBlur"));
},
_onFocus: function (data) {
console.log("onFocus: ", data);
var item = dijit.byId(data.id);
console.log("f-dijit: ", item);
},
_onBlur: function (data) {
console.log("onBlur: ", data);
console.log("b-dijit: ", dijit.byId(data.id));
}
});
}
);
And I stack here. I can't izolate the clicked widget and than to call a web api method or something.
Hi,
I think the solution: Refresh on click is not good for UX. Otherwise we can use a kind of SignalR and publish/subscribe event from server and refresh content area data or could be better we will push new notification like: "[PropertyName]'s value was changed, click [here] to refresh". (This behaviour like notfication when we have more than one editor is working on the same page.)
// Ha Bui
Hi Ha Bui,
Thank you on your response and time. I am rethinking the whole situation and looking into other options.
How to refresh items in content area on mouse click?
I have a scenario where I change the content area items on server side and when the editor click on the CA (ie. editor want to D&D items) I need to refresh the CA content tree.
Did someone tried something similar?