extremecomponents 配置

2022-09-24 10:45:07 浏览数 (1)

大家好,又见面了,我是你们的朋友全栈君。 1. 下载最新版

2.把extremecomponents.jar 放入web-inf/lib

3.根据minum, 导出excel 或 导出pdf的需要,把/lib下的jar copy到web-inf/lib

4.把images里的图片放入web的任意目录

5.把css文件放到web的任意目录

6.在/source/org/extremecomponents/table/core目录找到extremetable.properties文件,把它复制到WEB-INF/classes里面并进行修改.

7.修改web.xml (见2)。

web xml 配置

代码语言:javascript复制
    <context-param>
  <param-name>extremecomponentsPreferencesLocation</param-name>
  <param-value>/extremetable.properties</param-value>
 </context-param> 
代码语言:javascript复制
<servlet>
		<servlet-name>StaticFileAccessServlet</servlet-name>
		<servlet-class>
			com.huan.framework.extremecomponents.StaticFileAccessServlet
		</servlet-class>
	</servlet>
	<servlet-mapping>
		<servlet-name>StaticFileAccessServlet</servlet-name>
		<url-pattern>/static/*</url-pattern>
	</servlet-mapping>
    <listener>   
        <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>   
    </listener>  
    <!-- 用于导出excel-->   
    <filter>       
        <filter-name>eXtremeExport</filter-name> 
        <filter-class>org.extremecomponents.table.filter.ExportFilter</filter-class>  
    </filter>   
    <filter-mapping>        
        <filter-name>eXtremeExport</filter-name>        
        <url-pattern>/*</url-pattern>    
    </filter-mapping>

extremetable.properties配置

代码语言:javascript复制
table.autoIncludeParameters=true
table.border=0
table.bufferView=true
table.cellpadding=0
table.cellspacing=0
table.exportable=true
table.filterable=false
table.filterRowsCallback.default=com.huan.framework.extremecomponents.PageRowCallback
table.filterRowsCallback.limit=org.extremecomponents.table.callback.LimitCallback
table.headerClass=tableHeader
table.headerSortClass=tableHeaderSort
table.interceptor.default=org.extremecomponents.table.interceptor.DefaultInterceptor
table.maxRowsDisplayed=100
table.medianRowsDisplayed=50
table.method=post
table.retrieveRowsCallback.default=com.huan.framework.extremecomponents.PageRowCallback
table.retrieveRowsCallback.limit=org.extremecomponents.table.callback.LimitCallback
table.rowsDisplayed=15
table.showExports=false
table.showPagination=true
table.showStatusBar=true
table.showTitle=true
table.showTooltips=true
table.sortable=false
table.sortRowsCallback.default=com.huan.framework.extremecomponents.PageRowCallback
table.sortRowsCallback.limit=org.extremecomponents.table.callback.LimitCallback
table.state.default=org.extremecomponents.table.state.DefaultState
table.state.notifyToDefault=org.extremecomponents.table.state.NotifyToDefaultState
table.state.persist=org.extremecomponents.table.state.PersistState
table.state.notifyToPersist=org.extremecomponents.table.state.NotifyToPersistState
table.stateAttr=notifyState
table.styleClass=tableRegion
table.theme=eXtremeTable
table.useSessionFilterSortParam=useSessionFilterSort
table.view.compact=org.extremecomponents.table.view.CompactView
table.view.limit=org.extremecomponents.table.view.LimitView
table.view.html=org.extremecomponents.table.view.HtmlView
table.width=100%

row.highlightClass=highlight
row.highlightRow=true
row.interceptor.default=org.extremecomponents.table.interceptor.DefaultInterceptor

column.calc.total=org.extremecomponents.table.calc.TotalCalc
column.calc.average=org.extremecomponents.table.calc.AverageCalc
column.cell.currency=org.extremecomponents.table.cell.NumberCell
column.cell.number=org.extremecomponents.table.cell.NumberCell
column.cell.date=org.extremecomponents.table.cell.DateCell
column.cell.display=org.extremecomponents.table.cell.DisplayCell
column.cell.rowCount=org.extremecomponents.table.cell.RowCountCell
column.cell.tree=org.extremecomponents.tree.TreeCell
column.escapeAutoFormat=false
column.filterCell.droplist=org.extremecomponents.table.cell.FilterDroplistCell
column.filterCell.filter=org.extremecomponents.table.cell.FilterCell
column.headerCell.header=org.extremecomponents.table.cell.HeaderCell
column.headerCell.selectAll=org.extremecomponents.table.cell.SelectAllHeaderCell
column.interceptor.default=org.extremecomponents.table.interceptor.DefaultInterceptor

export.encoding=UTF
export.interceptor.default=org.extremecomponents.table.interceptor.DefaultInterceptor
export.view.pdf=org.extremecomponents.table.view.PdfView
export.view.xls=org.extremecomponents.table.view.XlsView
export.view.csv=org.extremecomponents.table.view.CsvView
export.viewResolver.pdf=org.extremecomponents.table.filter.PdfViewResolver
export.viewResolver.xls=org.extremecomponents.table.filter.XlsViewResolver
export.viewResolver.csv=org.extremecomponents.table.filter.CsvViewResolver

defaultCalcLayout=multiRowCalcResults

messages=org.extremecomponents.table.resource.TableResourceBundle

jsp 使用

代码语言:javascript复制
<%@ taglib uri="http://www.extremecomponents.org" prefix="ec" %>

<ec:table 
		items="page"
		action="${pageContext.request.contextPath}/room/adminlist.do"
		imagePath="${pageContext.request.contextPath}/static/images/table/*.gif"
		title=" "
		width="100%"
		rowsDisplayed="20"
		var="item"
		filterable="false"
		showExports="true" 
		style="table-layout: fixed;word-wrap:break-word;">
		<ec:exportXls fileName="BookList.xls" tooltip="Export Excel"/>
		<ec:row>
			<ec:column property="roomname" title="会议室"/>
			<ec:column property="title" title="会议主题"/>
			<ec:column property="unit" title="会议单位"/>   
			<ec:column property="username" title="申请人"/>  
			<ec:column property="time" title="会议日期" cell="date" format="yyyy-MM-dd"/>
			<ec:column property="_type" title="会议时间">			
			${item.type==0?'9:00--12:00':(item.type==1?'14:00--17:00':'18:00--21:00')} 
			</ec:column>
			
			<ec:column property="_status" title="状态">
			<s:if test="${item.status==0}">未审核</s:if><s:elseif test="${item.status==1}">通过</s:elseif>
            <s:elseif test="${item.status==2}">不通过</s:elseif></ec:column>
			<ec:column property="_" title="操作">  
			<a href="delete.do?bookroom.id=${item.id}">删除</a>|<a href="audit.do?bookroom.id=${item.id}&bookroom.status=1">通过</a>|<a href="audit.do?bookroom.id=${item.id}&&bookroom.status=2">不通过</a>
			</ec:column>
		</ec:row>
		 
	</ec:table>

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/171307.html原文链接:https://javaforall.cn

0 人点赞