Webapp; isDirty checking

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
Konstantin
Posts: 61

Webapp; isDirty checking

Mon Aug 29, 2016 7:12 pm

Hi !!!
I use this function to check isDirty status.

Code: Select all

goog.events.listen(editor, sync.api.Editor.EventTypes.DIRTY_STATUS_CHANGED, function(e) {
    sendIsDirtyToApplication(e.isDirty);
}


This event change to TRUE in many situation:
1) Change text
2) Set ReadOnly mode thru:

Code: Select all

editor.getActionsManager().invokeOperation(
                'SetReadOnlyStatusOperation',
                {'read-only': data.value}
      );

3) Use my own action, even empty:

Code: Select all

SaveAction.prototype.actionPerformed = function(callback) {
   new sync.ops.ServerOperation("webapp.extention.action.SaveAction", editor.controller).doOperation(callback, {
       editorUID: window.editorUID
   }, null);

Code: Select all

public class SaveAction implements AuthorOperation {

   @Override
   public void doOperation(AuthorAccess authorAccess, ArgumentsMap argumentsMap) throws IllegalArgumentException, AuthorOperationException {
   }
   
   @Override
   public String getDescription() {
      return null;
   }

   @Override
   public ArgumentDescriptor[] getArguments() {
      return null;
   }
   
}


Code: Select all

goog.events.listen(editor, sync.api.Editor.EventTypes.DIRTY_STATUS_CHANGED, function(e) {
      sendSetDirty(e.isDirty);      
   });


But I need take only text changing. How can I separate them?
cristi_talau
Posts: 166

Re: Webapp; isDirty checking

Tue Aug 30, 2016 6:27 pm

Hello,

These problems are solved in 18.0.1. So, they will be also solved in the next SDK release.

If you are interested, we can give you access to the SNAPSHOT version of the SDK. Just send an email on our support email address.

Best,
Cristian

Return to “Common Problems”

Who is online

Users browsing this forum: No registered users and 4 guests