Thursday, April 18, 2013

Ext JS getting start Ext JS first tutorial First Program for EXT JS




Please visit Ext JS site for more information and licence policy on http://www.sencha.com/

Ext js tutorial:

1. Download Ext js: http://www.sencha.com/products/extjs3/download/ and download ext-3.4.1.1-gpl.zip
2. Unzip it some where
3. Create one dynamic J2ee Project in Exlipse say demoExt and add one server
4. Now inside demoExt Project, create one folder inside the WebContent (demoExt\WebContent\extjs)
5. From unzip of ext-3.4.1.1-gpl.zip copy adapter, resources folder and ext-all.js and paste inside demoExt\WebContent\extjs
6. Create one jsp (index.jsp) inside the WebContent

contect of index.jsp

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Binod Here</title>



<meta charset=utf-8 />
 
  <link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css" />
<script type="text/javascript" src="extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="extjs/ext-all.js"></script>

<script type="text/javascript" >
    Ext.BLANK_IMAGE_URL = 'extjs/resources/images/default/s.gif';
</script>


<script type="text/javascript">
Ext.onReady(function(){

Ext.Msg.alert("Binod","This is Ext alert message");

});
</script>


</head>
<body>
<h4> Hi Binod from EXT JS</h4>
<%= new java.util.Date() %>
</body>
</html>

Now deploy this demoExt project in any webserver (inside Eclipse better) and hit the browser with below URL

http://localhost:8080/demoExt/

Now you will see one Ext JS alert box with message "This is Ext alert message".

Happy Ext JS coding ................ :)

That it ............