All Downloads are FREE. Search and download functionalities are using the official Maven repository.

velocity.feilong-default-pager.vm Maven / Gradle / Ivy

Go to download

feilong is a suite of core and expanded libraries that include utility classes, http, excel,cvs, io classes, and much much more.

There is a newer version: 4.0.8
Show newest version
#**
    这是个示例或者默认的模板,通过这个模板,可以看到哪些变量可以使用
    每个商城可以使用这个模板,也可以自定义模板来使用
	
	该VM 可以取到两个变量:
	
    	pagerVMParam	:	包含各种显示数字/链接 参数
    	i18nMap			:	包含国际化信息
*#
##总数 ${i18nMap.get('feilong-pager.text.totalCount')}${pagerVMParam.totalCount} ##当前第${pagerVMParam.currentPageNo}页/共${pagerVMParam.allPageNo}页 ${pagerVMParam.currentPageNo}/${pagerVMParam.allPageNo} ##第一页不显示首页和上一页 #if(1 != ${pagerVMParam.currentPageNo}) ${i18nMap.get('feilong-pager.text.prev')} ##// 如果导航编号里面没有首页 则添加首页 ##// 导航里面 是否有第一页, 如果从开始1索引 则已经包含的首页包含 #if (${pagerVMParam.startIteratorIndex} != 1) 1 #end #end ##开始迭代索引不等于1,并且开始迭代索引不等于2,显示3点 #if (${pagerVMParam.startIteratorIndex} != 1 && ${pagerVMParam.startIteratorIndex} != 2) ... #end ##循环所有的页码 显示导航编号 #foreach( ${entry} in ${pagerVMParam.iteratorIndexMap.entrySet()} ) ##当前 直接是数字编号 #if(${entry.key}==${pagerVMParam.currentPageNo}) ${entry.key} #else ##不是当前页面 ${entry.key} #end #end ##如果最后一个迭代索引不等于总页数,且最后一个迭代索引不等于总也是-1,那么 显示3点 #set($allPageNoTo1=${pagerVMParam.allPageNo} - 1) #if (${pagerVMParam.endIteratorIndex} != ${pagerVMParam.allPageNo} && ${pagerVMParam.endIteratorIndex} != $allPageNoTo1) ... #end ##最后一页不显示下一页和末页 #if(${pagerVMParam.allPageNo}!=${pagerVMParam.currentPageNo}) ## 如果导航编号里面没有尾页 则添加尾页 ##导航里面是否有最后一页, 如果结束的位置是allPageNo 则已经包含的尾页 #if(${pagerVMParam.endIteratorIndex} != ${pagerVMParam.allPageNo}) ##跳转到最后一页 $!{pagerVMParam.allPageNo} #end ##跳转到下一页 ${i18nMap.get('feilong-pager.text.next')} #end /${pagerVMParam.allPageNo}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy