Yes, It is possible. I did it the following way:In the constructor or init function you may write
var thisObject = this;
dojo.connect(operationalFLayer, "onMouseOver", function(evt) {
thisObject.closeDialog();
thisObject.showTooltip(evt);
});
dojo.connect(this._operationalFLayer, "onMouseOut", this.closeDialog);
And define required methods:
showTooltip(evt) {
var dialog = new dijit.TooltipDialog({
id: "tooltipDialog",
content: evt.graphic.attributes.Text, //+ "<br />" + addr,
style: "position: absolute; width: 200px; font: normal normal bold 6pt Tahoma;z-index:100"
});
dialog.startup();
dojo.style(dialog.domNode, "opacity", 0.85);
dijit.placeOnScreen(dialog.domNode, {x: evt.pageX, y: evt.pageY}, ["TL", "BL"], {x: 10, y: 10});
}
closeDialog() {
var widget = dijit.byId("tooltipDialog");
if (widget) {
widget.destroy();
}
}
For editing you shall use esri.dijit.editing.Editor. You might find the sample code for editor in the esri documentation. It is too cumbersome to write it there.