- 浏览: 1124462 次
- 性别:
- 来自: 火星郊区
博客专栏
-
OSGi
浏览量:0
文章分类
- 全部博客 (695)
- 项目管理 (48)
- OSGi (122)
- java (79)
- Vaadin (5)
- RAP (47)
- mysql (40)
- Maven (22)
- SVN (8)
- 孔雀鱼 (10)
- hibernate (9)
- spring (10)
- css (3)
- 年审 (6)
- ant (1)
- jdbc (3)
- FusionCharts (2)
- struts (4)
- 决策分析 (2)
- 生活 (10)
- 架构设计 (5)
- 破解 (2)
- 狼文化 (4)
- JVM (14)
- J2EE (1)
- 应用服务器 (1)
- 我的链接 (5)
- 数学 (2)
- 报表 (1)
- 百科 (6)
- Flex (7)
- log4j (2)
- PHP (1)
- 系统 (2)
- Web前端 (7)
- linux (6)
- Office (1)
- 安全管理 (5)
- python (2)
- dom4j (1)
- 工作流 (3)
- 养生保健 (4)
- Eclipse (8)
- 监控开发 (1)
- 设计 (3)
- CAS (1)
- ZK (41)
- BluePrint (3)
- 工具 (1)
- SWT (7)
- google (2)
- NIO (1)
- 企业文化 (2)
- Windoes (0)
- RCP (7)
- JavaScript (10)
- UML (1)
- 产品经理 (2)
- Velocity (10)
- C (1)
- 单元测试 (1)
- 设计模式 (2)
- 系统分析师 (2)
- 架构 (4)
- 面试 (2)
- 代码走查 (1)
- MongoDB (1)
- 企业流程优化 (1)
- 模式 (1)
- EJB (1)
- Jetty (1)
- Git (13)
- IPV6 (1)
- JQuery (8)
- SSH (1)
- mybatis (10)
- SiteMesh (2)
- JSTL (1)
- veloctiy (1)
- Spring MVC (1)
- struts2 (3)
- Servlet (1)
- 权限管理 (1)
- Java Mina (1)
- java 系统信息 (6)
- OSGi 基础 (3)
- html (1)
- spring--security (6)
- HTML5 (1)
- java爬虫搜索 (1)
- mvc (3)
最新评论
-
Tom.X:
http://osgia.com/
将web容器置于OSGi框架下进行web应用的开发 -
chenyuguxing:
你好, 为什么我的bundle export到felix工程中 ...
在Apache Felix中运行bundle -
string2020:
<niceManifest>true</ni ...
Bundle Plugin for Maven -
jsonmong:
OSGI,是未来的主流,目前已相当成熟。应用OSGI比较好的, ...
基于OSGi的声明式服务 -
zyhui98:
貌似是翻译过来的,有很少人在linux上做开发吧
如何成为“10倍效率”开发者
#*
宏pageGrid:自定义表格宏
${gridInfo}: 表格中的信息,含数据和分页信息,样式等
20行<!--表格样式需在引用css-->
26行<!--表格标题头行-->
47行<!--表格内容奇数行与偶数行在鼠标移动到上面时变色-->
55行<!--表格首列是否显示checkbox-->
54行<!-- 定义表格某列为链接列-->
63行<!--定义表格某列为链接列,引用页面需定义js函数griddetail('$id')-->
78行<!--在表格后加图片列用来操作-->
81行<!--在表格后加图片列用来操作引用页面需定义js函数$img.imageEvent('$id')-->
131行<!--引用循环页码-->
102行<!--checkbox批处理-->
*#
#macro (pageGrid $gridInfo)
<table width="100%">
<!--表格内容开始-->
<tr>
<td>
<table id="listTable" class="grid">
#set ($rowCount = 0)
#foreach ($map in $gridInfo.list)
#set ($row = $map.get("value"))
#set ($colCount = 0)
#set ($id = "")
#if ($rowCount == 0)
<tr class="blue_bold">
#foreach ($col in $row)
#if ($colCount == 0)
#if($gridInfo.gridStyle.checked)
<th></th>
#end
#else
<th>
$col
</th>
#end
#set ($colCount = $colCount + 1)
#end
#foreach ($ecol in $gridInfo.gridStyle.columns)
<th>
$ecol
</th>
#end
</tr>
#else <!--表格内容行-->
#set ($imp = $map.get("IMP"))
#set ($isOddRow = $rowCount % 2 != 0)
#if($imp == "1")
<tr class="text_bc03">
#else
#if ($isOddRow)
<tr onMouseOver='high(this);' onMouseOut='low(this);' class='odd'>
#else
<tr onMouseOver='high(this);' onMouseOut='low(this);' class='even'>
#end
#end
<script>
function colvalue(cv)
{
if(cv.length>20)
{
var pattern=RegExp("(<IMG\\s*[\\S]*\\s*/\\s*>)([\\S]*)");
if (pattern.exec(cv))
{
var str1=RegExp.$1;
var str2=RegExp.$2;
return str1+str2.substring(0,20)+"...";
}
else
{
return cv.substring(0,20)+"...";
}
}
else
{
return cv;
}
}
</script>
#foreach ($col in $row)
#if ($colCount == 0)
#set ($id = $col)
#if($gridInfo.gridStyle.checked)
<td><input type="checkbox" name="model.grid_check" value="$id"/></td>
#end
#else
#if ($colCount == $gridInfo.gridStyle.linkNum)
<td align="center" title='$col'>
#else
<td title='$col'>
#end
#if ($col == "")
#else
#if($colCount == $gridInfo.gridStyle.linkNum)
<a href="javascript:griddetail('$id');" >
<script>document.write(colvalue('$col')); </script>
</a>
#else
<script>document.write(colvalue('$col')); </script>
#end
#end
</td>
#end
#set ($colCount = $colCount + 1)
#end
#foreach ($imgs in $gridInfo.gridStyle.images)
<td>
#foreach ($img in $imgs)
#set ($imageEvent = $img.imageEvent)
<img src="$img.imagePath" alt="$img.imageTitle" onclick="javascript:img$imageEvent('$id');" style="cursor:hand"/>
#end
</td>
#end
</tr>
#end
#set ($rowCount = $rowCount + 1)
#end
</table>
</td>
</tr>
<!--表格内容结束-->
<!--分页开始-->
<tr>
<td>
<table width="100%">
<tr>
<td align="left">
#if($gridInfo.gridStyle.checked)
<td> <input type="checkbox" name="grid_check_all" onclick="javascript:selectall();"/>全部选中</td>
#end
</td>
<td align="right">
#if ($gridInfo.list)
#if ($gridInfo.gridStyle.pagable)
#set($prepage = $gridInfo.currentpage - 1)
#set($nextpage = $gridInfo.currentpage + 1)
#if ($gridInfo.gridStyle.displaySum)
共<font color="red">$gridInfo.sumrecords</font>条记录
<input type="hidden" name="model.pageGridInfo.sumrecords" value="$!{model.pageGridInfo.sumrecords}">
#end
每页<input type="text"id="pPR" name="model.pageGridInfo.perPageRows" class="page_input"value="$gridInfo.perPageRows" onchange="document.getElementById('cpage').value='1';" />条
共$gridInfo.sumpages页
#if ($gridInfo.firstPage)
<img src="/images/arrow_pre02.gif" onclick="page(1)">
#else
<img src="/images/arrow_pre02.gif">
#end
#if ($gridInfo.previousPage)
<img src="/images/arrow_pre.gif" onclick="page($prepage)">
#else
<img src="/images/arrow_pre.gif">
#end
#set($indexPage =$gridInfo.currentpage/$gridInfo.prePageNum*$gridInfo.prePageNum)
#set($lastPageNum = $indexPage+$gridInfo.prePageNum)
#pagePrint($indexPage $gridInfo.prePageNum $gridInfo.sumpages $lastPageNum)
#if ($gridInfo.nextPage)
<img src="/images/arrow_next.gif" onclick="page($nextpage)">
#else
<img src="/images/arrow_next.gif">
#end
#if ($gridInfo.endPage)
<img src="/images/arrow_next02.gif" onclick="page($gridInfo.sumpages)">
#else
<img src="/images/arrow_next02.gif">
#end
第<input type="text"id="cpage" name="model.pageGridInfo.currentpage" class="page_input" value="$gridInfo.currentpage" />页
<script language="javascript" type="text/javascript">
function pagego()
{
p=parseInt(document.getElementById('pPR').value);
s=parseInt(document.getElementById('cpage').value);
if(/[\D]/g.test(p))
{
alert('每页显示记录数必须全部是数字');
document.getElementById('pPR').value=$gridInfo.perPageRows;
}
if(p==0)
{
alert('每页显示记录数不能为零');
document.getElementById('pPR').value=$gridInfo.perPageRows;
}
if(s<=0)
{
alert('页码必须大于0');
return s=$gridInfo.currentpage;
}
if(s>$gridInfo.sumpages)
{
alert('页码必须小于总页数');
return s=$gridInfo.currentpage;
}
if(/[\D]/g.test(s))
{
alert('页码必须全部是数字');
return s=$gridInfo.currentpage;
}
else
{
return s;
}
}
</script>
<input type="button" name="pageGo" value="GO" onclick="page(pagego());" />
#end
#end
</td>
</tr>
</table>
</td>
</tr>
<!--分页结束-->
</table>
#end
<!--定义循环页码-->
#macro (pagePrint $indexPage $prePageNum $sumpages $lastPageNum)
#if ($indexPage<$lastPageNum&&$indexPage<$sumpages)
#set($indexPage =$indexPage+1)
<a href="javascript:page($indexPage)" >$indexPage</a>
#pagePrint($indexPage $prePageNum $sumpages $lastPageNum)
#end
#end
发表评论
-
springmvc+velocity 在vm模板上添加通用工具类对象变量
2012-05-29 14:55 2331在平时工作的项目中经常会在vm模板中添加自定义的工具类,由 ... -
struts2 与 velocity 整合 探究
2012-05-29 13:21 1561我这边引出几个问题。 问题1,struts2 是怎么让 v ... -
模板:velocity和freemarker的比较
2012-05-21 17:24 1906/** *作者:张荣华(ahu ... -
velocity初体验
2012-05-14 14:57 1101VelocityServlet: Java代码 ... -
Velocity中VM文件找不到问题的解决
2012-04-14 11:05 1408在Velocity中默认加载vm文件的类是FileResour ... -
Velocity模版与Ajax灵活应用
2012-04-11 13:06 5429一:先简单介绍一下velocity的模版页面 veloc ... -
velocity学习心得
2012-04-11 13:06 1462目录1. 常用的模版技术 21.1. Velocity 21 ... -
Velocity教程
2012-04-11 13:03 1031Velocity是一个基于java的模板引擎(template ... -
eclipse上的几个Velocity插件
2012-04-01 08:54 1490最近在研究XWiki,它是支持Velocity的,所以就顺便调 ...
相关推荐
Velocity模板引擎Velocity模板引擎Velocity模板引擎Velocity模板引擎Velocity模板引擎Velocity模板引擎Velocity模板引擎Velocity模板引擎Velocity模板引擎Velocity模板引擎
使用velocity,静态页面分页的实现
Velocity实现模板
velocity分页的例子,很简单,大家可以看看
此代码是基于使用velocity生成静态的html页面,并进行分页
Velocity模板实例 Velocity模板实例 Velocity模板实例 Velocity模板实例
ssm框架+maven+velocity+pagehelper分页整合,拿过去直接用,jdk支持1.8,各种开发可以直接在上面作调整就行
Velocity模板入门简单DEMO, 代码有注解;
Spring Boot项目 自动生成数据表模板,包括:Mapper、Mapper.xml、Service、Controller、html 自定义模板生成
Velocity模板技术语法详细介绍,包括很详细的示例代码 1.变量………………………………………………………………………………1 2.循环………………………………………………………………………………2 3.条件语句...
Velocity1.4java开发指南中文版 Velocity1.4模板使用指南中文版中文版
Velocity.js 是velocity模板语法的javascript实现。Velocity 是基于Java的模板引擎,广泛应用在阿里集 体各个子公司。Velocity模板适用于大量模板使用的场景,支持复杂的逻辑运算,包含 基本数据类型、变量赋值和...
SpringBoot集成Mybatis,velocity模板
Velocity模板解析,通过Velocity模板自动替换表达式中的变量
史上最全Velocity模板使用指南中文版,适合初学者读阅
Velocity模板(VM)语言介绍,简单的介绍,方便入门!
velocity-web模板工具, 参考:http://blog.csdn.net/nature_fly088/article/details/52497779 和http://www.ibm.com/developerworks/cn/java/j-lo-velocity1/