EasyJWeb-1.1版发布
Posted 大峡
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了EasyJWeb-1.1版发布相关的知识,希望对你有一定的参考价值。
我们非常高兴的宣布,EasyJWeb-1.1今日正式对外发布,这个版本主要对EasyJWeb的Ajax支持作较大的改进。主要包括下面的内容:
1、在EasyJWeb Tools中增加了一套Rich Component组件,可以与其它客户端Ajax框架比如ExtJS等集成开发RIA应用。
2、修改了远程脚本调用引擎,使得性能比上一版本前提升了近2倍,详见http://www.easyjf.com/blog/html/20080103/1015816.html;
3、多国语言功能增加了对 xml格式属性文件的支持,http://jira.easyjf.com/browse/EASYJWEB-33。
4、增加从服务器输入JSon数据对象的快捷支持。
5、提供了更多的EastJWeb实例应用,详见http://easyjweb.demo.easyjf.com/。
6、修正了这两个月来大家提出的Bug及调整了一些功能,详细见jira.easyjf.com。
7、完善了入门文档,详见wiki.easyjf.com。
源码下载:ftp://ftp1.easyjf.com/easyjweb/easyjweb-1.1/easyjweb-1.1.zip
在线示例:http://easyjweb.demo.easyjf.com
在线文档:http://wiki.easyjf.com/display/wiki/EasyJWeb
这里对Rich Component及Ajax改进作简单介绍。
一、EasyJWeb Rich Component
EasyJWeb 1.1版提供了一套富客户端组件,也就是Rich Componet,可以用来与ExtJS等配合快速开发出基于Ajax的RIA应用。不再需要写烦琐的javascript,直接用java就能写出漂亮的基于ExtJS等客户端框架的Ajax应用,详见示例http://wlr2.easyjf.com/。
比如只需要下面的Action代码:
![](https://image.cha138.com/20210515/259efbf0420449c2826cc78849608620.jpg)
![](https://image.cha138.com/20210515/21111262ac544f22a8de94fafbfd4bb0.jpg)
![](https://image.cha138.com/20210515/308e4d74993d4883a9933180faddc19b.jpg)
![](https://image.cha138.com/20210515/66d186efb04f413fa3199584a412acbf.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/308e4d74993d4883a9933180faddc19b.jpg)
![](https://image.cha138.com/20210515/66d186efb04f413fa3199584a412acbf.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/835a0dee7f234588b10cae8905dbe63a.jpg)
![](https://image.cha138.com/20210515/2f7fa18cbfcf4f69913fe679db163f66.jpg)
访问simple.ejf?cmd=grid将会得到一个非常漂亮的表格:
![](https://image.cha138.com/20210515/259efbf0420449c2826cc78849608620.jpg)
![](https://image.cha138.com/20210515/21111262ac544f22a8de94fafbfd4bb0.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/2f7fa18cbfcf4f69913fe679db163f66.jpg)
访问simple.ejf?cmd=tree将会得到一个还不错的树:
如何实现一个添删改查、分页呢?看下面的代码:
![](https://image.cha138.com/20210515/259efbf0420449c2826cc78849608620.jpg)
![](https://image.cha138.com/20210515/21111262ac544f22a8de94fafbfd4bb0.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/2f7fa18cbfcf4f69913fe679db163f66.jpg)
![](https://image.cha138.com/20210515/259efbf0420449c2826cc78849608620.jpg)
![](https://image.cha138.com/20210515/21111262ac544f22a8de94fafbfd4bb0.jpg)
![](https://image.cha138.com/20210515/308e4d74993d4883a9933180faddc19b.jpg)
![](https://image.cha138.com/20210515/66d186efb04f413fa3199584a412acbf.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/308e4d74993d4883a9933180faddc19b.jpg)
![](https://image.cha138.com/20210515/66d186efb04f413fa3199584a412acbf.jpg)
![](https://image.cha138.com/20210515/308e4d74993d4883a9933180faddc19b.jpg)
![](https://image.cha138.com/20210515/66d186efb04f413fa3199584a412acbf.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/835a0dee7f234588b10cae8905dbe63a.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/308e4d74993d4883a9933180faddc19b.jpg)
![](https://image.cha138.com/20210515/66d186efb04f413fa3199584a412acbf.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/835a0dee7f234588b10cae8905dbe63a.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/308e4d74993d4883a9933180faddc19b.jpg)
![](https://image.cha138.com/20210515/66d186efb04f413fa3199584a412acbf.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/835a0dee7f234588b10cae8905dbe63a.jpg)
![](https://image.cha138.com/20210515/2f7fa18cbfcf4f69913fe679db163f66.jpg)
访问simple.ejf?cmd=crud将会得到一个添删改查及分页的界面,点击“添加”、“修改”、“删除”、“刷新”等按钮可以执行相应的操作,如下图所示:
二、其它Ajax支持的改进及完善
1、在以前EasyJWeb的Ajax支持引擎基础上,对远程脚本调用引擎中的脚本engine.js作了调整,使得回调函数可以选择作用域scope。
服务器业务组件:
![](https://image.cha138.com/20210515/259efbf0420449c2826cc78849608620.jpg)
![](https://image.cha138.com/20210515/21111262ac544f22a8de94fafbfd4bb0.jpg)
![](https://image.cha138.com/20210515/308e4d74993d4883a9933180faddc19b.jpg)
![](https://image.cha138.com/20210515/66d186efb04f413fa3199584a412acbf.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/835a0dee7f234588b10cae8905dbe63a.jpg)
![](https://image.cha138.com/20210515/308e4d74993d4883a9933180faddc19b.jpg)
![](https://image.cha138.com/20210515/66d186efb04f413fa3199584a412acbf.jpg)
![](https://image.cha138.com/20210515/4878f62c21c640f5841c169a755b0669.jpg)
![](https://image.cha138.com/20210515/835a0dee7f234588b10cae8905dbe63a.jpg)
![](https://image.cha138.com/20210515/2f7fa18cbfcf4f69913fe679db163f66.jpg)
Bean配置文件:
<bean name="PersonService" class="easyjweb.demo.service.impl.PersonServiceImpl" />
在javascript中调用:
客户端读取服务器端时间的代码:
![](https://image.cha138.com/20210515/6195a6d0f6f84be29ba316d951a61abd.jpg)
![](https://image.cha138.com/20210515/6195a6d0f6f84be29ba316d951a61abd.jpg)
![](https://image.cha138.com/20210515/6195a6d0f6f84be29ba316d951a61abd.jpg)
2、增加向客户端输出JSon对象数据的快速方法。
上面的代码实现把服务器端的pageList对象转换成JSON数据对象,并给客户端返回这个JSon数据对象。
客户端可以这样使用:
![](https://image.cha138.com/20210515/6195a6d0f6f84be29ba316d951a61abd.jpg)
![](https://image.cha138.com/20210515/6195a6d0f6f84be29ba316d951a61abd.jpg)
![](https://image.cha138.com/20210515/6195a6d0f6f84be29ba316d951a61abd.jpg)
3、另外还对表单ajax提交等作了其它一些调整,详细请参考最新的api文档。
![](https://image.cha138.com/20210515/6195a6d0f6f84be29ba316d951a61abd.jpg)
![](https://image.cha138.com/20210515/6195a6d0f6f84be29ba316d951a61abd.jpg)
![](https://image.cha138.com/20210515/6195a6d0f6f84be29ba316d951a61abd.jpg)
以上是关于EasyJWeb-1.1版发布的主要内容,如果未能解决你的问题,请参考以下文章
为啥我的 C 代码片段不起作用?简化版可以。为 unsigned long long 传递不带 VA_ARGS 的 args
SnippetsLab for Mac 1.9 中文共享版 – 强大的代码收藏管理工具
关于mysql驱动版本报错解决,Cause: com.mysql.jdbc.exceptions.jdbc4Unknown system variable ‘query_cache_size(代码片段
《安富莱嵌入式周报》第279期:强劲的代码片段搜索工具,卡内基梅隆大学安全可靠C编码标准,Nordic发布双频WiFi6 nRF7002芯片