O'Reilly logo

Learning Ext JS 4 by Armando Gonzalez, Crysfel Villa

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Templates

In the Ext JS 4 library, we have two types of templates – the Ext.Template and the Ext.XTemplate. Let's see what the main differences between these two classes are.

The Ext.Template represents an HTML fragment that will be rendered in the dataview. Let's see an example of this class:

<!DOCTYPE HTML> <html manifest="" lang="en-US"> <head> <meta charset="UTF-8"> <linkrel="stylesheet" href="http://cdn.sencha.io/ext-4.1.0-gpl/resources/css/ext-all.css" /> <title>Ext.Template</title> <style type="text/css"> #container{ padding:50px; } </style> </head> <body> <div id="container"></div> </body> </html> <script type="text/javascript" charset="utf-8" src="http://cdn.sencha.io/ext-4.1.0-gpl/ext-all-debug.js"></script> <script type="text/javascript"> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required