Ignore:
Timestamp:
03/10/14 16:07:00 (11 years ago)
Author:
hendrikvanantwerpen
Message:
  • Indicate of refresh is due to load or due to save in _ObjectPage.
  • _ComplexValueMixin & ListWidget? catch all change events and drops them if still being created.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk/src/client/qed-client/pages/_ObjectPage.js

    r492 r500  
    2222        _load: function() {
    2323            if ( this.object ) {
    24                 this._refresh();
     24                this._refresh(true);
    2525            } else if ( this.objectId ) {
    2626                if ( this.objectId === "new" ) {
    2727                    this.object = this.classStore.create();
    28                     this._refresh();
     28                    this.markDirty();
     29                    this._refresh(true);
    2930                } else {
    3031                    this.classStore.load(this.objectId)
    31                     .then(lang.hitch(this,'_setObject'),
    32                           lang.hitch(this,function(err){
    33                                 this.die(err.error);
    34                             }));
     32                    .then(lang.hitch(this,function(object){
     33                        this._setObject(object,true);
     34                    }),lang.hitch(this,function(err){
     35                        this.die(err.error);
     36                    }));
    3537                }
    3638            } else {
    37                 this.die("No valid uid or object passed!");
     39                this.die("No valid id or object passed!");
    3840            }
    3941        },
    40         _setObject: function(object) {
     42        _setObject: function(object,initial) {
    4143            this.object = object;
    4244            if ( this.objectId === "new" ) {
    4345                this.go(this.classStore.getObjectPath(this.object),{},true);
    4446            }
    45             this._refresh();
     47            this.markClean();
     48            this._refresh(initial);
    4649        },
    47         _refresh: function() {},
     50        _refresh: function(initial) {},
    4851        _save: function() {
    4952            return this.classStore.save(this.object)
    5053            .then(lang.hitch(this,function(object){
    51                 this.markClean();
    5254                this._setObject(object);
    5355                this.notify(this.classStore.getName()+" successfully saved.");
Note: See TracChangeset for help on using the changeset viewer.