Skip to content

Instantly share code, notes, and snippets.

@jeffremer
Created February 10, 2011 23:06
Show Gist options
  • Save jeffremer/821562 to your computer and use it in GitHub Desktop.
Save jeffremer/821562 to your computer and use it in GitHub Desktop.
{
index: function(interaction) {
var form = new Wbx.views.form.FormPanel({
items: [
{
xtype: 'textfield',
name : 'first',
label: 'First name'
},
{
xtype: 'textfield',
name : 'last',
label: 'Last name'
},
{
xtype: 'numberfield',
name : 'age',
label: 'Age'
},
{
xtype: 'urlfield',
name : 'url',
label: 'Website'
}
]
}),
button = new Wbx.views.Button({
text:'Test',
handler: function() {
var data = form.getValues();
Wbx.views.Msg.alert('Info', ['First:', data.first, 'Last:', data.last, 'Age:', data.age, 'URL:', data.url].join(' '), Wbx.emptyFn);
}
}),
panel = new Wbx.views.AbstractView({
items: [form],
dockedItems: [
{
xtype: 'toolbar',
items: [button]
}
]
})
this.renderIndex(panel, interaction);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment