刚刚接触ext ,才发现ext的强大,其效果竟然是这么好!
ext可以应用于.NET平台或者eclipse平台中,下面就如何在myeclipse平台中配置EXT环境做阐述。
1、首先下载ext3.3.0(目前最新版)
2、myeclipse 中配置Spket(该方式为在线更新方式) 。
步骤:myeclipse-window-help-software updates-find and install
search for new features to install -next;
弹出窗口后 点 击 new remote site;取名:Spket ;url= http://www.spket.com/update/;
一路next即可。
3、
添加完成后,window-preference-Spket -javascript profiles: 点击new ,名称 extjs;然后选extjs add library,选择EXTJS ,OK; 选中EXTJS, ADD FILES 找到第一步中下载的ext3.3.0 -ext.jsb2; OK.
同时还可以选择将EXTjs设置为default,这样以后编辑JS的时候就会有相应的自动提示功能了。
4、验证ext是否配置成功。
(1)myeclipse 中new web project ;name: exttest
(2)在webroot 中new folder -name ->example ;在example文件中new 一个 helloworld.html文件。
(3)将下载的ext 3.3.0复制到 webroot中;
(4)修改helloworld.html内容如下所示: 在head中添加如下代码:
<link rel="stylesheet" type="text/css" href="../ext-3.3.0/resources/css/ext-all.css" />
<script type="text/javascript" src="../ext-3.3.0/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../ext-3.3.0/ext-all.js"></script>
<script type="text/javascript">
Ext.onReady(function(){Ext.MessageBox.alert('message','helloworld!Test SUCCESS')});
</script>
(5)tomcat 部署项目,启动;
浏览器中输入:http://localhost:8080/exttest/example/helloworld.html
如果弹出一个比较绚丽的message提示框 helloworld!Test SUCCESS,那就说明已经配置成功了。