Ignore:
Timestamp:
12/04/12 17:36:50 (12 years ago)
Author:
hendrikvanantwerpen
Message:

Don't create new documents before editing them, because
our validation will reject them.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/branches/rest-dojo-ui/client/rft/pages/session.js

    r410 r416  
    2222            this.inherited(arguments);
    2323            if ( this.sessionId ) {
     24                this._loadSession();
     25                this._setupAutoComplete();
     26            } else {
     27                throw "No valid uid or session passed!";
     28            }
     29        },
     30        _loadSession: function() {
     31            if ( this.sessionId === "new" ) {
     32                this.session = {
     33                    type: 'SessionTemplate'
     34                };
     35            } else {
    2436                Deferred.when(store.get(this.sessionId))
    2537                .then(lang.hitch(this,function(obj){
     
    2840                    this._refresh();
    2941                }));
    30                 this._setupAutoComplete();
    31             } else {
    32                 throw "No valid uid or session passed!";
    3342            }
    3443        },
Note: See TracChangeset for help on using the changeset viewer.