- this.editor.setCode(this.model.xml);
- $(this.model).bind('modelxmlchanged.xmlview', this.codeChanged.bind(this));
- this.model.getXML();
+ this.editor.setCode(this.model.getData());
+ this.unfreeze();
+ this.model
+ .addObserver(this, 'reloaded', function() {
+ this.editor.setCode(this.model.getData()); this.unfreeze(); }.bind(this))
+ .addObserver(this, 'needsReload', function() {
+ this.freeze('Niezsynchronizowany'); }.bind(this))
+ .addObserver(this, 'dataChanged', this.textDidChange.bind(this));
+