张氏兄弟
风雪踏中州
首页
新随笔
联系
聚合
管理
随笔-57 评论-101 文章-1 trackbacks-0
dwr + ecside
目前是草稿:
model:
public
class
Notice
{
/** */
/**
* primary key of the notice
*/
Integer id
=
new
Integer(
0
);
/** */
/**
* name of the notice
*/
String name;
/** */
/**
* the content of notice
*/
String content;
/** */
/**
* 加入时间
*/
java.sql.Date addDate;
<
create creator
=
"
new
"
javascript
=
"
NoticeManager
"
>
<
param name
=
"
class
"
value
=
"
com.****.manager.NoticeDao
"
/>
<
include method
=
"
ajaxSaveOrUpdate
"
/>
<
include method
=
"
getForAjax
"
/>
<
include method
=
"
deleteForAjax
"
/>
<
include method
=
"
getSixNotice
"
/>
<
include method
=
"
getLastNotice
"
/>
</
create
>
<
convert converter
=
"
bean
"
match
=
"
*****.model.Notice
"
>
<
param name
=
"
include
"
value
=
"
id,name,content
"
/>
</
convert
>
</
allow
>
<
signatures
>
<!
[CDATA[
import
java.util.Map;
import
java.util.List;
import
javax.servlet.http.HttpServletRequest;
NoticeManager.ajaxSaveOrUpdate(Map map);
dao:
public
String ajaxSaveOrUpdate(java.util.Map requstMap)
{
String backString
=
"
1
"
;
Notice notice
=
new
Notice();
Object id
=
requstMap.get(
"
id
"
);
if
(
null
==
id
||
StringUtils.isBlank(id.toString()))
{
notice.setId(
new
Integer(
0
));
}
else
{
notice.setId(NumberUtils.createInteger(id.toString()));
}
notice.setName(requstMap.get(
"
name
"
).toString());
notice.setContent(requstMap.get(
"
content
"
).toString());
saveOrUpdate(notice);
return
backString;
}
界面:
function addDeviceList()
{
var win
=
window.frames.Editor.frames.HtmlEditor;
var obj
=
win.document.body;
var data;
data
=
{
id:document.noticeForm.all[
"
id
"
].value,
name:document.noticeForm.all[
"
name
"
].value,
content:obj.innerHTML
}
;
NoticeManager.ajaxSaveOrUpdate(data,refreshDataGride);
}
function refreshDataGride()
{
alert(
"
操作成功
"
);
ECSideUtil.reload(
"
ec
"
);
}
<
table width
=
"
100%
"
height
=
"
30
"
border
=
"
0
"
cellpadding
=
"
0
"
cellspacing
=
"
0
"
>
<
tr
>
<
td
>
<
ec:table items
=
"
notices
"
title
=
"
公告列表
"
tableId
=
"
ec
"
var
=
"
notice
"
action
=
"
notice.notice?method=list
"
cellspacing
=
"
0
"
width
=
"
100%
"
showPrint
=
"
false
"
resizeColWidth
=
"
true
"
maxRowsExported
=
"
10000000
"
sortable
=
"
true
"
useAjax
=
"
false
"
retrieveRowsCallback
=
"
limit
"
listWidth
=
"
100%
"
>
<
ec:row ondblclick
=
"
getById(${notice.id})
"
>
<
ec:column width
=
"
23
"
cell
=
"
checkbox
"
headerCell
=
"
checkbox
"
alias
=
"
deleteFlag
"
value
=
"
${notice.id}
"
viewsAllowed
=
"
html
"
/>
<
ec:column property
=
"
name
"
width
=
"
550
"
title
=
"
名称
"
/>
<
ec:column width
=
"
80
"
property
=
"
addDate
"
cell
=
"
date
"
title
=
"
发布时间
"
/>
</
ec:row
>
<
ec:extend location
=
"
bottom
"
>
<
div style
=
"
text-align:center;width:100%;padding:3px
"
>
<
button type
=
"
button
"
onclick
=
"
deleteUserInfo();
"
style
=
"
width:120px
"
>
<
font color
=
"
red
"
>
删除
</
font
>
列表数据
</
button
>
</
div
>
</
ec:extend
>
</
ec:table
>
</
td
>
</
tr
>
</
table
>
<
form name
=
"
noticeForm
"
>
<
input type
=
"
hidden
"
name
=
"
id
"
/>
<
table border
=
"
0
"
cellpadding
=
"
0
"
cellspacing
=
"
0
"
class
=
"
simpleFormTable
"
width
=
"
100%
"
>
<
tr
>
<
td id
=
"
lablearea
"
class
=
"
tableTitle3
"
style
=
"
cursor:pointer;
"
onclick
=
"
showHide('addUserZone',this)
"
>
+
<
input type
=
"
button
"
class
=
"
formButton
"
value
=
"
添加公告
"
>
</
td
>
</
tr
>
<
tr id
=
"
addUserZone
"
style
=
"
display:none;
"
>
<
td
>
<
table id
=
"
table_notice
"
width
=
"
100%
"
cellpadding
=
"
0
"
cellspacing
=
"
0
"
>
<
tr
>
<
Th width
=
"
25%
"
id
=
"
notice_th
"
>
名称
</
th
>
<
th width
=
"
75%
"
id
=
"
notice_th
"
>
<
input type
=
"
text
"
name
=
"
name
"
></
input
>
</
th
>
</
tr
>
<
tr
>
<
Th id
=
"
notice_th
"
colspan
=
"
2
"
>
内容
</
th
>
</
tr
>
<
tr
>
<
th colspan
=
"
2
"
height
=
"
50
"
id
=
"
notice_th
"
>
<
textarea name
=
"
content
"
style
=
"
display:none
"
></
textarea
>
<
iframe ID
=
"
Editor
"
name
=
"
Editor
"
src
=
"
/common/HtmlEditor/index.html?ID=content
"
frameBorder
=
"
0
"
marginHeight
=
"
0
"
marginWidth
=
"
0
"
scrolling
=
"
No
"
style
=
"
height:320px;width:100%
"
></
iframe
>
</
th
>
</
tr
>
<
tr
>
<
td colspan
=
"
2
"
>
<
input type
=
"
button
"
class
=
"
formButton
"
value
=
"
确认
"
onclick
=
"
addDeviceList()
"
>
&
#
160
;
&
#
160
;
&
#
160
;
&
#
160
;
<
input
class
=
"
formButton
"
type
=
"
reset
"
>
</
td
>
</
tr
>
</
table
>
</
td
>
</
tr
>
</
table
>
</
form
>
posted on 2007-05-30 15:19
张氏兄弟
阅读(452)
评论(0)
编辑
收藏
新闻频道
新用户注册
刷新评论列表
标题
姓名
主页
验证码
*
内容(请不要发表任何与政治相关的内容)
Remember Me?
登录
使用高级评论
新用户注册
返回页首
恢复上次提交
[使用Ctrl+Enter键可以直接提交]
该文被作者在 2007-12-31 08:14 编辑过
成果网帮您增加网站收入
相关链接:
网站导航:
博客园
BlogJava
博客生活
IT博客网
C++博客
PHP博客
博客园社区
管理博客
教师博客
天文博客
汽车博客
足球博客
股票博客
电子博客
管理
常用链接
我的随笔
我的评论
我的参与
最新评论
留言簿
(4)
给我留言
查看公开留言
查看私人留言
随笔分类
(47)
51ditu.com(8)
flex(8)
js(3)
oracle(1)
手机地图(8)
早上九点的想法(9)
聊天记录知识整理(10)
随笔档案
(53)
2008年9月 (3)
2008年8月 (1)
2008年7月 (1)
2008年6月 (10)
2008年4月 (1)
2008年3月 (1)
2008年2月 (4)
2008年1月 (2)
2007年12月 (5)
2007年11月 (4)
2007年8月 (1)
2007年7月 (1)
2007年6月 (1)
2007年5月 (8)
2007年4月 (2)
2007年3月 (4)
2006年10月 (1)
2006年9月 (3)
文章分类
oracle
文章档案
(1)
2006年9月 (1)
收集的网站
Java技巧-javaalmanac
快速查到某种Java技巧的用法及示例代码
有朋自远方来
bad boy
宋针还
扬州梦
阿定
搜索
积分与排名
积分 - 31868
排名 - 271
最新随笔
1. 手机地图-httpclient+htmlparser+jdom展示yahoo天气预报
2. 手机地图-使用j2mepolish的gauge实现进度条
3. 51地图手机版之 社区测试版
4. 探讨:通过j2me获取手机imei号码和cellid(基站号)
5. eclipse codeformat 与 j2mepolish的特别声明冲突
6. 拿到了hisense t68
7. 关于基站定位
8. google发布flex map api
9. 饭很难吃是造成我跳槽的诱因
10. 开发一套基于j2me的地图api
最新评论
1. re: 公布一份手机地图
目前第二版手机地图已经制作完成,本人博客提供了一个预览版
--张氏兄弟
2. re: 转 ajax乱码
@鲍鲍
看来我们遇到同样问题的几率满大的
--张氏兄弟
3. re: google发布flex map api
一个实际应用的例子:游鱼www.yoyv.com个人足迹图就是用google maps api for flash做的。
--rocky
4. re: 转 ajax乱码
怎么又搜索到你的贴子了。呵呵。
--鲍鲍
5. re: 开发一套基于j2me的地图api[未登录]
这两个东江都有接触。。。地图显示在导航应运中只是其中的一部分,用C/C++, JAVA实现都不难,导航最重要的是数据。 想交流的请加14302335
--呵呵
阅读排行榜
1. 第一次应用blazeDS实录(2073)
2. google发布flex map api(1911)
3. ecside初级使用文档(1702)
4. 探讨:通过j2me获取手机imei号码和cellid(基站号)(1594)
5. j2me提升性能_读书笔记(1537)
评论排行榜
1. 在qq空间中放入uu地图(15)
2. 第一次应用blazeDS实录(13)
3. 久其印象(12)
4. 公布一份手机地图(6)
5. 拿到了hisense t68(6)