请教fins,${globalcount}好像没有用嘛?

daiing 2007-03-30
我是这样做的,数据放在session里,然后每列根据该列在原始数据list的索引值为参数传递,在后面的程序里可以快速索引到list中的数据,而不用传递id然后还要去查一遍,但是如果用rowcount,排序或者筛选后就和原来的索引不符了。
我请教过fins,他说可以用${globalcount},但是好像不起作用啊

<ec:column property="nickname" title="称号" width="200">
     <div title="${pre.nickname}">
     ${GLOBALCOUNT}---${ROWCOUNT-1}--${globalcount}</div>
</ec:column>
fins 2007-03-30
你可以看看例子



${GLOBALROWCOUNT}

大写 有ROW

daiing 2007-03-30
试过了GLOBALROWCOUNT和ROWCOUNT没有分别都是当前的排序的序列号
fins 2007-03-30
奇怪啊 在我这里是好用的
而且我们项目中已经用了啊

你的 ecside是什么版本?
还有 能否把你的 jsp发来看看??
daiing 2007-03-31
两个问题并一个问题,一个是索引问题,一个是process放在配置表问题,版本应该是最新的1.3
jsp:
<%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030"%>
<%@ include file="/common/jsp/head.jsp"%>

<%
java.util.List presidents = new java.util.ArrayList();

for(int i = 0;i < 3;i++) {
java.util.Map president = new java.util.HashMap();
president.put("name","戴清" + "_" + i);
president.put("nickname","Father of His Country" + "_" + i);
president.put("term","1789-1797");
president.put("no","" + i);
president.put("no2","2" + i);
presidents.add(president);

president = new java.util.HashMap();
president.put("name","宋建" + "_" + i);
president.put("nickname","Atlas of Independence" + "_" + i);
president.put("term","1797-1801");
president.put("no","" + i);
president.put("no2","2" + i);
presidents.add(president);

president = new java.util.HashMap();
president.put("name","Thomas Jefferson" + "_" + i);
president.put("nickname","Man of the People, Sage of Monticello" + "_"
+ i);
president.put("term","1801-09");
president.put("no","" + i);
president.put("no2","2" + i);
presidents.add(president);

president = new java.util.HashMap();
president.put("name","James Madison" + "_" + i);
president.put("nickname","Father of the Constitution" + "_" + i);
president.put("term","1809-17");
president.put("no","" + i);
president.put("no2","2" + i);
presidents.add(president);

president = new java.util.HashMap();
president.put("name","James Monroe" + "_" + i);
president.put("nickname",
"The Last Cocked Hat, Era-of-Good-Feelings President" + "_" + i);
president.put("term","1817-25");
president.put("no","" + i);
president.put("no2","2" + i);
presidents.add(president);

president = new java.util.HashMap();
president.put("name","John Adams");
president.put("nickname","Old Man Eloquent" + "_" + i);
president.put("term","1825-29");
president.put("no","" + i);
president.put("no2","2" + i);
presidents.add(president);

}
//org.ecside.common.util.RequestUtil.initLimit(request, 200,0);
request.setAttribute("pres",presidents);
%>

<body style="margin:25px;" onload="init()">


<ec:table items="pres" var="pre" retrieveRowsCallback="process"
action="test1.jsp" title="总统列表" tableId="ec" sortable="true"
width="90%" showPrint="true" xlsFileName="用户列表.xls" nearPageNum="0"  resizeColWidth="true"  height="241px" >

<ec:column property="iid" cell="rowCount" title="序号" width="50"/>
<ec:row ondblclick="alert('test ondblclick :${pre.name}')">
<ec:column cell="checkbox"  headerCell="checkbox" alias="chkBoxNameXXX" value="chkValue${pre.nickname}" width="22" viewsAllowed="html" />

<ec:column property="name" title="姓名" width="160">
</ec:column>

<ec:column property="nickname" title="称号" width="200">
<div title="${pre.nickname}">${GLOBALROWCOUNT}---${ROWCOUNT-1}--${globalcount}</div>
</ec:column>
<ec:column property="term" title="任期" width="100"/>
</ec:row>
</ec:table>
</body>
</html>

web.xml:
<filter>
<filter-name>eXtremeExport</filter-name>
<filter-class>org.ecside.filter.ECSideFilter</filter-class>
<init-param> 
   <param-name>responseHeadersSetBeforeDoFilter</param-name> 
   <param-value>false</param-value> 
</init-param>
<init-param>
<param-name>useEasyDataAccess</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>useEncoding</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>encoding</param-name>
<param-value>GBK</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>eXtremeExport</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<context-param>
<param-name>ecsidePreferencesLocation</param-name>
<param-value>/extremetable.properties</param-value>
</context-param>
<context-param>
<param-name>ecsideMessagesLocation</param-name>
<param-value>/messages</param-value>
</context-param>

extremetable.properties:



table.interceptor.default=org.extremecomponents.table.interceptor.DefaultInterceptor
row.interceptor.default=org.extremecomponents.table.interceptor.DefaultInterceptor
column.interceptor.default=org.extremecomponents.table.interceptor.DefaultInterceptor
export.interceptor.default=org.extremecomponents.table.interceptor.DefaultInterceptor

table.showExports=true
table.showPagination=true
table.showStatusBar=true
table.showTitle=false
table.showTooltips=true

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.useSessionFilterSortParam=useSessionFilterSort

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.rowCount=org.extremecomponents.table.cell.RowCountCell
column.cell.tree=org.extremecomponents.tree.TreeCell
column.filterCell.droplist=org.extremecomponents.table.cell.FilterDroplistCell
column.filterCell.filter=org.extremecomponents.table.cell.FilterCell

column.headerCell.selectAll=org.extremecomponents.table.cell.SelectAllHeaderCell

messages=org.ecside.resource.TableResourceBundle

table.autoIncludeParameters=true
table.border=0
table.cellpadding=0
table.cellspacing=0
table.width=100%
table.method=post
table.theme=eXtremeTable
table.styleClass=tableRegion
table.headerClass=tableHeader
table.headerSortClass=tableHeaderSort
table.exportable=true
table.sortable=false
table.filterable=false
table.editable=false

row.highlightRow=true
row.highlightClass=highlight
row.selectlightRow=true
row.selectlightClass=selectlight

table.rowsDisplayed=15
table.showExports=true
table.view.html=org.ecside.view.DefaultHtmlView
table.locale=zh_CN
column.headerCell.radiobox=org.ecside.table.cell.RadioBoxHeaderCell
column.headerCell.checkbox=org.ecside.table.cell.CheckBoxHeaderCell
column.headerCell.header=org.ecside.table.cell.HeaderCell
column.cell.display=org.ecside.table.cell.DisplayCell
column.cell.radiobox=org.ecside.table.cell.RadioBoxCell
column.cell.checkbox=org.ecside.table.cell.CheckBoxCell
column.cell.calcTotal=org.ecside.table.cell.RowCalcTotalCell
column.cell.calcAvg=org.ecside.table.cell.RowCalcAvgCell
column.format.number=0.##
column.format.date=yyyy/MM/dd
column.parse.date=yyyyMMdd

export.encoding=UTF
export.maxRowsExported=30000
export.view.xls=org.ecside.view.XlsView
export.view.pdf=org.ecside.view.PdfView
export.view.csv=org.ecside.view.CsvView
export.view.print=org.ecside.view.PrintView
export.viewResolver.xls=org.ecside.view.XlsViewResolver
export.viewResolver.pdf=org.ecside.view.PdfViewResolver
export.viewResolver.csv=org.ecside.view.CsvViewResolver
export.viewResolver.print=org.ecside.view.PrintViewResolver

tool.navigation=org.ecside.table.tool.PageNavigationTool
tool.pagejump=org.ecside.table.tool.PageJumpTool
tool.pagesize=org.ecside.table.tool.PageSizeTool
tool.export=org.ecside.table.tool.ExportTool
tool.status=org.ecside.table.tool.StatusTool
tool.extend=org.ecside.table.tool.ExtendTool
tool.blank=org.ecside.table.tool.BlankTool
tool.|=org.ecside.table.tool.SeparatorTool
tool.,=org.ecside.table.tool.NewLineTool

table.toolbarLocation=bottom
table.toolbarContent=navigation|pagejump|pagesize|export|extend|status
table.resizeColWidth=true
table.minColWidth=35

exportPdf.font=SimSun,SimHei
exportPdf.userconfigLocation=fop_pdf_config.xml
exportPdf.fontLocation=/WEB-INF/lib

column.escapeAutoFormat=true
defaultCalcLayout=multiRowCalcResults
##defaultCalcLayout=singleRowCalcResults
table.alwaysShowExtend=bottom
#table.bufferView=true
table.bufferView=false

table.pageSizeList=max:2000,5,10,20,50,100,1000,all
#table.pageSizeList=10,20,50,100,1000,2000
table.nearPageNum=3
#table.nearPageNum=0

table.filterRowsCallback.default=org.extremecomponents.table.callback.ProcessRowsCallback
table.filterRowsCallback.process=org.extremecomponents.table.callback.ProcessRowsCallback
table.filterRowsCallback.limit=org.extremecomponents.table.callback.LimitCallback
table.filterRowsCallback.common=org.ecside.table.callback.CommonLimitCallback
table.filterRowsCallback.default=org.ecside.table.callback.CommonLimitCallback


#table.sortRowsCallback.default=org.extremecomponents.table.callback.ProcessRowsCallback
table.sortRowsCallback.process=org.extremecomponents.table.callback.ProcessRowsCallback
table.sortRowsCallback.limit=org.extremecomponents.table.callback.LimitCallback
table.sortRowsCallback.common=org.ecside.table.callback.CommonLimitCallback
table.sortRowsCallback.default=org.ecside.table.callback.CommonLimitCallback

table.retrieveRowsCallback.default=org.extremecomponents.table.callback.ProcessRowsCallback
table.retrieveRowsCallback.process=org.extremecomponents.table.callback.ProcessRowsCallback
table.retrieveRowsCallback.limit=org.extremecomponents.table.callback.LimitCallback
table.retrieveRowsCallback.common=org.ecside.table.callback.CommonLimitCallback
table.retrieveRowsCallback.default=org.ecside.table.callback.CommonLimitCallback

麻烦fin了,两个问题帮忙解决一下
fins 2007-03-31
第2个问题

table.retrieveRowsCallback.default=org.ecside.table.callback.CommonLimitCallback

改成

table.retrieveRowsCallback.default=org.extremecomponents.table.callback.ProcessRowsCallback

而不是把那个#去掉

第一个问题你现在是什么现象??

daiing 2007-03-31
<div title="${pre.nickname}">${GLOBALROWCOUNT}---${ROWCOUNT-1}--${globalcount}</div>
globalrowcount 和 rowcount是一样的,你点任意一个排序
还是从1开始
第二个问题我是按你这么写的啊?你仔细看看
daiing 2007-03-31
第二个解决了,多了一句,呵呵,第一格问题还是这样
fins 2007-03-31
第一个问题 翻页正常不???
daiing 2007-03-31
可以翻页
Global site tag (gtag.js) - Google Analytics