Created
June 7, 2012 23:44
-
-
Save juandopazo/2892445 to your computer and use it in GitHub Desktop.
An idea about how Y.Dialog could be made
This file contains hidden or 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
| Y.Dialog = Y.Base.create('dialog', Y.Widget, [/* same extensions as Panel */, Y.WidgetForm], { | |
| initializer: function (config) { | |
| // deal with inyecting a View inside the body of WidgetStdMod | |
| // config.data could have the initial data for the form | |
| } | |
| }); | |
| var dialog = new Y.Dialog({ | |
| template: someTemplate, | |
| data: someData | |
| }).render(); | |
| // dialog.form is an instance of Model | |
| // (I'm still not very familiar with the app framework, so this is a rough idea) | |
| dialog.form.get('foo'); // returns the value of the 'foo' input | |
| dialog.form.toJSON(); // models get this one for free |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment