Created
March 1, 2011 13:40
-
-
Save brianjmiller/849130 to your computer and use it in GitHub Desktop.
YUI: Post initialization of an extension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
YUI.add( | |
"ep-data-user", | |
function (Y) { | |
var DataUser = Y.namespace("EP").DataUser = function (config) { | |
//Y.log("DataUser constructor"); | |
this.after("initializedChange", this.post_initialization, this); | |
}; | |
// | |
// these values should be overridden with defaults in the class | |
// using this extension | |
// | |
DataUser.ATTRS = { | |
data_user_parameters: { | |
value: null | |
} | |
}; | |
DataUser.prototype = { | |
_data_user_data_mgr: null, | |
post_initialization: function () { | |
Y.log("DataUser::post_initialization"); | |
Y.log("DataUser::post_initialization - this: " + this); | |
Y.log("DataUser::post_initialization - data_user_parameters: " + Y.dump(this.get("data_user_parameters"))); | |
if (Y.Lang.isValue(this.get("data_user_parameters"))) { | |
// do stuff here... | |
} | |
} | |
}; | |
}, | |
"0.0.1", | |
{ | |
requires: [] | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment