傻眼了吧!Ext.Grid without Ext.Grid
E3平台QQ Group:63787587 E3系列组件在线演示地址:http://www.javae3.com/Index.jsp 更多E3系列技术文章请访问偶滴Blog,欢迎浇花水。哈哈! http://user.qzone.qq.com/307916217/blog/1216576687 1.写在最前面 介绍:E3.Table对Ext.Grid做了完美的封装,让程序员不必去关心EXT那一堆封锁的JS也不必去关心表格的数据源,你所需要做的仅仅是使用E3Table的JSPTag画出界面,并把List数据压入request或者session就可以.最大限度的保持了传统编码的模式。 下面是刚用E3.Ext.Table完成的几个功能,发出来给大家看看,希望能有更多的朋友能够了解E3,让E3系列组件丰富和简化您的JavaEE应用的开发。此文仅仅是展示,详细的使用方法系列教程将后续推出!
2.展示一
2.1. 先看一眼界面

2.2.在看看它的jsp代码
<e3t:table id="aa10Table" pageSize="10" toolbarPosition="bottom" caption="代码表" height="318" items="aa10List" varStatus="aa10Status" var="aa10" uri="demoAction.do?reqCode=queryAa10" >
<e3t:param name="dto(aaa100)" value="<%=request.getParameter("dto(aaa100)") %>" />
<e3t:column property="select" width="40" title="<input type='checkbox' class='EXTSELECT' name='checkAllFlag' onclick='checkedAll()' value='all'>" sortable="false">
<input type="checkbox" name="checkedId" class="EXTSELECT" align="middle" value="<c:out value="${aa10.aaa102}"/>" />
</e3t:column>
<e3t:column property="aaa100" title="代码类别" sortable="true" />
<e3t:column property="aaa101" title="类别名称" sortable="true" />
<e3t:column property="aaa102" title="代码值" sortable="true" />
<e3t:column property="aaa103" title="代码名称" sortable="true" width="120"/>
<e3t:column property="yab003" title="经办机构" sortable="true" />
<e3t:column property="aae120" title="经办人" sortable="true" >
<eRed:codeDesc4YH field="YAE092"><c:out value="${aa10.aae120}"/></eRed:codeDesc4YH>
</e3t:column>
<e3t:column property="edit" title="修改" sortable="false" width="20">
<img border="0" style="cursor:hand;" onclick="click1('<c:out value="${aa10.aaa102}"/>');" alt="修改" src="<layout:resource name="edit.gif" type="img"/>"/>
</e3t:column>
</e3t:table>
request.setAttribute("aa10List", aa10List);
3.展示二
3.1.先看一眼界面

3.2.再看代码
<layout:cell>
<eRed:groupBox title="记账时间列表" visibleVar="bg09ListByTime">
<e3t:table id="prepayTable" pageSize="5" height="160" items="bg09ListByTime" toolbarPosition="bottom" varStatus="by09GroupStatus" var="by09Group" uri="prepayAction.do?reqCode=nextPage" >
<e3t:column property="no" title="序号" sortable="false" width="40">
<c:out value="${by09GroupStatus.count}" />
</e3t:column>
<e3t:column property="jzsj" title="记账时间" width="180" />
<e3t:column property="xms" title="收费项目数" width="150" />
<e3t:column property="fyze" title="费用总额" width="150" >
<eRed:colorRender color="red"><c:out value="${by09Group.fyze}"/></eRed:colorRender>
</e3t:column>
<e3t:column property="jbr" title="经办人">
<eRed:codeDesc4YH field="YAE092"><c:out value="${by09Group.jbr}"/></eRed:codeDesc4YH>
</e3t:column>
</e3t:table>
</eRed:groupBox>
<eRed:groupBox title="记账明细列表" visibleVar="bg09ListByDetail">
<e3t:table id="detailTable" pageSize="5" height="160" items="bg09ListByDetail" toolbarPosition="bottom" varStatus="by09Status" var="by09" uri="prepayAction.do?reqCode=nextPage" >
<e3t:column property="select" width="40" title="<input type='checkbox' class='EXTSELECT' name='checkAllFlag' onclick='checkedAll()' value='all'>" sortable="false">
<input type="checkbox" name="checkedId" class="EXTSELECT" align="middle" value="<c:out value="${aa10.aaa102}"/>" />
</e3t:column>
<e3t:column property="no" title="序号" width="40" sortable="false">
<c:out value="${by09Status.count}" />
</e3t:column>
<e3t:column property="sfxmmc" title="收费项目" width="150" />
<e3t:column property="sl" title="数量" width="60" />
<e3t:column property="sjjg" title="单价" width="60" >
<eRed:colorRender color="red"><c:out value="${by09.sjjg}"/></eRed:colorRender>
</e3t:column>
<e3t:column property="zfbl" title="自付比例" width="70">
<eRed:colorRender color="blue"><c:out value="${by09.zfbl}"/></eRed:colorRender>
</e3t:column>
<e3t:column property="tjdm" title="项目类别" width="120" >
<eRed:codeDesc4YH field="TJDM"><c:out value="${by09.tjdm}"/></eRed:codeDesc4YH>
</e3t:column>
<e3t:column property="jbsj" title="记账时间" width="150" />
<e3t:column property="jbr" title="经办人" >
<eRed:codeDesc4YH field="YAE092"><c:out value="${by09.jbr}"/></eRed:codeDesc4YH>
</e3t:column>
</e3t:table>
</eRed:groupBox>
</layout:cell>
e3下载http://www.javae3.com 演示系统http://www.javae3.com:8001/e3/Index.jsp
要是有一个对其完美支持的 IDE 就更加完美了。。。。
exttag 今天用了下 基本的UI是没有问题 不过还是不能完全的脱离JS
我昏厥 不知楼上在嘀咕什么~ 没看见不好的议论嘛 大家都是在各抒己见而已 什么黄马甲 :(
看来大家都是高手呀,能不能给小弟一些指点,或者介绍一些学习的资料呀?万分感谢了!!! :)
呵呵,仔细一看,原来lz还有个马甲.
尝试的精神可嘉.但是这样的东西,还远没有你自己想象的那么好.学习和进步是没有歇止的,除非你自己选择了自我满足. 标题招惹来一些不好的议论,不该.
btw: js,的确是可以写的非常的优雅,我个人的水平还没到那个地步,但是看prototype和Ext,也会这样的感觉.
中看不中用 不要太依恋js控件了 特别像表格这样的 很可能需要展示大数据量的 不停的翻页加载卸载 你的bs受得了吗?
看来大家的思想都非常前卫。。。 不过只想说一句:偶选择,偶喜欢!报喜鸟西服。
同意,有一句话是这样说的“世界上没有B/S系统,只有B系统和S系统”
客户端就做客户端的事情,服务器就做服务器的事情
jspTag 就像你去一个餐厅,厨师每上一道菜都要告诉你怎么样去吃,而楼主这个老板还要求他的厨师对不同的性别年龄的人要有不同吃法介绍。。。
完全用ext开发过界面,简直是痛苦
新技术的追捧要慎重
without XXX 现在都流行这个? 哪天Web App without Browser?
说实话,个人觉得AJAX很恶心。一个loading转啊转。恶心得一塌糊涂。 我更喜欢看浏览器的进度条一点。。。
楼主的东西其实挺不错。
我只是希望有一天。。。 Web without all of Framework.
e3,提供或一些回调用函数,通过这些函数可以获取store的定义
form显示这种功能,现在没提供,不过stroe的引用是有的,也就是要读取store里的数据是可以的.
那我如何操作这个store呢??
例如: 点击列表的某一行 把这行对应的数据自动添加到一个form里
然后我在form里修改了 这个值 同时希望table里这一行的记录也更新.
使用ext时 这类操作是常见的
会生成store,客户端肯定有个store,我是说store初始值是从list生成出来的.
把store放在服务器端可不是什么好的设计啊,一个表格数据需要修改,每次修改都要与服务器交互的化可能不是什么好的实践,最好保存在store里
这个东西真的丑,用js的做一下封装的话,一句代码就可以获取表格了
有人说jsp tag丑陋,你说丑在那? js帅吗? e3做了很大的简化,不在需要你关心什么ajax,什么json,按传统的设计,开发思路就可以整出ajax效果的grid,为什么不用? e3现在支持jsp tag,后续版本还会支持jelly tag,到时用其它视图(非jsp)的兄弟,如velocity,freemarker等都可以使用.
这个tag是提供给用jsp人用的,不是给做.net,php 人用的,每个东西都会有他的定位
我觉得这是一种倒退,在Ext基础上用js来画界面 是很爽的一件事情,非得整回到丑陋的jsp tag,有什么好处呢?就像 aisdf 所说,“本来EXT就是为了实现客户端和服务器端分离,结果被你一改又变回去了”~~