Created
October 19, 2010 17:01
-
-
Save nelstrom/634571 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
var data = { | |
name: 'Tommy Maintz', | |
title: 'Lead Developer', | |
company: 'Ext JS, Inc', | |
email: 'tommy@extjs.com', | |
address: '5 Cups Drive', | |
city: 'Palo Alto', | |
state: 'CA', | |
zip: '44102', | |
drinks: ['Coffee', 'Soda', 'Water'], | |
kids: [ | |
{name: 'Adrian', age:13}, | |
{name: 'Grace', age:8}, | |
{name: 'Joshua', age:3}, | |
{name: 'Matthew', age:2}, | |
{name: 'Solomon', age:0} | |
] | |
}; |
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
var content, tpl; | |
tpl = new Ext.XTemplate( | |
'<p>Name: {name}</p>', | |
'<p>Kids: ', | |
'<tpl for="kids">', | |
'<tpl if="age > 1">', | |
'<p>{name}</p>', | |
'<p>Dad: {[parent.name]}</p>', | |
'</tpl>', | |
'</tpl></p>' | |
); | |
Ext.setup({ | |
onReady: function() { | |
content = new Ext.Panel({ | |
fullscreen: true, | |
tpl: tpl | |
}) | |
content.update(data); | |
} | |
}); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Sencha Touch</title> | |
<link rel="stylesheet" href="sencha/097/ext-touch-debug.css" type="text/css"> | |
<link rel="stylesheet" href="stylesheets/scratch.css" type="text/css" media="screen" title="no title" charset="utf-8"/> | |
<script type="text/javascript" src="sencha/097/ext-touch-debug.js"> </script> | |
<script src="javascripts/data.js" type="text/javascript" charset="utf-8"></script> | |
<script src="javascripts/example3.js" type="text/javascript" charset="utf-8"></script> | |
</head> | |
<body> | |
</body> | |
</html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment