Created
July 29, 2009 00:53
-
-
Save etgryphon/157788 to your computer and use it in GitHub Desktop.
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
myApp.MasterView = SC.View.extend( | |
/** @scope myApp.MasterView.prototype */ { | |
classNames: ['master-view'], | |
// necessary config elements to set up binding on the ListViews | |
contentPath: '', | |
selectionPath: '', | |
/** | |
Current Layouts for all movable | |
*/ | |
createChildViews: function() { | |
var childViews = [], view, currPosHeight; | |
//Add the search text field | |
view = this.createChildView( | |
SC.TextFieldView.design({ | |
layout: {/* layout here */}, | |
valueBinding: this.get('searchPath') | |
}), | |
{ rootElementPath: [0] } | |
); | |
childViews.push(view); | |
view = this.createChildView( | |
SC.ListView.design({ | |
layout: { /* layout here */ }, | |
contentValueKey: 'name', | |
contentBinding: this.get('contentPath'), | |
selectionBinding: this.get('selectionPath'), | |
}), | |
{ rootElementPath: [1] } | |
); | |
childViews.push(view); | |
this.set('childViews', childViews); | |
}, | |
/* Do special Stuff */ | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment