﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-JAVA梦想-随笔分类-extremeComponents</title><link>http://www.blogjava.net/lucky/category/7508.html</link><description /><language>zh-cn</language><lastBuildDate>Tue, 27 Feb 2007 23:41:03 GMT</lastBuildDate><pubDate>Tue, 27 Feb 2007 23:41:03 GMT</pubDate><ttl>60</ttl><item><title>eccn小组定制扩展发布</title><link>http://www.blogjava.net/lucky/archive/2006/06/09/51690.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Fri, 09 Jun 2006 07:09:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/06/09/51690.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/51690.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/06/09/51690.html#Feedback</comments><slash:comments>11</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/51690.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/51690.html</trackback:ping><description><![CDATA[       目前已经完成了在上篇blog中提到并演示的所有功能   <br />       1） FreeMarker模板的应用<br />       2） 工具条上下位置<br />       3） 是否显示跳转到指定页面下拉框<br />       4） 是否显示表格行数<br />       5） 列的<br />           onclick        点击<br />            onmouseover    鼠标覆盖<br />            onmouseout     鼠标移出<br />            highlight      高亮<br />           。。。。。。<br />       感谢ECCN小组所有成员，特别是差沙和小牧。<br />      <font color="#ff3300"> 大家可以从Sina的免费邮箱中下载，用户名、密码： extremetable ； 如果有谁能提供比较高效、稳定的下载服务器，可与我联系或直接提供下载。                <br /></font>       P.S. 由于本人最近比较忙，关于ec的咨询，如无特急情况请使用Google用户组 http://groups.google.com/group/eXtremeComponents_CN 或在本blog上留言。eccn小组的所有成员将为你解答。也欢迎你share自己的心得和成果。<br />     <br />  <br /><img src ="http://www.blogjava.net/lucky/aggbug/51690.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-06-09 15:09 <a href="http://www.blogjava.net/lucky/archive/2006/06/09/51690.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ECCN小组成立,以及extremeComponents的相关下载</title><link>http://www.blogjava.net/lucky/archive/2006/05/23/47708.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Tue, 23 May 2006 12:28:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/05/23/47708.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/47708.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/05/23/47708.html#Feedback</comments><slash:comments>23</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/47708.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/47708.html</trackback:ping><description><![CDATA[   经过这些天的筹备ECCN小组终于成立了，从今天开始终于可以告别孤军奋斗了，也可以扩展一些很多网友提到的感兴趣的功能了。<br />   ECCN小组现有成员（加入先后顺序）： lucky、差沙、小牧、robin、pesome<br />1)   首次我们要扩展的是很多网友期盼的功能：<br />   1） FreeMarker模板的应用<br />   2） 工具条上下位置<br />   3） 是否显示跳转到指定页面下拉框<br />   4） 是否显示表格行数<br />   5） 列的<br />       onclick        点击<br />        onmouseover    鼠标覆盖<br />        onmouseout     鼠标移出<br />        highlight      高亮<br /><br />   这些功能的flash演示，大家可以从openfans下载：<br />        <a href="http://www.openfans.net:81/upload/swf-features.rar">http://www.openfans.net:81/upload/swf-features.rar</a><span style="color: rgb(0, 0, 0); font-family: 宋体;"><a href="http://openfans.net:81/upload/swf_features.rar"></a><br /><br />  我们正在紧张的整合、测试过程中，相关发布预计6月上旬，敬请期待！<br /><br />2) 提供由ECCN小组发布的extremeComponents的中文参考文档pdf版，基于</span>ECCN小组robin个人学习时使用不同颜色标注重点的版本。对于初次接触extremeComponents的朋友会有很大帮助，希望大家在向我们提出相关的问题前能先花点宝贵的时间看看这份文档。下载地址：<br />     <a target="" class="" title="http://www.openfans.net:81/upload/eXtremeTable中文文档.rar" href="http://www.openfans.net:81/upload/eXtremeTable%e4%b8%ad%e6%96%87%e6%96%87%e6%a1%a3.rar">http://www.openfans.net:81/upload/eXtremeTable中文文档.rar</a><a href="%20http://openfans.net:81/upload/eXtremeTable%C3%A4%C2%B8%C2%AD%C3%A6%C2%96%C2%87%C3%A6%C2%96%C2%87%C3%A6%C2%A1%C2%A3.rar"><span style="text-decoration: underline;"></span></a><a href="%20http://openfans.net/upload/doc_ecrcn.rar"><span style="text-decoration: underline;"></span></a><a href="http://openfans.net/upload/doc_ecrcn.rar"><span style="color: rgb(0, 0, 0); font-family: 宋体;"></span></a><br />                 <br /><span style="color: rgb(0, 0, 0); font-family: 宋体;">3) 如果大家愿意加入ECCN小组，或者愿意把自己在实际工作中对extremeComponents已经进行的扩展拿出来和大家共享，请和我联系。<br /></span><img src ="http://www.blogjava.net/lucky/aggbug/47708.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-05-23 20:28 <a href="http://www.blogjava.net/lucky/archive/2006/05/23/47708.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>eXtremeComponents发布1.0.1-RC1版</title><link>http://www.blogjava.net/lucky/archive/2006/04/30/44180.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Sun, 30 Apr 2006 05:34:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/04/30/44180.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/44180.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/04/30/44180.html#Feedback</comments><slash:comments>20</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/44180.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/44180.html</trackback:ping><description><![CDATA[        eXtremeComponents发布1.0.1-RC1版,大家可以从SourceForge下载（http://sourceforge.net/projects/extremecomp）。<br />        相关的中文文档大家可以从Sina信箱中下载（用户名和密码都是：  extremetable）。<br /><br /><div id="stickies-count" style="display: none;">0</div><img src ="http://www.blogjava.net/lucky/aggbug/44180.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-04-30 13:34 <a href="http://www.blogjava.net/lucky/archive/2006/04/30/44180.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>速动画教程第十九集 eXtremeComponents 的基础配置(转自oksonic博客)</title><link>http://www.blogjava.net/lucky/archive/2006/04/23/42679.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Sun, 23 Apr 2006 09:05:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/04/23/42679.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/42679.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/04/23/42679.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/42679.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/42679.html</trackback:ping><description><![CDATA[
		<h1 class="block_title">
				<a id="viewpost1_TitleUrl" href="www.blogjava.net/oksonic/archive/2006/04/22/42552.html">速动画教程第十九集 eXtremeComponents 的基础配置（源地址）</a>
		</h1>
		<div class="postcontent">
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; font-family: 宋体;">速动画教程第十九集 </span>
						<b>
								<span style="font-size: 12pt; color: blue; font-family: System;">eXtremeComponents </span>
						</b>
						<span style="font-size: 10pt; font-family: 宋体;">的基础配置<br /><o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; font-family: 宋体;">
								<o:p>
										<br />录像下载: <a href="http://sonic.peakle.net/download/sonic019.rar">http://sonic.peakle.net/download/sonic019.rar</a><br /> </o:p>
						</span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; font-family: 宋体;">开发环境：<span style="color: blue;">Eclipse 3.1.1<span style="">  </span>MyEclipse 4.1.1<span style="">   </span>Tomcat 5.5</span><o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; font-family: 宋体;">
								<o:p> </o:p>
						</span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; font-family: 宋体;">此教程参考文章：<span style="color: blue;">http://www.blogjava.net/lucky/archive/2006/02/26/32479.html<o:p></o:p></span></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; font-family: 宋体;">
								<o:p> </o:p>
						</span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; font-family: 宋体;">先下载发行包 <span style="color: blue;">http://sourceforge.net/projects/extremecomp<o:p></o:p></span></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; font-family: 宋体;">
								<o:p> </o:p>
						</span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; font-family: 宋体;">将包内的所有 <span style="color: blue;">jar </span>文件拷贝到项目的 <span style="color: blue;">WEB-INF/lib </span>目录中<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; font-family: 宋体;">
								<o:p> </o:p>
						</span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; font-family: 宋体;">将 <span style="color: blue;">dist </span>目录中的 <span style="color: blue;">extremecomponents.tld</span> 文件拷贝到 <span style="color: blue;">WEB-INF </span><span style="color: black;">中</span><o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; font-family: 宋体;">将 <span style="color: blue;">test </span>目录中的 <span style="color: blue;">test.jsp </span>文件拷贝到 <span style="color: blue;">webroot </span>目录中<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; font-family: 宋体;">将 <span style="color: blue;">images </span>文件夹拷贝到 <span style="color: blue;">webroot </span>目录中<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; font-family: 宋体;">
								<o:p> </o:p>
						</span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; font-family: 宋体;">需要对原文件 test.jsp 修改！<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; font-family: 宋体;">
								<o:p> </o:p>
						</span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; font-family: 宋体;">修改了标签路径<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; font-family: 宋体;">
								<o:p> </o:p>
						</span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; font-family: 宋体;">然后刷新一下工程，布署工程，起动 <span style="color: blue;">Tomcat </span>打开浏览器，输入 <span style="color: blue;">http://localhost/table/test.jsp </span>进行测试<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; font-family: 宋体;">
								<o:p> </o:p>
						</span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; font-family: 宋体;">看一下 <span style="color: blue;">test.jsp </span>文件内容<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; font-family: 宋体;">
								<o:p> </o:p>
						</span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; font-family: 宋体;">以下是创建一个 <span style="color: blue;">list </span>集合，<span style="color: blue;">list </span>集合中是一组<span style="">  </span><span style="color: blue;">java.util.HashMap </span>集合<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% java.util.List presidents = new java.util.ArrayList(); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
								<o:p> </o:p>
						</span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% java.util.Map president = new java.util.HashMap(); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% president.put("name", "George Washington"); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% president.put("nickname", "Father of His Country"); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% president.put("term", "1789-1797"); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% presidents.add(president); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
								<o:p> </o:p>
						</span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% president = new java.util.HashMap(); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% president.put("name", "John Adams"); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% president.put("nickname", "Atlas of Independence"); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% president.put("term", "1797-1801"); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% presidents.add(president); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
								<o:p> </o:p>
						</span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% president = new java.util.HashMap(); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% president.put("name", "Thomas Jefferson"); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% president.put("nickname", "Man of the People, Sage of Monticello"); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% president.put("term", "1801-09"); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% presidents.add(president); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
								<o:p> </o:p>
						</span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% president = new java.util.HashMap(); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% president.put("name", "James Madison"); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% president.put("nickname", "Father of the Constitution"); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% president.put("term", "1809-17"); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% presidents.add(president); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
								<o:p> </o:p>
						</span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% president = new java.util.HashMap(); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% president.put("name", "James Monroe"); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% president.put("nickname", "The Last Cocked Hat, Era-of-Good-Feelings President"); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% president.put("term", "1817-25"); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% presidents.add(president); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
								<o:p> </o:p>
						</span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% president = new java.util.HashMap(); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% president.put("name", "John Adams"); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% president.put("nickname", "Old Man Eloquent"); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% president.put("term", "1825-29"); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% presidents.add(president); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
								<o:p> </o:p>
						</span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">&lt;% request.setAttribute("pres", presidents); %&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
								<o:p> </o:p>
						</span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: black; font-family: 宋体;">以下代码使用</span>
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
						</span>
						<span style="font-size: 10pt; color: blue; font-family: '@宋体';">eXtremeComponents </span>
						<span style="font-size: 10pt; color: black; font-family: 宋体;">的标签来生成表格</span>
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
								<o:p>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
								<o:p> </o:p>
						</span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
								<span style="">    </span>&lt;ec:table <o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
								<span style="">        </span>items="pres"<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
								<span style="">        </span>action="${pageContext.request.contextPath}/test.jsp"<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
								<span style="">        </span>imagePath="${pageContext.request.contextPath}/images/table/*.gif"<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
								<span style="">        </span>title="Presidents"<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
								<span style="">        </span>width="60%"<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
								<span style="">        </span>rowsDisplayed="5"<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
								<span style="">        </span>&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
								<span style="">        </span>&lt;ec:row&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
								<span style="">            </span>&lt;ec:column property="name"/&gt;<span style="">    </span></span>
						<span style="font-size: 10pt; color: black; font-family: 宋体;">
								<span style="">    </span>显示的列</span>
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
								<o:p>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
								<span style="">            </span>&lt;ec:column property="nickname"/&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
								<span style="">            </span>&lt;ec:column property="term"/&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
								<span style="">        </span>&lt;/ec:row&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
								<span style="">    </span>&lt;/ec:table&gt;<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
								<o:p> </o:p>
						</span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: green; font-family: 宋体;">
								<o:p> </o:p>
						</span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: black; font-family: 宋体;">这集录像的内容很简单，用来测试一下新的录像制作工具！！！<o:p></o:p></span>
				</p>
				<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;" align="left">
						<span style="font-size: 10pt; color: black; font-family: 宋体;">
								<o:p> </o:p>
						</span>
				</p>
				<p>
						<span style="font-size: 10pt; color: black; font-family: 宋体;">bye!!!</span>
				</p>
				<p>
						<br />
						<span style="font-size: 10pt; color: black; font-family: 宋体;">
						</span>
				</p>
				<p>
						<span style="font-size: 10pt; color: black; font-family: 宋体;">lucky：  谢谢速的劳动，大家可以看一下这么样简单使用</span>
						<span style="font-size: 10pt; color: blue; font-family: '@宋体';">eXtremeComponents</span>
						<span style="font-size: 10pt; color: black; font-family: 宋体;">。</span>
				</p>
		</div>
		<div id="stickies-count" style="display: none;">0</div>
		<div id="stickies-count" style="display: none;">0</div>
<img src ="http://www.blogjava.net/lucky/aggbug/42679.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-04-23 17:05 <a href="http://www.blogjava.net/lucky/archive/2006/04/23/42679.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>eXtremeComponents参考文档-----“后记”</title><link>http://www.blogjava.net/lucky/archive/2006/04/21/42345.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Fri, 21 Apr 2006 08:21:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/04/21/42345.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/42345.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/04/21/42345.html#Feedback</comments><slash:comments>18</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/42345.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/42345.html</trackback:ping><description><![CDATA[
		<p>
				<font size="4">我给eXtremeComponents参考文档加的“后记” ，有什么不妥大家提。明天我给Jeff发。欢迎大家加入</font>Google的
			<a href="http://groups.google.com/group/eXtremeComponents_CN" target="_top">
				eXtremeComponents_CN
			</a>
			用户组。</p>
		<h2 class="title">Chapter 1. 后记</h2>
		<div class="section" lang="en">
				<div class="titlepage">
						<div>
								<div>
										<h2 class="title" style="clear: both;">
												<a name="d0e4">
												</a>1.1. 关于本参考文档</h2>
								</div>
						</div>
				</div>
				<p>
			今天上午（2006/04/21）我和Jeff就是否在发行包进行了商量，Jeff的观点是发行包中不包括
			任何形式的文档，使用者可以从eXtremeComponents网站的
			<a href="http://extremecomponents.org/wiki/index.php/Main_Page" target="_top">
				wiki
			</a>
			找到
			相关的文档。wiki是大家一起维护的，内容和相关的修正能够尽快地传递给使用者。但考虑到我们中国程序员的使用习惯，Jeff同意将我以前翻译的参考文档
			包含到发行包中。提示：本文档的部分内容可能不是最新的，请关注eXtremeComponents网站的
			<a href="http://extremecomponents.org/wiki/index.php/Main_Page" target="_top">
				wiki
			</a>
			或者 Google的
			<a href="http://groups.google.com/group/eXtremeComponents_CN" target="_top">
				eXtremeComponents_CN
			</a>
			用户组。当然，你也可以在我 的
			<a href="../../lucky" target="_top">blog</a>
			中找到更新升级的提示。所有发行包中没有包含的文档，都能在上述3个地方找到。
		</p>
		</div>
		<div class="section" lang="en">
				<div class="titlepage">
						<div>
								<div>
										<h2 class="title" style="clear: both;">
												<a name="d0e21">
												</a>1.2. 关于eXtremeComponents的学习</h2>
								</div>
						</div>
				</div>
				<p>我的建议：</p>
				<div class="orderedlist">
						<ol type="1">
								<li>浏览相关的概述章节确认这是你需要的东西</li>
								<li>参照配置章节，运行test.jsp</li>
								<li>快速浏览相关的文档</li>
								<li>
				结合《参考指南》学习
				<a href="http://www.extremecomponents.org/extremesite/public/download/eXtremeSite.zip" target="_top">
					eXtremeSite
				</a>
				中的相关示例
			</li>
								<li>
				从一个实际的开源工程
				<a href="http://www.springside.org.cn/" target="_top">
					SpringSide
				</a>
				中，学习eXtremeComponents的用法
			</li>
						</ol>
				</div>
		</div>
		<div class="section" lang="en">
				<div class="titlepage">
						<div>
								<div>
										<h2 class="title" style="clear: both;">
												<a name="d0e43">
												</a>1.3. 关于使用eXtremeComponents中的问题</h2>
								</div>
						</div>
				</div>
				<p>如果你在使用eXtremeComponents时遇到了一些问题，你可以：</p>
				<div class="orderedlist">
						<ol type="1">
								<li>浏览上面提到的3个站点，特别是Wiki中的FAQ看是否和其中的现象一致</li>
								<li>如果没有找到答案，尝试google或者baidu一下</li>
								<li>
				如果仍然没有找到答案，可以在Google的
				<a href="http://groups.google.com/group/eXtremeComponents_CN" target="_top">
					eXtremeComponents_CN
				</a>
				用户组、我 的
				<a href="../../lucky" target="_top">blog</a>
				中留言。我将尽快回复。
			</li>
								<li>如果你的项目时间很紧，你可以与我直接MSN联系： zlh326@msn.com</li>
						</ol>
				</div>
		</div>
		<div class="section" lang="en">
				<div class="titlepage">
						<div>
								<div>
										<h2 class="title" style="clear: both;">
												<a name="d0e63">
												</a>1.4. 关于如何询问使用eXtremeComponents的问题</h2>
								</div>
						</div>
				</div>
				<p>
			eXtremeComponents报错了(特别是在正式项目中)，大家都很着急。我们都希望尽快解决这其中的问题，因此，在
			你寻求相关的帮助时，请提供：
		</p>
				<div class="orderedlist">
						<ol type="1">
								<li>相关的错误信息</li>
								<li>如果不涉及商业秘密，请提供使用eXtremeComponents出错的相关文件</li>
								<li>出错时生成的html代码</li>
								<li>如果可能，提供相关错误的抓图</li>
						</ol>
				</div>
				<p>以便我们能尽早帮你排除问题。</p>
		</div>
		<div class="section" lang="en">
				<div class="titlepage">
						<div>
								<div>
										<h2 class="title" style="clear: both;">
												<a name="d0e79">
												</a>1.5. 关于创建eXtremeComponents的子工程</h2>
								</div>
						</div>
				</div>
				<p>
			eXtremeComponents具有良好的扩展性，一直打算基于eXtremeComponents的发布版的代码进行一些扩展定制开发。今天和Jeff商量
			的结果是：eXtremeComponents的M5发布后的一段时期，会用来补充文档和修正bug。这段时间我们可以用来进行我们的定制开发，目前
			我打算进行的扩展：
		</p>
				<div class="orderedlist">
						<ol type="1">
								<li>FreeMarker模板的支持</li>
								<li>Velocity模板的支持</li>
								<li>PDF导出的iText支持</li>
								<li>适合国情的一些css，cell、Filter。。。</li>
						</ol>
				</div>
				<p>目前，开发、测试人员招募中。如果大家对这些感兴趣可以和我联系，你也可以向我们贡献你的代码。</p>
				<p>
			本子工程遵循使用eXtremeComponents所采用的开源协议---Apache 2.0 开源协议。
		</p>
		</div>
		<div class="section" lang="en">
				<div class="titlepage">
						<div>
								<div>
										<h2 class="title" style="clear: both;">
												<a name="d0e97">
												</a>1.6. 个人推荐</h2>
								</div>
						</div>
				</div>
				<div class="orderedlist">
						<ol type="1">
								<li>
										<a href="http://www.openfans.net/" target="_top">openfans：</a>
				希望通过这个网站为开源软件在中国的传播和使用尽一份自己的力量。定于“五.一”前发布。
			</li>
								<li>
										<a href="http://www.hellopen.net/" target="_top">hellopen：</a>
				openfans成员zidoing开发的openfans的RoR版，对RoR感兴趣的朋友可以看看
			</li>
								<li>
										<a href="http://www.springside.org.cn/" target="_top">SpringSide：</a>
				江南白衣领导的SpringSide，以Spring Framework为核心，
				提供一个Pragmatic的企业应用开发基础和最佳实践展示。除了学习其中的eXtremeComponents的用法
				外，也可以学习到其他新框架、工具包。
			</li>
						</ol>
				</div>
		</div>
		<div id="stickies-count" style="display: none;">0</div>
<img src ="http://www.blogjava.net/lucky/aggbug/42345.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-04-21 16:21 <a href="http://www.blogjava.net/lucky/archive/2006/04/21/42345.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>eXtremeComponents相关</title><link>http://www.blogjava.net/lucky/archive/2006/04/20/42126.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Thu, 20 Apr 2006 03:21:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/04/20/42126.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/42126.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/04/20/42126.html#Feedback</comments><slash:comments>9</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/42126.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/42126.html</trackback:ping><description><![CDATA[    这些天事情比较多，比较杂。关于eXtremeComponents<br />    1） 星期六和Jeff一起修正了，白衣提出的eXtremeComponents使用limit时的一个问题： limit的sort的property属性，返回的是这个属性的alias。现在改为，Sort里增加一个alias属性，这样的话既可以返回alias，又能得到property<br />    2） extremeComponents的发布版，不会再带文档，大家要参考的话可以访问wiki。“<span class="q">I am hoping that by having it on the wiki
that more people will make corrections and add on to it. </span>”  ，不过考虑到咱们的习惯，我现在还在和Jeff商量。如果不行的话，我在wiki里提供下载地址。不过大家能上网的话，还是建议大家看wiki或者我的blog，因为很多更新或修正，没法在发布的文档中反应。这也是我为什么不提供参考文档下载的一个原因。<br />   3）我在google上建了一个组：eXtremeComponents_CN<br />        eXtremeComponents_CN是eXtremeComponents的中国用户组,主要宗旨: <br />             a. 帮助中文开发人员解决使用eXtremeComponents中出现的问题 <br />             b. eXtremeComponents的扩展定制开发的组织、讨论、实施<br />      创建这个组一是帮助国内开发人员的交流问题，二是帮助Jeff分摊一些压力。关于b 现在只是我的一个想法，现在也正在与Jeff商量。所以这个组现在的主要目标是a。<br />      当然如果大家在<font color="#ff0000"><b>项目时间很紧</b></font>的情况下，也可以在线和我联系。<br />      我的MSN： zlh326@msn.com<br />            email： xplucky@gmail.com<br />      <br /><div id="stickies-count" style="display: none;">0</div><img src ="http://www.blogjava.net/lucky/aggbug/42126.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-04-20 11:21 <a href="http://www.blogjava.net/lucky/archive/2006/04/20/42126.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Maven2　介绍</title><link>http://www.blogjava.net/lucky/archive/2006/04/12/40746.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Wed, 12 Apr 2006 15:14:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/04/12/40746.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/40746.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/04/12/40746.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/40746.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/40746.html</trackback:ping><description><![CDATA[
		<div class="chapter" lang="en">
				<div class="titlepage">
						<div>
								<div>
										<h2 class="title">
												<a name="d0e44">
												</a>Chapter 1. Maven2</h2>
								</div>
						</div>
				</div>
				<div class="section" lang="en">
						<div class="titlepage">
								<div>
										<div>
												<h2 class="title" style="clear: both;">
														<a name="d0e47">
														</a>1.1. Maven2 
体验</h2>
										</div>
								</div>
						</div>
						<p>
								<span class="emphasis">
										<em>声明:本节内容来源于<a href="/jbob/" target="_top">blogjava网站jbob的blog</a> 本节的版权归原作者所有，不适用本手册的版权申明。</em>
								</span>
						</p>
						<p>maven是一个java项目管理工具，深化了ant，但又有自己一整套的项目集成策略。目前的版本是2.0.2。 </p>
						<div class="orderedlist">
								<ol type="1">
										<li>
												<p>
														<a href="http://maven.apache.org/" target="_top">maven网站 </a>下载maven2，解压缩 </p>
										</li>
										<li>
												<p>配置环境变量:maven_home、path</p>
										</li>
										<li>
												<p>cmd-&gt; mvn --version 检查是否安装成功 [显示版本号，则说明安装成功] </p>
										</li>
										<li>
												<p>配置,Maven的配置分为三个层次:</p>
												<div class="itemizedlist">
														<ul type="bullet">
																<li style="list-style-type: disc;">
																		<p>- pom.xml:针对某个项目的配置</p>
																</li>
																<li style="list-style-type: disc;">
																		<p>Installation</p>
																</li>
																<li style="list-style-type: disc;">
																		<p>User -针对某个用户的配置</p>
																</li>
														</ul>
												</div>
												<p>我们首先配置主要是user级别的，主要包括两点:设置本地的资源库和代理服务器[如果需要的话] 
在%maven_home%/conf/setting.xml中配置: </p>
												<pre class="programlisting">					&lt;localRepository&gt;d:/repo&lt;/localRepository&gt;<br /></pre>
												<pre class="programlisting">					&lt;proxy&gt;<br />						&lt;id&gt;proxy1&lt;/id&gt;<br />						&lt;active&gt;true&lt;/active&gt;<br />						&lt;protocol&gt;http&lt;/protocol&gt;<br />						&lt;username&gt;&lt;/username&gt;<br />						&lt;password&gt;&lt;/password&gt;<br />						&lt;host&gt;222.136.91.1&lt;/host&gt;<br />						&lt;port&gt;80&lt;/port&gt;<br />						&lt;nonProxyHosts&gt;&lt;/nonProxyHosts&gt;<br />					&lt;/proxy&gt;<br /></pre>
												<p>修改之后copy一份到${home}/.m2</p>
										</li>
										<li>
												<p>建立新的项目</p>
												<pre class="programlisting">					mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app<br /></pre>
												<div class="itemizedlist">
														<ul type="bullet">
																<li style="list-style-type: disc;">
																		<p>首先，程序会从远程下载必要的jar包到你的localRepository,即我们刚刚设置的[d:/repo] </p>
																</li>
																<li style="list-style-type: disc;">
																		<p>然后，会在当前目录下面生成my-app文件夹，包括简单的包结构[java,test]和一个HelloWorld程序及测试,以及pom.xml文件。 
</p>
																</li>
														</ul>
												</div>
												<p>注意：pom.xml contains the Project Object Model (POM) for this project.The POM 
is the basic unit of work in Maven。 </p>
										</li>
										<li>
												<p>编译</p>
												<pre class="programlisting">mvn compile</pre>
												<p>第一次运行会下载很多jar包,而且机器负荷会很重。运行这个命令需要在pom.xml相同目录下面, 
这个编译只编译主程序，不会编译test下面的程序。如果需要单独编译test,请运行：</p>
												<pre class="programlisting">mvn test-compile</pre>
												<p>compile之后会生成target文件夹，主程序编译在classes下面，测试程序放在test-classes下</p>
										</li>
										<li>
												<p>测试</p>
												<pre class="programlisting">mvn test</pre>
												<p>会自动先编译再运行测试</p>
										</li>
										<li>
												<p>打包</p>
												<pre class="programlisting">mvn package</pre>
												<p>打包之前会进行编译，测试</p>
										</li>
										<li>
												<p>安装</p>
												<pre class="programlisting">mvn install</pre>
												<p>会将package之后的jar包copy到</p>&lt;local-repository&gt;/com/mycompany/app/my-app/1.0-SNAPSHOT/my-app-1.0-SNAPSHOT.jar 

</li>
										<li>
												<p>其他</p>
												<pre class="programlisting">mvn site</pre>
												<p>注意,还可以:</p>
												<pre class="programlisting">deploy site</pre>
												<p>在pom.xml中加入</p>
												<pre class="programlisting"> &lt;distributionManagement&gt;<br />    &lt;site&gt;<br />      &lt;id&gt; website &lt;/id&gt;<br />         &lt; url&gt; scp://www.mycompany.com/www/docs/project/ &lt;/url&gt;<br />    &lt;/site&gt;<br />  &lt;/distributionManagement&gt;<br /></pre>
												<p>当然你需要设置server</p>
												<pre class="programlisting">mvn site-deploy<br />mvn clean<br />mvn idea:idea [为IDE工具idea生成项目文件]<br /></pre>
										</li>
										<li>
												<p>Resource</p>
												<p>${basedir}/src/main/resources都会编译到jar文件中,而且该目录下的内容将直接位于jar文件的顶部。</p>
												<p>测试用资源文件-&gt; ${basedir}/src/test/resources，引用时如下例：</p>
												<pre class="programlisting">InputStream is = getClass().getResourceAsStream( "/test.properties" );<br /></pre>
												<p>文件位于 ${basedir}/src/test/resources/test.properties。</p>
										</li>
										<li>
												<p>如何filter我们的资源文件</p>
												<pre class="programlisting">   &lt; build &gt;<br />     &lt; resources &gt;<br />       &lt; resource &gt;<br />         &lt; directory &gt; src/main/resources &lt;/ directory &gt;<br />         &lt; filtering &gt; true &lt;/ filtering &gt;<br />       &lt;/ resource &gt;<br />     &lt;/ resources &gt;<br />   &lt;/ build &gt;<br /></pre>
												<p>因为原来默认的filter为false所以要加上上面的代码</p>
												<p>eg:我们在src/main/resources下面建立application.properties文件</p>
												<pre class="programlisting"># application.properties<br /> application.name=${pom.name}<br /> application.version=${pom.version}<br /></pre>
												<p>运行：mvn process-resources 在target/classes下面的application.properties结果为：</p>
												<pre class="programlisting"> # application.properties<br /> application.name=Maven Quick Start Archetype<br /> application.version=1.0-SNAPSHOT<br /></pre>
												<p>这就是所谓的filter。当然filter还可以用其他的外部文件，不一定来自pom.xml[ ${pom.name} ]以及setting.xml[ 
${settings.localRepository }] </p>
												<p>e.g src/main/filters/filter.properties:</p>
												<pre class="programlisting"># filter.properties<br /> my.filter.value=hello!<br /></pre>
												<p>pom.xml:</p>
												<pre class="programlisting"> &lt; build &gt;<br />     &lt; filters &gt;<br />       &lt; filter &gt; src/main/filters/filter.properties &lt;/ filter &gt;<br />     &lt;/ filters &gt;<br />     &lt; resources &gt;<br />       &lt; resource &gt;<br />         &lt; directory &gt; src/main/resources &lt;/ directory &gt;<br />         &lt; filtering &gt; true &lt;/ filtering &gt;<br />       &lt;/ resource &gt;<br />     &lt;/ resources &gt;<br />   &lt;/ build &gt; </pre>
												<p># application.properties</p>
												<pre class="programlisting">application.name=${pom.name}<br />application.version=${pom.version}<br />message=${my.filter.value}<br /></pre>
												<p>这样在运行mvn process-resources 会得到类似的效果,当然我们也可以直接在pom.xml中定义：</p>
												<pre class="programlisting">&lt; build &gt;<br />     &lt; resources &gt;<br />       &lt; resource &gt;<br />         &lt; directory &gt; src/main/resources &lt;/ directory &gt;<br />         &lt; filtering &gt; true &lt;/ filtering &gt;<br />       &lt;/ resource &gt;<br />     &lt;/ resources &gt;<br />   &lt;/ build &gt;<br />   &lt; properties &gt;<br />     &lt; my .filter.value &gt; hello &lt;/ my.filter.value &gt;<br />   &lt;/ properties &gt; </pre>
												<p>效果同样，这样就不需要外部文件了。另外filter还可以来自系统设置以及可以自定义：</p>
												<pre class="programlisting"># application.properties<br />java.version=${java.version}<br />command.line.prop=${command.line.prop}<br /></pre>
										</li>
										<li>
												<p>jar包依赖</p>
												<p>我们在mvn install后在local repo中生成的jar包也可以被其他项目所引用</p>
												<pre class="programlisting">&lt;dependency&gt;<br />      &lt;groupId&gt;com.mycompany.app&lt;/groupId&gt;<br />      &lt;artifactId&gt;my-app&lt;/artifactId&gt;<br />      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;<br />      &lt;scope&gt;compile&lt;/scope&gt;<br />&lt;/dependency&gt;</pre>
												<p>注意scope,这里是compile,如果使用junit，scope是test。</p>
												<p>举例说明：如果我们的project需要用到log4j包，那么我们可以 先google--"site:www.ibiblio.org maven2 
log4j"。Index of /maven2/log4j/log4j 下面有maven-metadata.xml 
描述了groupId,artifactId,version等等。获取了这些信息之后，你 就可以在pom.xml中添加依赖</p>
												<pre class="programlisting">&lt;dependency&gt;<br />      &lt;groupId&gt;log4j&lt;/groupId&gt;<br />      &lt;artifactId&gt;log4j&lt;/artifactId&gt;<br />      &lt;version&gt;1.2.12&lt;/version&gt;<br />      &lt;scope&gt;compile&lt;/scope&gt;<br />&lt;/dependency&gt;</pre>
										</li>
										<li>
												<p>如何发布我的jar包到我的remote repository</p>
												<p>你需要在setting.xml中间设置server:</p>
												<pre class="programlisting">&lt;servers&gt;<br />    &lt;server&gt;<br />      &lt;id&gt;mycompany-repository&lt;/id&gt;<br />      &lt;username&gt;jvanzyl&lt;/username&gt;<br />      &lt;!-- Default value is ~/.ssh/id_dsa --&gt;<br />     &lt;privateKey&gt;/path/to/identity&lt;/privateKey&gt;<br />         &lt;passphrase&gt;my_key_passphrase&lt;/passphrase&gt;<br />    &lt;/server&gt;<br />&lt;/servers&gt;</pre>
												<p>然后在pom.xml中设置远程url:</p>
												<pre class="programlisting">&lt;distributionManagement&gt;<br />    &lt;repository&gt;<br />      &lt;id&gt;mycompany-repository&lt;/id&gt;<br />      &lt;name&gt;MyCompany Repository&lt;/name&gt;<br />     &lt;url&gt;scp://repository.mycompany.com/repository/maven2&lt;/url&gt;<br />    &lt;/repository&gt;<br />  &lt;/distributionManagement&gt;</pre>
										</li>
								</ol>
						</div>
				</div>
				<div class="section" lang="en">
						<div class="titlepage">
								<div>
										<div>
												<h2 class="title" style="clear: both;">
														<a name="d0e228">
														</a>1.2. Maven2的Eclipse插件安装和使用</h2>
										</div>
								</div>
						</div>
						<div class="section" lang="en">
								<div class="titlepage">
										<div>
												<div>
														<h3 class="title">
																<a name="d0e231">
																</a>1.2.1. 安装</h3>
												</div>
										</div>
								</div>
								<p>你可以从<a href="http://m2eclipse.codehaus.org/" target="_top">http://m2eclipse.codehaus.org</a>update安装Maven2的Eclipse插件，具体 
安装步骤请看该网站提供的Flash Demo: <a href="http://m2eclipse.codehaus.org/Installing_Maven_2.0_plugin_for_Eclipse.html" target="_top">http://m2eclipse.codehaus.org/Installing_Maven_2.0_plugin_for_Eclipse.html</a></p>
						</div>
						<div class="section" lang="en">
								<div class="titlepage">
										<div>
												<div>
														<h3 class="title">
																<a name="d0e241">
																</a>1.2.2. 使用</h3>
												</div>
										</div>
								</div>
								<p>该插件的使用请看该网站提供的Flash Demo: <a href="http://m2eclipse.codehaus.org/Maven_2.0_Plugin_for_Eclipse.html" target="_top">http://m2eclipse.codehaus.org/Maven_2.0_Plugin_for_Eclipse.html</a></p>
								<p>关于openfan项目的Maven操作请参看后续章节。</p>
						</div>
				</div>
				<div class="section" lang="en">
						<div class="titlepage">
								<div>
										<div>
												<h2 class="title" style="clear: both;">
														<a name="d0e250">
														</a>1.3. 更多的Maven2的参考</h2>
										</div>
								</div>
						</div>
						<div class="itemizedlist">
								<ul type="bullet">
										<li style="list-style-type: disc;">
												<p>
														<a href="http://maven.apache.org/" target="_top">Maven 网站</a>
												</p>
										</li>
										<li style="list-style-type: disc;">
												<p>
														<a href="http://www-128.ibm.com/developerworks/cn/opensource/os-maven2/" target="_top">developerWorks 中国：Maven2 的新特性</a>
												</p>
										</li>
										<li style="list-style-type: disc;">
												<p>
														<a href="http://blog.donews.com/woodstudio/archive/2006/01/31/712379.aspx" target="_top">木头工作室：Maven快速入门</a>
												</p>
										</li>
								</ul>
						</div>
				</div>
		</div>
		<div id="stickies-count" style="display: none;">0</div>
		<div id="stickies-count" style="display: none;">0</div>
<img src ="http://www.blogjava.net/lucky/aggbug/40746.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-04-12 23:14 <a href="http://www.blogjava.net/lucky/archive/2006/04/12/40746.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>eXtremeComponents M5 Release升级说明（A8）</title><link>http://www.blogjava.net/lucky/archive/2006/04/09/40101.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Sun, 09 Apr 2006 08:01:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/04/09/40101.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/40101.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/04/09/40101.html#Feedback</comments><slash:comments>13</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/40101.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/40101.html</trackback:ping><description><![CDATA[    <font color="#0000ff"><font size="4">   </font><font size="5"><font size="4">A8是eXtremeComponents正式Relese前的最后一个开发者版，现在eXtremeComponents的code工作已经全部结束，在Release之前的工作是完善eXtremeComponents的文档、指南和javadocs。所以请广大网友协助测试一下我前篇“<a id="_32a18c456d95_HomePageDays_DaysList_ctl00_DayItem_DayList_ctl00_TitleUrl" class="postTitle2" href="../archive/2006/04/08/40004.html">eXtremeComponents导出时的中文文件名问题</a>”中提到的中文文件名的问题，以便我能尽快提交，使得能够随着正式版一起Release。</font></font><br />        </font><br /><h2><a href="http://extremecomponents.org/wiki/index.php/Simplified_Chinese_Development_Release" title="Simplified Chinese Development Release">开发者版</a></h2><div class="editsection" style="float: right; margin-left: 5px;"></div><a name=".E5.BC.80.E5.8F.91.E5.BF.AB.E7.85.A7.E7.89.88"></a><h5> 开发快照版 </h5><p><a href="http://extremecomponents.org/extremesite/public/download/extremecomponents-1.0.1-M5-A8.zip" class="external text" title="http://extremecomponents.org/extremesite/public/download/extremecomponents-1.0.1-M5-A8.zip" rel="nofollow">extremecomponents-1.0.1-M5-A8</a>（下载） 是正式版发行前的最后开发快照版。这个build版所使用的代码将被下一个release版沿用。
</p><div class="editsection" style="float: right; margin-left: 5px;"></div><a name="1.0.1-M5-A8"></a><h5> 1.0.1-M5-A8 </h5><p><i>我决定发布一个新的里程碑(milestone)版是因为我对视图(view)的代码做了一些调整，现在eXtremeTable将能够支持AJAX(而不是局部build)。 在确认release候选版前，这些增加的大的特性能够完美地工作。</i></p><p>下面列出的是eXtremeTable下一个里程碑（milestone）版特性和改进，我希望从上一个里程碑版升级到现在这版没有任何问
题（breakage）。
然而，在完成M4版视图实现后，我决定我必须做最后的更改...将静态builders变为具体的类。这将是唯一可能出现问题(breakage)并且
将只影响到定制视图(定制cells也一样，但是更多的是较平和的deprecated)。尽管那样，这些更改将很容易实现。
</p><div class="editsection" style="float: right; margin-left: 5px;"></div><a name="Html_Builder.E7.B1.BB.E5.85.B7.E4.BD.93.E5.8C.96"></a><h4> Html Builder类具体化 </h4><p>所有的视图builder类具体化，需要被实例化，这些只对开发者需要创建定制试图或cells有影响。
这是因为需要使得视图代码能够像他们需要的那样具有弹性。builder classes是静态的能够很好地工作，但是
将来没有机会来做一些有意义的事，并且创建定制试图更加麻烦。然而，现在这些方法和原来的一样，而仅仅是需要对它进行实例化。 </p><p>为了使这种转变更容易CellBuilder仍然是静态的，但是现在为deprecated。新的(非静态)builder称为ColumnBuilder，通过这个名称我们能更确切地知道什么被构建了。
</p><pre>    public String getHtmlDisplay(TableModel model, Column column) {<br />        ColumnBuilder columnBuilder = new ColumnBuilder(column);<br />        columnBuilder.tdStart();<br />        columnBuilder.tdBody(getCellValue(model, column));<br />        columnBuilder.tdEnd();<br />        return columnBuilder.toString();<br />    }<br /></pre><p>另一个例子，使用ColumnBuilder定制cells如下：
</p><pre> public String getHtmlDisplay(TableModel model, Column column) {<br />        InputBuilder inputBuilder = new InputBuilder(column);<br />        inputBuilder.tdStart();<br /><br />        try {<br />            Object bean = model.getCurrentRowBean();<br />            Integer id = new Integer(BeanUtils.getProperty(bean, "id"));<br />            inputBuilder.tdBody(id);<br /><br />        } catch (Exception e) {}<br /><br />        inputBuilder.tdEnd();<br /><br />        return inputBuilder.toString();<br />    }<br /><br />    private static class InputBuilder extends ColumnBuilder {<br />        public InputBuilder(Column column) {<br />            super(column);<br />        }<br /><br />        public void tdBody(Integer id) {<br />            getHtmlBuilder().input("radio").name("location.id").id("location.id").value(id.toString()).onclick("populateLocationFields(this.value)");<br />            getHtmlBuilder().xclose();<br />        }<br />    }<br /> } <br /></pre><p>这样更简洁，只需要扩展你关心的builder，并构建你定制的实现。
</p><p>另外toolbar被完全重构，但是这个实现被隐藏在ToolbarBuilder类的背后，所以不会有影响。
</p><p>最后，我探索性地增加了toolbar特性，这样可以在preferences配置表关联到不同的toolbars。
这个特性能够用来动态构造toolbar。这将使开发者很简单地通过preferences来定义一个定制的toolbar。
例如，一个toolbar当使用Limit定制不包含最后一页按钮，或者另一个toolbar不包含rows displayed...
如果你要定制的就是这些东西而不需要别的新的特性，你最好等待一两个星期直到我实现完成。
</p><div class="editsection" style="float: right; margin-left: 5px;"></div><a name=".E6.96.B0.E7.9A.84.E8.A1.A8.E7.9A.84showTitle.E5.B1.9E.E6.80.A7"></a><h4> 新的表的showTitle属性 </h4><p>TableTag新的showTitle属性用来确认是否现实title，这是一个boolean值默认为true。
</p><div class="editsection" style="float: right; margin-left: 5px;"></div><a name="Limit.E7.8E.B0.E5.9C.A8.E8.83.BD.E4.BD.BF.E7.94.A8State.E7.89.B9.E6.80.A7"></a><h4> Limit现在能使用State特性 </h4><p>Limit特性为了使用State特性，你需要使用TableLimitFactory的带有state的构造函数，当使用state 特性时，你应该提供唯一的tableId（本例为presidents），带有state的构造函数同时也需要这个tableId。
</p><pre>    Context context = new HttpServletRequestContext(request);<br />    LimitFactory limitFactory = new TableLimitFactory(context, presidents, TableConstants.STATE_PERSIST, null);<br />    Limit limit = new TableLimit(limitFactory);<br /></pre><div class="editsection" style="float: right; margin-left: 5px;"></div><a name=".E6.96.B0.E7.9A.84.E5.88.97.E7.9A.84filterOptions.E5.B1.9E.E6.80.A7.2FFilterOption.E6.8E.A5.E5.8F.A3"></a><h4> 新的列的filterOptions属性/FilterOption接口 </h4><p>TableTag新的filterOptions属性，能够接受一个filter
options的集合，这个集合中的每个bean都实现FilterOption的
接口。被用来和filterCell=droplist结合，当使用Limit时使用定制droplist时非常有用。
</p><div class="editsection" style="float: right; margin-left: 5px;"></div><a name=".E5.AF.BC.E5.87.BAEXCLE.E6.96.87.E4.BB.B6.E6.97.B6.E7.9A.84.E6.9C.AC.E5.9C.B0.E8.AF.AD.E8.A8.80.E7.9A.84.E6.94.AF.E6.8C.81"></a><h4> 导出EXCLE文件时的本地语言的支持 </h4><p>默认的XlsView使用UTF-16编码，这样能够支持对于双字节语言导出。如果要使用unicode，你可以设置 ExportTag的新的encoding属性，这个属性接受的值为：UTF和UNICODE。
</p><div class="editsection" style="float: right; margin-left: 5px;"></div><a name=".E5.88.A0.E9.99.A4Compact.E8.A7.86.E5.9B.BE.E7.9A.84title.E7.9A.84style"></a><h4> 删除Compact视图的title的style </h4><p>当使用compact视图是我硬编码了表的title，这是一个bug。只需要通过CSS的titleRow属性style（或移走）title。
</p><div class="editsection" style="float: right; margin-left: 5px;"></div><a name="TableModel.E7.8E.B0.E5.9C.A8.E5.8F.98.E4.B8.BA.E6.8E.A5.E5.8F.A3"></a><h4> TableModel现在变为接口 </h4><p>TableModel现在变为接口，这只对TableAssembler产生影响。然而，正如下面提到的，使用Java代码来组装一个表将更容易。
</p><div class="editsection" style="float: right; margin-left: 5px;"></div><a name="TableAssembler.E6.95.B4.E5.90.88.E5.88.B0TableModel"></a><h4> TableAssembler整合到TableModel </h4><p>当使用Java代码来组装一个表将更容易：
</p><pre>    TableModel model = new TableModelImpl(context);<br /><br />    Table table = new Table(model);<br />    table.setItems(presidents);<br />    table.setAction("assembler.run");<br />    table.setTitle("Presidents");<br />    table.setShowTooltips(Boolean.FALSE);<br />    model.addTable(table);<br /><br />    Row row = new Row(model);<br />    row.setHighlightRow(Boolean.FALSE);<br />    model.addRow(row);<br /><br />    Column columnName = new Column(model);<br />    columnName.setProperty("fullName");<br />    columnName.setIntercept((AssemblerIntercept.class).getName());<br />    model.addColumn(columnName);<br /><br />    Column columnNickName = new Column(model);<br />    columnNickName.setProperty("nickName");<br />    model.addColumn(columnNickName);<br /><br />    Object view = model.assemble();<br /></pre><div class="editsection" style="float: right; margin-left: 5px;"></div><a name=".E9.87.8D.E5.91.BD.E5.90.8DFilterSet.getValue.28.29.E6.96.B9.E6.B3.95"></a><h4> 重命名FilterSet.getValue()方法 </h4><p>FilterSet.getValue()方法被Deprecated，重命名为FilterSet.getFilterValue()。
</p><div class="editsection" style="float: right; margin-left: 5px;"></div><a name=".E5.88.A0.E9.99.A4TableTag.E7.9A.84onsubmit"></a><h4> 删除TableTag的onsubmit </h4><p>onsubmit被删除，因为javascript被表的所有actions使用。
</p><div class="editsection" style="float: right; margin-left: 5px;"></div><a name=".E6.80.BB.E8.AE.A1.E5.AF.BC.E5.87.BA"></a><h4> 总计导出 </h4><p>PDF和XLS现在包含总计导出，你只需要和平常一样设置Calc特性。
</p><div class="editsection" style="float: right; margin-left: 5px;"></div><a name=".E5.AF.BC.E5.87.BA.E9.94.99.E8.AF.AF-Response.E5.A4.B4.E4.BF.AE.E6.94.B9"></a><h4> 导出错误-Response头修改 </h4><p>过滤器的response头应该能更好地适应不同环境，在response头后添加：
</p><pre> response.setHeader("Cache-Control", "must-revalidate, post-check=0, pre-check=0");<br /></pre><div class="editsection" style="float: right; margin-left: 5px;"></div><a name=".E5.88.97.E6.A0.87.E7.AD.BEautoGenerateColumns.E7.9A.84Preferences"></a><h4> 列标签autoGenerateColumns的Preferences </h4><p>autoGenerateColumns属性现在可以在Preferences文件中配置，可以使用别名来避免全路径引用。
</p><div class="editsection" style="float: right; margin-left: 5px;"></div><a name=".E8.87.AA.E5.8A.A8.E8.BD.AC.E6.8D.A2.E5.8F.82.E6.95.B0"></a><h4> 自动转换参数 </h4><p>Registry能够接受null、String、List或者Array作为参数，Registry将把这些转换成String[]。
</p><div class="editsection" style="float: right; margin-left: 5px;"></div><a name=".E8.A1.A8.E7.9A.84bufferView.E5.B1.9E.E6.80.A7"></a><h4> 表的bufferView属性 </h4><p>表的bufferView属性，默认为true将使用视图的默认buffer。如果不需要使用buffer可以设置为false。
</p><div class="editsection" style="float: right; margin-left: 5px;"></div><a name="eXtremeTable.E7.9A.84AJAX.E7.89.B9.E6.80.A7"></a><h4> eXtremeTable的AJAX特性 </h4><p>当使用eXtremeTable API来通过JAVA代码来创建表时，现在可以结合AJAX技术来生成视图。这意味着
当navigate（比如：翻页）时不需要刷新web页，这令人非常兴奋，关于这个特性的更多的文档将会出来。开发
者能够更好地测试并使用这个特性，这个特性的真正hook是表的onInvokeAction属性，它使得javascript方法
能够被invoked。AJAX整合一个最强大的地方是它不需要整合。下一步是使eXtremeTable有一个清晰并且易于使用的API，
这意味着你可以使用你感兴趣的AJAX技术因为eXtremeTable没有整合一个特定的技术。现在你可以通过CVS得到eXtremeSite代码，
它展示了一个使用AJAX的实例，它现在使用HSQL所以只需要下载并直接运行。请暂时不要向我询问更多的文档，我现在正在整理
并将尽可能快的发布出来。
</p><div class="editsection" style="float: right; margin-left: 5px;"></div><a name=".E8.A1.A8.E7.9A.84items.E5.8F.AF.E4.BB.A5.E4.BD.BF.E7.94.A8Map"></a><h4> 表的items可以使用Map </h4><p>表的Items可以使用Map(values)，因此可以使用不使用Collection而使用一些key来快速构造。 这个特性正是一个eXtremeComponents使用者需要的。我想这将是一个有趣的特性所以决定在下一个release中发布!
</p><div class="editsection" style="float: right; margin-left: 5px;"></div><a name=".E5.8F.AF.E4.BB.A5.E5.AE.9A.E4.B9.89.E8.B6.85.E8.BF.87.E4.B8.80.E4.B8.AA.E6.98.BE.E7.A4.BA.E7.9A.84.E8.A1.8C.E6.95.B0.EF.BC.88rows_displayed.EF.BC.89.EF.BC.89"></a><h4> 可以定义超过一个显示的行数（rows displayed）） </h4><p>现在可以定义超过一个显示的行数（rows displayed）。这使得在eXtremeTable顶部和底部定义相同的工具条成为可能。
</p><div class="editsection" style="float: right; margin-left: 5px;"></div><a name="Parameter.E5.8F.82.E6.95.B0.E7.9A.84.E6.9B.B4.E5.A4.9A.E5.8F.98.E5.8C.96"></a><h4> Parameter参数的更多变化 </h4><p>Parameter特性能更好地支持Arrays、Lists、String和其他一些具有toString()的java对象，具有toString（）函数能够转换成一个String数组（array），例如：Number。
</p><div class="editsection" style="float: right; margin-left: 5px;"></div><a name=".E4.BF.AE.E6.AD.A3Export_viewResolver.E5.B1.9E.E6.80.A7.E6.B2.A1.E6.9C.89.E8.A2.AB.E5.8F.82.E7.85.A7"></a><h4> 修正Export viewResolver属性没有被参照 </h4><p>修正Export viewResolver属性没有被真正使用的bug。这使得定制导出时不需要设置view和viewResolver为相同的命名，而可以给出ViewResolver的全路径或者在配置中配置它的别名。
</p><div class="editsection" style="float: right; margin-left: 5px;"></div><a name=".E4.BF.AE.E6.AD.A3.E5.9C.A8.E5.90.8C.E4.B8.80.E4.B8.AAform.E4.B8.AD.E4.BD.BF.E7.94.A8.E4.B8.A4.E4.B8.AAeXtremeTables.E6.97.B6.E5.AF.BC.E5.87.BA.E7.9A.84.E9.97.AE.E9.A2.98"></a><h4> 修正在同一个form中使用两个eXtremeTables时导出的问题 </h4><p>修正在同一个form中使用两个eXtremeTables时导出的问题，现在他们能够互不干扰分别导出。我只是重新组织表实例
（instance）参数(现在命名ec_eti为导出表的id)，这个参数需要被同一个form中的不同表共享，每次request时候被重新设置
（reset）。
</p><p>如果form还包含其他的按钮（buttons）被条用，导出完毕后你需要调用resetExportParameters(form,
action)，它包含在extremecomponents.js文件中。第一个参数是当前的form，第二个参数是form的action。这个是因
为导出使用javaScript进行调用,没有别的办法重新自动reset它。
resetExportParameters做的就是将导出表的id置为空(null),并且将form
action设置为原来的值。这很不幸，但是我想不出别的处理方法。
</p><p>Note: 这个修正也关系到State特性。当使用State设置为persist时，导出也会出现问题。
</p><div class="editsection" style="float: right; margin-left: 5px;"></div><a name="table.imagePath.E9.85.8D.E7.BD.AE.28preference.29.E6.B7.BB.E5.8A.A0.E4.B8.8A.E4.B8.8B.E6.96.87.E8.B7.AF.E5.BE.84.EF.BC.88contextPath_.EF.BC.89"></a><h4> table.imagePath配置(preference)添加上下文路径（contextPath ） </h4><p>如果table.imagePath的上下文路径(context
path)没有在配置文件(Preferences)中指定，那么将给它自动指定一个。然而，如果路径以表示绝对路径“/”开始，将只给它提供一个上下文
(context)而上下文(contextPath)并没有插入。
</p><div class="editsection" style="float: right; margin-left: 5px;"></div><a name=".E4.BD.BF.E7.94.A8javascript.E8.AE.BE.E7.BD.AEform.E7.9A.84method.E5.B1.9E.E6.80.A7"></a><h4> 使用javascript设置form的method属性 </h4><p>当翻页、过滤、排序时将使用javascript来设置form的method属性。以前只是设置了form的action属性，为了完整性现在也设置了form的method属性。
</p><div class="editsection" style="float: right; margin-left: 5px;"></div><a name="Bullet_Proof_Limit_feature"></a><h4> Bullet Proof Limit feature </h4><p>如果传入不正确的数据到LimitCallback时，Limit只记录（log）并显示一个警告（warning）。
</p><div class="editsection" style="float: right; margin-left: 5px;"></div><a name="Intercept.E8.A2.AB.E9.87.8D.E5.91.BD.E5.90.8D.E4.B8.BAInterceptor"></a><h4> Intercept被重命名为Interceptor </h4><p>intercept特性被重命名为interceptor。因此我们现在的interceptors有：TableInterceptor、
RowInterceptor、ExportInterceptor和ColumnInterceptor。他们现在在interceptor包中。遍更
的原因是intercept不如interceptor能给大家提供一种表明他们作用更好的直觉。我不向提供一种我不喜欢的命名。然而，这些方法名都一样
所以能够将他们集中到一个正确的包中。
</p><div id="stickies-count" style="display: none;">0</div><div id="stickies-count" style="display: none;">0</div><img src ="http://www.blogjava.net/lucky/aggbug/40101.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-04-09 16:01 <a href="http://www.blogjava.net/lucky/archive/2006/04/09/40101.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>eXtremeComponents导出时的中文文件名问题</title><link>http://www.blogjava.net/lucky/archive/2006/04/08/40004.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Sat, 08 Apr 2006 09:03:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/04/08/40004.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/40004.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/04/08/40004.html#Feedback</comments><slash:comments>9</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/40004.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/40004.html</trackback:ping><description><![CDATA[        eXtremeComponents的中文的问题，目前知道的就是导出使用中文文件名的乱码问题，eXtremeComponents已经默认使用UTF来导出XLS，也已经给出了PDF导出的解决方案：<a id="_361f4fc3f080_HomePageDays_ctl00_DayList_ctl14_TitleUrl" class="postTitle2" href="../archive/2006/03/10/34717.html">最新eXtremeComponents包：支持 PDF中文导出</a><br />         网友seno指出可以参照SpringSide的解决方案，对文件名进行toUtf8编码。不过，在我自己实际应用中，我的一个应用根本不需要进行任何形式的修正就能正确地生成正确的文件名输出，如果我在eXtremeComponents添加了toUtf8导出的文件名反而乱码。所以现在的问题是我什么时候需要对文件名进行toUtf8编码？这是这段时间一直困扰我的问题，在网友冷月宫主和MagicYang的帮助，昨天经过一整天的查找测试找到了一个暂时看来令我比较满意的解决方案（暂时没有CheckIn）： 我对得到的文件名字符串使用jchardet（http://jchardet.sourceforge.net/）进行编码检测，如果检测编码是ASCII码则直接返回原字符串，否则的话是用SpringSide提供的toUtf8方法（比我原来的简洁有效）对字符串进行编码后再返回新的字符串。对应的代码如下：<br />    <div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 128, 0);">/*</span><span style="color: rgb(0, 128, 0);"><br /> * Copyright 2004 original author or authors.<br /> *<br /> * Licensed under the Apache License, Version 2.0 (the "License");<br /> * you may not use this file except in compliance with the License.<br /> * You may obtain a copy of the License at<br /> *<br /> *    </span><span style="color: rgb(0, 128, 0); text-decoration: underline;">http://www.apache.org/licenses/LICENSE-2.0</span><span style="color: rgb(0, 128, 0);"><br /> *<br /> * Unless required by applicable law or agreed to in writing, software<br /> * distributed under the License is distributed on an "AS IS" BASIS,<br /> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<br /> * See the License for the specific language governing permissions and<br /> * limitations under the License.<br /> </span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 0, 255);">package</span><span style="color: rgb(0, 0, 0);"> org.extremecomponents.table.filter;<br /><br /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> org.apache.commons.lang.StringUtils;<br /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> org.apache.commons.logging.Log;<br /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> org.apache.commons.logging.LogFactory;<br /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> org.extremecomponents.table.context.Context;<br /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> org.extremecomponents.table.core.TableConstants;<br /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> org.mozilla.intl.chardet.nsDetector;<br /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> org.mozilla.intl.chardet.nsICharsetDetectionObserver;<br /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> org.mozilla.intl.chardet.nsPSMDetector;<br /><br /></span><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br /> * </span><span style="color: rgb(128, 128, 128);">@author</span><span style="color: rgb(0, 128, 0);"> Jeff Johnston<br /> </span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">final</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);"> ExportFilterUtils {<br />    </span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> Log logger </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> LogFactory.getLog(ExportFilterUtils.</span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);">);<br />    </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">boolean</span><span style="color: rgb(0, 0, 0);"> found </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">;<br /><br />    </span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);"> ExportFilterUtils() {<br />    }<br /><br />    </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">boolean</span><span style="color: rgb(0, 0, 0);"> isExported(Context context) {<br />        </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> StringUtils.isNotBlank(getTableId(context));<br />    }<br /><br />    </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> String getExportFileName(Context context) {<br /><br />        String tableId </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> getTableId(context);<br /><br />        </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);"> (StringUtils.isNotBlank(tableId)) {<br />            String exportFileNameStr </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> tableId </span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">_</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);"> TableConstants.EXPORT_FILE_NAME;<br />            String exportFileName </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> verifyEncoding(context.getParameter(exportFileNameStr));<br /><br />            </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);"> (logger.isDebugEnabled()) {<br />                logger.debug(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">eXtremeTable export file name [</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);"> exportFileNameStr </span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">] is [</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);"> exportFileName </span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">]</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />            }<br /><br />            </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> exportFileName;<br />        }<br /><br />        </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">;<br />    }<br /><br />    </span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> String verifyEncoding(String exportFileName) {<br />        nsDetector det </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> nsDetector(nsPSMDetector.ALL);<br />        det.Init(</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> nsICharsetDetectionObserver() {<br />            </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);"> Notify(String charset) {<br />                ExportFilterUtils.found </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">true</span><span style="color: rgb(0, 0, 0);">;<br />            }<br />        });<br /><br />        </span><span style="color: rgb(0, 0, 255);">boolean</span><span style="color: rgb(0, 0, 0);"> done </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">;<br />        </span><span style="color: rgb(0, 0, 255);">boolean</span><span style="color: rgb(0, 0, 0);"> isAscii </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">true</span><span style="color: rgb(0, 0, 0);">;<br />        </span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[] buf </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> exportFileName.getBytes();<br />        </span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);"> (</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> i </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">; i </span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);"> buf.length; i</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">) {<br />            </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);"> (isAscii)<br />                isAscii </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> det.isAscii(buf, i);<br />            </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);"> (</span><span style="color: rgb(0, 0, 0);">!</span><span style="color: rgb(0, 0, 0);">isAscii </span><span style="color: rgb(0, 0, 0);">&amp;&amp;</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">!</span><span style="color: rgb(0, 0, 0);">done)<br />                done </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> det.DoIt(buf, i, </span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">);<br />        }<br />        det.DataEnd();<br /><br />        </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);"> (isAscii) {<br />            </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> exportFileName;<br />        }<br />        </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> toUtf8(exportFileName);<br /><br />    }<br /><br />    </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> String toUtf8(String src) {<br />        </span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[] b </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> src.getBytes();<br />        </span><span style="color: rgb(0, 0, 255);">char</span><span style="color: rgb(0, 0, 0);">[] c </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">char</span><span style="color: rgb(0, 0, 0);">[b.length];<br />        </span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);"> (</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> i </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">; i </span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);"> b.length; i</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">) {<br />            c[i] </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> (</span><span style="color: rgb(0, 0, 255);">char</span><span style="color: rgb(0, 0, 0);">) (b[i] </span><span style="color: rgb(0, 0, 0);">&amp;</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0x00FF</span><span style="color: rgb(0, 0, 0);">);<br />        }<br />        </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> String(c);<br />    }<br /><br />    </span><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br />     * There can only be one table instance (tableId) per form. If the instance<br />     * variable exists that means there is an export being done.<br />     *<br />     * </span><span style="color: rgb(128, 128, 128);">@param</span><span style="color: rgb(0, 128, 0);"> context<br />     * </span><span style="color: rgb(128, 128, 128);">@return</span><span style="color: rgb(0, 128, 0);"><br />     </span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br />    </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> String getTableId(Context context) {<br />        </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> context.getParameter(TableConstants.EXPORT_TABLE_ID);<br />    }<br />}<br /></span></div>      经过我们三个人测试是成功的。欢迎大家帮助测试。大家如果有任何意见、建议可与我联系： xplucky@gmail.com<br />      压缩文件只包含： eXtremeComponents.jar eXtremeComponents.tld 和 jchardet.jar<br />       <a href="/Files/lucky/eXtremeComponents.rar">eXtremeComponents.rar   </a><br /><br /><div id="stickies-count" style="display: none;">0</div><div id="stickies-count" style="display: none;">0</div><div id="stickies-count" style="display: none;">0</div><div id="stickies-count" style="display: none;">0</div><img src ="http://www.blogjava.net/lucky/aggbug/40004.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-04-08 17:03 <a href="http://www.blogjava.net/lucky/archive/2006/04/08/40004.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>eXtremeComponents FAQ(中文)</title><link>http://www.blogjava.net/lucky/archive/2006/03/31/38474.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Fri, 31 Mar 2006 06:07:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/03/31/38474.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/38474.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/03/31/38474.html#Feedback</comments><slash:comments>8</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/38474.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/38474.html</trackback:ping><description><![CDATA[
		<div class="book" lang="en">
				<div class="titlepage">
						<div>
								<div>
										<h1 class="title">
												<a name="d0e1">
												</a>eXtremeComponents FAQ</h1>
								</div>
								<div>
										<h2 class="subtitle">eXtremeComponents FAQ（中文版） </h2>
								</div>
								<div>
										<div class="authorgroup">
												<div class="author">
														<h3 class="author">
																<span class="firstname">Jeff</span>
																<span class="surname">Johnston</span>
														</h3>
												</div>
												<div class="author">
														<h3 class="author">
																<span class="firstname">Lucky</span>
														</h3>
												</div>
												<div class="author">
														<h3 class="author">
																<span class="firstname">冷月宫主</span>
														</h3>
												</div>
										</div>
								</div>
								<div>
										<p class="releaseinfo">版本0.1.0</p>
								</div>
								<div>
										<div class="legalnotice">本文档允许在遵守以下两条原则的条件下被使用和传播： 1）不能凭借本文档索取任何费用 
2）以任何方式（印刷物或电子版）使用和传播时本文档时，必须包含本版权申明 </div>
								</div>
								<div>
										<p class="pubdate">(更新中...)</p>
								</div>
						</div>
						<hr />
				</div>
				<div class="toc">
						<p>
								<b>Table of Contents</b>
						</p>
						<dl>
								<dt>
										<a href="#d0e25">eXtremeComponents FAQ(中文)</a>
								</dt>
								<dd>
										<dl>
												<dt>1. <a href="#d0e28">如何使用导出功能</a></dt>
												<dt>2. <a href="#d0e37">传入中文参数乱码</a></dt>
												<dt>3. <a href="#d0e67">导出时中文文件名乱码</a></dt>
												<dt>4. <a href="#d0e74">导出时文件内容乱码</a></dt>
												<dt>5. <a href="#d0e89">变量命名问题</a></dt>
												<dt>6. <a href="#d0e99">格式化输出表单中的数据</a></dt>
												<dt>7. <a href="#d0e112">加入链接</a></dt>
												<dt>8. <a href="#d0e122">行高亮显示</a></dt>
										</dl>
								</dd>
						</dl>
				</div>
				<div class="article" lang="en">
						<div class="titlepage">
								<div>
										<div>
												<h2 class="title">
														<a name="d0e25">
														</a>eXtremeComponents FAQ(中文)</h2>
										</div>
								</div>
								<hr />
						</div>
						<div class="section" lang="en">
								<div class="titlepage">
										<div>
												<div>
														<h2 class="title" style="clear: both;">
																<a name="d0e28">
																</a>1. 如何使用导出功能</h2>
												</div>
										</div>
								</div>
								<p>Q: 如何使用导出功能</p>
								<p>A: 为了使用导出功能，只需要在web.xml文件中加入eXtremeComponents的导出过滤器的配置，内容如下：</p>
								<pre class="programlisting">&lt;filter&gt;<br />    &lt;filter-name&gt;eXtremeExport&lt;/filter-name&gt;<br />    &lt;filter-class&gt;org.extremecomponents.table.filter.ExportFilter&lt;/filter-class&gt;<br />    &lt;init-param&gt;<br />      &lt;param-name&gt;responseHeadersSetBeforeDoFilter&lt;/param-name&gt;<br />      &lt;param-value&gt;true&lt;/param-value&gt;<br />    &lt;/init-param&gt;<br />  &lt;/filter&gt;<br />  &lt;filter-mapping&gt;<br />    &lt;filter-name&gt;eXtremeExport&lt;/filter-name&gt;<br />    &lt;url-pattern&gt;/*&lt;/url-pattern&gt;<br />  &lt;/filter-mapping&gt;<br /></pre>
						</div>
						<div class="section" lang="en">
								<div class="titlepage">
										<div>
												<div>
														<h2 class="title" style="clear: both;">
																<a name="d0e37">
																</a>2. 传入中文参数乱码</h2>
												</div>
										</div>
								</div>
								<p>Q: 传入中文参数乱码，如下页面： </p>
								<pre class="programlisting">		&lt;form id="form1" name="form1" method="post" action="应用eXtremeTable的action或是结果页面名"&gt;<br />  &lt;select name="selecttype" size="6"&gt;<br />    &lt;option value="第一个"&gt;第一个&lt;/option&gt;<br />    &lt;option value="第二个"&gt;第二个&lt;/option&gt;<br />    &lt;option value="第三个"&gt;第三个&lt;/option&gt;<br />  &lt;/select&gt;<br />  &lt;input type="text" name="username" /&gt;<br />  &lt;input type="submit" name="Submit" value="提交" /&gt;<br />&lt;/form&gt;<br /></pre>
								<p>当你提交时含有eXtremeTable的结果页面会自动取得页面上的表单参数，那怕是经过了action的mapping.findForward("forward"),在我的试用过程中到页面上会出现传递过去的参数，但出现了乱码问题，使用查询（filter）功能是的中文参数问题类似。 
</p>
								<p>A: </p>
								<div class="orderedlist">
										<ol type="1">
												<li>
														<p>确认服务器的参数是否设置了正确的编码，如果使用Tomcat请确认Server.xml： </p>
														<pre class="programlisting"> &lt;Connector port="80" URIEncoding="UTF-8" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false"<br />            redirectPort="8443" acceptCount="100" debug="0" connectionTimeout="20000" disableUploadTimeout="true" /&gt;</pre>
												</li>
												<li>
														<p>添加编码过滤器到你的应用工程： </p>
														<pre class="programlisting">/*<br /> * Copyright 1999-2001,2004 The Apache Software Foundation.<br /> *<br /> * Licensed under the Apache License, Version 2.0 (the "License");<br /> * you may not use this file except in compliance with the License.<br /> * You may obtain a copy of the License at<br /> *<br /> *      http://www.apache.org/licenses/LICENSE-2.0<br /> *<br /> * Unless required by applicable law or agreed to in writing, software<br /> * distributed under the License is distributed on an "AS IS" BASIS,<br /> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<br /> * See the License for the specific language governing permissions and<br /> * limitations under the License.<br /> */<br /><br /><br />package filters;<br /><br /><br />import java.io.IOException;<br />import javax.servlet.Filter;<br />import javax.servlet.FilterChain;<br />import javax.servlet.FilterConfig;<br />import javax.servlet.ServletException;<br />import javax.servlet.ServletRequest;<br />import javax.servlet.ServletResponse;<br />import javax.servlet.UnavailableException;<br /><br /><br />/**<br /> * &lt;p&gt;Example filter that sets the character encoding to be used in parsing the<br /> * incoming request, either unconditionally or only if the client did not<br /> * specify a character encoding.  Configuration of this filter is based on<br /> * the following initialization parameters:&lt;/p&gt;<br /> * &lt;ul&gt;<br /> * &lt;li&gt;&lt;strong&gt;encoding&lt;/strong&gt; - The character encoding to be configured<br /> *     for this request, either conditionally or unconditionally based on<br /> *     the &lt;code&gt;ignore&lt;/code&gt; initialization parameter.  This parameter<br /> *     is required, so there is no default.&lt;/li&gt;<br /> * &lt;li&gt;&lt;strong&gt;ignore&lt;/strong&gt; - If set to "true", any character encoding<br /> *     specified by the client is ignored, and the value returned by the<br /> *     &lt;code&gt;selectEncoding()&lt;/code&gt; method is set.  If set to "false,<br /> *     &lt;code&gt;selectEncoding()&lt;/code&gt; is called &lt;strong&gt;only&lt;/strong&gt; if the<br /> *     client has not already specified an encoding.  By default, this<br /> *     parameter is set to "true".&lt;/li&gt;<br /> * &lt;/ul&gt;<br /> *<br /> * &lt;p&gt;Although this filter can be used unchanged, it is also easy to<br /> * subclass it and make the &lt;code&gt;selectEncoding()&lt;/code&gt; method more<br /> * intelligent about what encoding to choose, based on characteristics of<br /> * the incoming request (such as the values of the &lt;code&gt;Accept-Language&lt;/code&gt;<br /> * and &lt;code&gt;User-Agent&lt;/code&gt; headers, or a value stashed in the current<br /> * user's session.&lt;/p&gt;<br /> *<br /> * @author Craig McClanahan<br /> * @version $Revision: 1.3 $ $Date: 2004/02/28 03:35:22 $<br /> */<br /><br />public class SetCharacterEncodingFilter implements Filter {<br /><br /><br />    // ----------------------------------------------------- Instance Variables<br /><br /><br />    /**<br />     * The default character encoding to set for requests that pass through<br />     * this filter.<br />     */<br />    protected String encoding = null;<br /><br /><br />    /**<br />     * The filter configuration object we are associated with.  If this value<br />     * is null, this filter instance is not currently configured.<br />     */<br />    protected FilterConfig filterConfig = null;<br /><br /><br />    /**<br />     * Should a character encoding specified by the client be ignored?<br />     */<br />    protected boolean ignore = true;<br /><br /><br />    // --------------------------------------------------------- Public Methods<br /><br /><br />    /**<br />     * Take this filter out of service.<br />     */<br />    public void destroy() {<br /><br />        this.encoding = null;<br />        this.filterConfig = null;<br /><br />    }<br /><br /><br />    /**<br />     * Select and set (if specified) the character encoding to be used to<br />     * interpret request parameters for this request.<br />     *<br />     * @param request The servlet request we are processing<br />     * @param result The servlet response we are creating<br />     * @param chain The filter chain we are processing<br />     *<br />     * @exception IOException if an input/output error occurs<br />     * @exception ServletException if a servlet error occurs<br />     */<br />    public void doFilter(ServletRequest request, ServletResponse response,<br />                         FilterChain chain)<br />   throws IOException, ServletException {<br /><br />        // Conditionally select and set the character encoding to be used<br />        if (ignore || (request.getCharacterEncoding() == null)) {<br />            String encoding = selectEncoding(request);<br />            if (encoding != null)<br />                request.setCharacterEncoding(encoding);<br />        }<br /><br />   // Pass control on to the next filter<br />        chain.doFilter(request, response);<br /><br />    }<br /><br /><br />    /**<br />     * Place this filter into service.<br />     *<br />     * @param filterConfig The filter configuration object<br />     */<br />    public void init(FilterConfig filterConfig) throws ServletException {<br /><br />   this.filterConfig = filterConfig;<br />        this.encoding = filterConfig.getInitParameter("encoding");<br />        String value = filterConfig.getInitParameter("ignore");<br />        if (value == null)<br />            this.ignore = true;<br />        else if (value.equalsIgnoreCase("true"))<br />            this.ignore = true;<br />        else if (value.equalsIgnoreCase("yes"))<br />            this.ignore = true;<br />        else<br />            this.ignore = false;<br /><br />    }<br /><br /><br />    // ------------------------------------------------------ Protected Methods<br /><br /><br />    /**<br />     * Select an appropriate character encoding to be used, based on the<br />     * characteristics of the current request and/or filter initialization<br />     * parameters.  If no character encoding should be set, return<br />     * &lt;code&gt;null&lt;/code&gt;.<br />     * &lt;p&gt;<br />     * The default implementation unconditionally returns the value configured<br />     * by the &lt;strong&gt;encoding&lt;/strong&gt; initialization parameter for this<br />     * filter.<br />     *<br />     * @param request The servlet request we are processing<br />     */<br />    protected String selectEncoding(ServletRequest request) {<br /><br />        return (this.encoding);<br /><br />    }<br /><br /><br />}  </pre>
												</li>
												<li>
														<p>在web.xml中添加编码过滤器配置： </p>
														<pre class="programlisting"> &lt;filter&gt;<br />    &lt;filter-name&gt;Set Character Encoding&lt;/filter-name&gt;<br />    &lt;filter-class&gt;filters.SetCharacterEncodingFilter&lt;/filter-class&gt;<br />    &lt;init-param&gt;<br />      &lt;param-name&gt;encoding&lt;/param-name&gt;<br />      &lt;param-value&gt;gb2312&lt;/param-value&gt;<br />    &lt;/init-param&gt;<br />  &lt;/filter&gt;<br />  &lt;filter-mapping&gt;<br />    &lt;filter-name&gt;Set Character Encoding&lt;/filter-name&gt;<br />    &lt;url-pattern&gt;/*&lt;/url-pattern&gt;<br />  &lt;/filter-mapping&gt;<br /></pre>
												</li>
										</ol>
								</div>
						</div>
						<div class="section" lang="en">
								<div class="titlepage">
										<div>
												<div>
														<h2 class="title" style="clear: both;">
																<a name="d0e67">
																</a>3. 导出时中文文件名乱码</h2>
												</div>
										</div>
								</div>
								<p>Q：关于导出时中文文件名为乱码的问题</p>
								<p>A: 这是个bug，建议使用英文文件名，主要原因还是编码问题。我们现在正在想办法解决。</p>
						</div>
						<div class="section" lang="en">
								<div class="titlepage">
										<div>
												<div>
														<h2 class="title" style="clear: both;">
																<a name="d0e74">
																</a>4. 导出时文件内容乱码</h2>
												</div>
										</div>
								</div>
								<p>Q：导出时文件内容乱码</p>
								<p>A:首先请确认使用的是extremecomponents-1.0.1-M5-A4版以后的版本 </p>
								<div class="orderedlist">
										<ol type="1">
												<li>Excle： 导出为Excle的中文问题已经修正，默认的情况下支持导出中文，用户不需要任何改动
</li>
												<li>PDF ： 由于extremecomponents使用了FOP来生成PDF文件，FOP在导出中文内容时会产生乱码。具体的解决方案 大家可以参考<a href="../archive/2006/03/10/34717.html" target="_top">最新eXtremeComponents包：支持 PDF中文导出</a></li>
										</ol>
								</div>
						</div>
						<div class="section" lang="en">
								<div class="titlepage">
										<div>
												<div>
														<h2 class="title" style="clear: both;">
																<a name="d0e89">
																</a>5. 变量命名问题</h2>
												</div>
										</div>
								</div>
								<p>Q：当变量名为"action"，在IE下执行产生javascript错误</p>
								<p>A: 
内部使用了一些关键字，就目前我所知的为"action"、"submit"。建议大家命名时尽量避免，如果大家必须使用，则可以使用table标签的autoIncludeParameters参数设置为"false": 
</p>
								<pre class="programlisting">autoIncludeParameters="false"</pre>
						</div>
						<div class="section" lang="en">
								<div class="titlepage">
										<div>
												<div>
														<h2 class="title" style="clear: both;">
																<a name="d0e99">
																</a>6. 格式化输出表单中的数据</h2>
												</div>
										</div>
								</div>
								<p>Q：怎么样格式化输出表单中的数据</p>
								<p>A: 你可以设置列的cell： </p>
								<div class="orderedlist">
										<ol type="1">
												<li>日期格式化： cell = " date " format = " yyyy-MM-dd "
</li>
												<li>数字格式化： cell="currency" format="###,###,##0.00"</li>
										</ol>
								</div>
								<p>详细信息请参考指南 </p>
						</div>
						<div class="section" lang="en">
								<div class="titlepage">
										<div>
												<div>
														<h2 class="title" style="clear: both;">
																<a name="d0e112">
																</a>7. 加入链接</h2>
												</div>
										</div>
								</div>
								<p>Q：怎么样加入链接</p>
								<p>A: 你可以参考下例: </p>
								<pre class="programlisting">            &lt;ec:table<br />    var="pres"<br />    items="presidents"<br />    action="${pageContext.request.contextPath}/compact.run"<br />    imagePath="${pageContext.request.contextPath}/images/table/compact/*.gif"<br />    view="compact"<br />    title="Compact Toolbar View"<br />    showTooltips="false"<br />    &gt;<br />      &lt;ec:exportPdf<br />           fileName="output.pdf"<br />           tooltip="Export PDF"<br />           headerColor="black"<br />           headerBackgroundColor="#b6c2da"<br />           headerTitle="Presidents"<br />           text="PDF"<br />           /&gt;<br />      &lt;ec:exportXls<br />           fileName="output.xls"<br />           tooltip="Export Excel"<br />           text="XLS"<br />           /&gt;<br />        &lt;ec:row&gt;<br />            &lt;ec:column property="fullName" title="Name"&gt;<br />               &lt;a href="http://www.whitehouse.gov/history/presidents/"&gt;${pres.fullName}&lt;/a&gt;<br />            &lt;/ec:column&gt;<br />            &lt;ec:column property="nickName"/&gt;<br />            &lt;ec:column property="term"/&gt;<br />            &lt;ec:column property="born" cell="date"/&gt;<br />            &lt;ec:column property="died" cell="date"/&gt;<br />            &lt;ec:column property="career"/&gt;<br />        &lt;/ec:row&gt;<br />  &lt;/ec:table&gt;<br /></pre>
						</div>
						<div class="section" lang="en">
								<div class="titlepage">
										<div>
												<div>
														<h2 class="title" style="clear: both;">
																<a name="d0e122">
																</a>8. 行高亮显示</h2>
												</div>
										</div>
								</div>
								<p>Q: 我想使用行的高亮显示如何设置 </p>
								<p>A: 你只需要设置行标签的highlightRow属性： 
highlightRow="true"。eXtremeComponents提供了很多接口允许用户按照自己的习惯来进行定制,包括：CSS、CELL、View。相关信息请参考指南。 
</p>
						</div>
				</div>
		</div>
		<div id="stickies-count" style="display: none;">0</div>
<img src ="http://www.blogjava.net/lucky/aggbug/38474.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-03-31 14:07 <a href="http://www.blogjava.net/lucky/archive/2006/03/31/38474.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>AJAX enabled eXtremeTable Tutorial</title><link>http://www.blogjava.net/lucky/archive/2006/03/27/37625.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Mon, 27 Mar 2006 08:12:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/03/27/37625.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/37625.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/03/27/37625.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/37625.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/37625.html</trackback:ping><description><![CDATA[
		<p>
				<i>work in progress</i>
		</p>
		<p>
				<br />
Using AJAX with the eXtremeTable is a very simple and natural extension
to the existing functionality. Probably the best thing about the AJAX
integration is there is no integration at all. You are free to use
whatever AJAX toolkit you want. All you need to do is tell the
eXtremeTable what javascript to use when a table action is invoked. The
table actions meaning the filtering, sorting, paging, rows displayed
and exporting.
</p>
		<p>For my example I will be using the ultra cool <a href="http://getahead.ltd.uk/dwr/" class="external text" title="http://getahead.ltd.uk/dwr/" rel="nofollow">DWR</a>
toolkit. As will be demonstrated, the glue code required by DWR is very
minimal, which leaves us to just worry about constructing the table.
You can see the working <a href="http://extremecomponents.org/extremesite/assembler.run" class="external text" title="http://extremecomponents.org/extremesite/assembler.run" rel="nofollow">example</a> in action on the site!
</p>
		<table id="toc" class="toc">
				<tbody>
						<tr>
								<td>
										<ul style="display: none;">
												<li class="toclevel-1">
														<a href="http://extremecomponents.org/wiki/index.php/AJAX_enabled_eXtremeTable_Tutorial#Assembler_Example">
																<span class="tocnumber">1</span>
																<span class="toctext">Assembler Example</span>
														</a>
														<br />
														<br />
														<br />
												</li>
												<li class="toclevel-1">
														<a href="http://extremecomponents.org/wiki/index.php/AJAX_enabled_eXtremeTable_Tutorial#Setup_DWR">
																<span class="tocnumber">2</span>
																<span class="toctext">Setup DWR</span>
														</a>
														<br />
														<br />
														<br />
												</li>
												<li class="toclevel-1">
														<a href="http://extremecomponents.org/wiki/index.php/AJAX_enabled_eXtremeTable_Tutorial#Create_POJO">
																<span class="tocnumber">3</span>
																<span class="toctext">Create POJO</span>
														</a>
														<br />
														<br />
														<br />
												</li>
												<li class="toclevel-1">
														<a href="http://extremecomponents.org/wiki/index.php/AJAX_enabled_eXtremeTable_Tutorial#Controller">
																<span class="tocnumber">4</span>
																<span class="toctext">Controller</span>
														</a>
														<br />
														<br />
														<br />
												</li>
												<li class="toclevel-1">
														<a href="http://extremecomponents.org/wiki/index.php/AJAX_enabled_eXtremeTable_Tutorial#JSP">
																<span class="tocnumber">5</span>
																<span class="toctext">JSP</span>
														</a>
														<br />
														<br />
														<br />
												</li>
												<li class="toclevel-1">
														<a href="http://extremecomponents.org/wiki/index.php/AJAX_enabled_eXtremeTable_Tutorial#Conclusion">
																<span class="tocnumber">6</span>
																<span class="toctext">Conclusion</span>
														</a>
														<br />
														<br />
														<br />
												</li>
										</ul>
										<br />
								</td>
						</tr>
				</tbody>
		</table>
		<p>
				<script type="text/javascript"><![CDATA[if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } ]]&gt;</script>
		</p>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=AJAX_enabled_eXtremeTable_Tutorial&amp;action=edit&amp;section=1" title="AJAX enabled eXtremeTable Tutorial">edit</a>]</div>
		<a name="Assembler_Example">
		</a>
		<h3> Assembler Example </h3>
		<p>For this example you will need to setup the DWR toolkit, create the
POJO to build the table, and make up the JSP that contains the
eXtremeTable.
</p>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=AJAX_enabled_eXtremeTable_Tutorial&amp;action=edit&amp;section=2" title="AJAX enabled eXtremeTable Tutorial">edit</a>]</div>
		<a name="Setup_DWR">
		</a>
		<h3> Setup DWR </h3>
		<p>The first thing to do is <a href="http://getahead.ltd.uk/dwr/download" class="external text" title="http://getahead.ltd.uk/dwr/download" rel="nofollow">download</a> the DWR toolkit. You should read the instructions on the site, but the following is what I needed to do to get things working:
</p>
		<ul>
				<li> Place the dwr-1.1.jar into the WEB-INF/lib directory
</li>
				<li> Create a dwr.xml file and place it in the WEB-INF directory
</li>
		</ul>
		<pre>&lt;!DOCTYPE dwr PUBLIC<br />    "-//GetAhead Limited//DTD Direct Web Remoting 1.0//EN"<br />    "http://www.getahead.ltd.uk/dwr/dwr10.dtd"&gt;<br /><br />&lt;dwr&gt;<br />  &lt;allow&gt;<br />    &lt;create creator="new" javascript="Assembler"&gt;<br />      &lt;param name="class" value="org.extremesite.controller.Assembler"/&gt;<br />      &lt;include method="getTable"/&gt;<br />    &lt;/create&gt;<br />  &lt;/allow&gt;<br />  &lt;signatures&gt;<br />    &lt;![CDATA[<br />       import java.util.Map;<br />       import java.util.List;<br />       import org.extremesite.controller.Assembler;<br />       import javax.servlet.http.HttpServletRequest;<br />       Assembler.getTable(Map&lt;String, List&gt; parameterMap, HttpServletRequest request);<br />       ]]&gt;<br />  &lt;/signatures&gt;<br />&lt;/dwr&gt;<br /></pre>
		<p>In a nutshell the create tag allows you to reference the POJO that
builds the table, along with the method to invoke. The signature tag
declares what the actual types are for the method that is invoked. In
this example the Assembler class getTable method will be called by
passing in a Map, with the form parameters, along with the
HttpServletRequest.
</p>
		<ul>
				<li> Reference the DWR servlet in the WEB-INF/web.xml file
</li>
		</ul>
		<pre>  &lt;servlet&gt;<br />    &lt;servlet-name&gt;dwr-invoker&lt;/servlet-name&gt;<br />    &lt;display-name&gt;DWR Servlet&lt;/display-name&gt;<br />    &lt;servlet-class&gt;uk.ltd.getahead.dwr.DWRServlet&lt;/servlet-class&gt;<br />    &lt;init-param&gt;<br />       &lt;param-name&gt;debug&lt;/param-name&gt;<br />       &lt;param-value&gt;true&lt;/param-value&gt;<br />    &lt;/init-param&gt;<br />  &lt;/servlet&gt;<br />  &lt;servlet-mapping&gt;<br />    &lt;servlet-name&gt;dwr-invoker&lt;/servlet-name&gt;<br />      &lt;url-pattern&gt;/dwr/*&lt;/url-pattern&gt;<br />  &lt;/servlet-mapping&gt;<br /></pre>
		<p>This is setting up the DWR servlet that is used to call your POJO.
There is nothing more you should have to know about the servlet other
than how to set it up here.
</p>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=AJAX_enabled_eXtremeTable_Tutorial&amp;action=edit&amp;section=3" title="AJAX enabled eXtremeTable Tutorial">edit</a>]</div>
		<a name="Create_POJO">
		</a>
		<h3> Create POJO </h3>
		<p>DWR works with POJOs. This works great for our needs because the
eXtremeTable has a full API that feels very much like building a table
with the JSP tags. In fact the JSP tags are merely a front end for the
eXtremeTable Java API. First I will show the method that builds the
table. </p>
		<pre>public class Assembler {<br />  private Object build(TableModel model, Collection presidents) throws Exception {<br />    Table table = model.getTableInstance();<br />    table.setTableId("assembler");<br />    table.setItems(presidents);<br />    table.setAction(model.getContext().getContextPath() + "/assembler.run");<br />    table.setTitle("Presidents");<br />    table.setOnInvokeAction("buildTable('assembler')");<br />    model.addTable(table);<br /><br />    Export export = model.getExportInstance();<br />    export.setView(TableConstants.VIEW_XLS);<br />    export.setViewResolver(TableConstants.VIEW_XLS);<br />    export.setImageName(TableConstants.VIEW_XLS);<br />    export.setText(TableConstants.VIEW_XLS);<br />    export.setFileName("output.xls");<br />    model.addExport(export);<br /><br />    Row row = model.getRowInstance();<br />    row.setHighlightRow(Boolean.FALSE);<br />    model.addRow(row);<br /><br />    Column columnName = model.getColumnInstance();<br />    columnName.setProperty("fullName");<br />    columnName.setIntercept((AssemblerIntercept.class).getName());<br />    model.addColumn(columnName);<br /><br />    Column columnNickName = model.getColumnInstance();<br />    columnNickName.setProperty("nickName");<br />    model.addColumn(columnNickName);<br /><br />    Column columnTerm = model.getColumnInstance();<br />    columnTerm.setProperty("term");<br />    model.addColumn(columnTerm);<br /><br />    Column columnBorn = model.getColumnInstance();<br />    columnBorn.setProperty("born");<br />    columnBorn.setCell(TableConstants.DATE);<br />    model.addColumn(columnBorn);<br /><br />    Column columnDied = model.getColumnInstance();<br />    columnDied.setProperty("died");<br />    columnDied.setCell(TableConstants.DATE);<br />    model.addColumn(columnDied);<br /><br />    Column columnCareer = model.getColumnInstance();<br />    columnCareer.setProperty("career");<br />    model.addColumn(columnCareer);<br /><br />    return model.assemble();<br />  }<br />}<br /></pre>
		<p>Most of this code should be very self explanatory. You will see how
to build a TableModel in a second, but first you will notice that it is
the only object you will have to interact with to build the table. The
first step to building a table is use the TableModel to create the
Table, Row, Column and Export. Once you create one of the model objects
it needs to be added to the model. Until you actually add it the
TableModel, the model will not use it. Once you have everything
constructed then call model.assemble(); to build the table.
</p>
		<p>Probably the most interesting call is <b>table.setOnInvokeAction("buildTable('assembler')");</b>.
This is the javascript method that will be called when you invoke any
of the table actions (paging, filtering, sorting, etc..). If the table
onInvokeAction is left blank the default javascript method is to submit
the form that wraps the eXtremeTable, just like you would expect.
</p>
		<p>The other method of the Assembler class is getTable().
</p>
		<pre>public class Assembler {<br />  public String getTable(Map parameterMap, HttpServletRequest request) {<br />    WebApplicationContext webApplicationContext = WebApplicationContextUtils.getWebApplicationContext(request.getSession().getServletContext());<br /><br />    PresidentsDao presidentsDao = (PresidentsDao) webApplicationContext.getBean("presidentsDao");<br />    Collection presidents = presidentsDao.getPresidents();<br /><br />    Context context = null;<br />    if (parameterMap == null) {<br />      context = new HttpServletRequestContext(request);<br />    } else {<br />      context = new HttpServletRequestContext(request, parameterMap);<br />    }<br /><br />    TableModel model = new TableModelImpl(context);<br />    try {<br />      return build(model, presidents).toString();<br />    } catch (Exception e) {<br />      e.printStackTrace();<br />    }<br /><br />    return "";<br />  }<br />}<br /></pre>
		<p>This method is a little busy, but it is doing double duty. It needs
to be called the first time by the Controller (if using Spring). <i>If you use Struts this is the equivalent of the Action class.</i>
Then, when using AJAX, this method also needs to be called, but this
time passing in a custom parameterMap. The parameterMap will contain
all the parameters for the eXtremeTable using AJAX. This should become
more clear once you see the Controller and the JSP.
</p>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=AJAX_enabled_eXtremeTable_Tutorial&amp;action=edit&amp;section=4" title="AJAX enabled eXtremeTable Tutorial">edit</a>]</div>
		<a name="Controller">
		</a>
		<h3> Controller </h3>
		<pre>public class AssemblerController extends AbstractController {<br />  public String successView;<br /><br />  public void setSuccessView(String successView) {<br />    this.successView = successView;<br />  }<br /><br />  protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {<br />    ModelAndView mv = new ModelAndView(successView);<br />    Assembler assembler = new Assembler();<br />    Object viewData = assembler.getTable(null, request);<br />    request.setAttribute("assembler", viewData);<br />    return mv;<br />  }<br />}<br /></pre>
		<p>The controller is called the first time to initially build the
table. It calls the POJO and then passes the table to the request.
Notice how null is sent in for the parameterMap. This is because the
first time the table is built there are no table actions the table
needs to be aware of.
</p>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=AJAX_enabled_eXtremeTable_Tutorial&amp;action=edit&amp;section=5" title="AJAX enabled eXtremeTable Tutorial">edit</a>]</div>
		<a name="JSP">
		</a>
		<h3> JSP </h3>
		<p>Start constructing the JSP by importing the proper javascript files.
The only javascript file you need to include in your project is the
extremecomponents.js. The other declarations are used by DWR.
</p>
		<pre>  &lt;script type="text/javascript" src="&lt;c:url value="/dwr/interface/Assembler.js"/&gt;"&gt;&lt;/script&gt;<br />  &lt;script type="text/javascript" src="&lt;c:url value="/dwr/engine.js"/&gt;"&gt;&lt;/script&gt;<br />  &lt;script type="text/javascript" src="&lt;c:url value="/dwr/util.js"/&gt;"&gt;&lt;/script&gt;<br />  &lt;script type="text/javascript" src="&lt;c:url value="/js/extremecomponents.js"/&gt;"&gt;&lt;/script&gt;<br /></pre>
		<p>Then put in the hook to display the table. The div is used to call the innerHtml and stream the new markup.
</p>
		<pre>  &lt;div id="tableDiv"&gt;<br />    &lt;c:out value="${assembler}" escapeXml="false"/&gt; <br />  &lt;/div&gt;<br /></pre>
		<p>Lastly, declare the javascript to call the DWR hooks. 
</p>
		<pre>&lt;script type="text/javascript"&gt;<br />  function buildTable(form) {<br />    var parameterMap = getParameterMap(form);   <br />    Assembler.getTable(parameterMap, showTable);<br />  }<br /><br />  function showTable(table) {<br />    document.getElementById('tableDiv').innerHTML=table;<br />  }<br />&lt;/script&gt;<br /></pre>
		<p>The getParameterMap() method is included in the extremecomponents.js
file and will grab all the form parameters. You need to pass in a
reference to the form id that wraps the eXtremeTable. Remember that the
eXtremeTable is essentially a form component and the tableid is used as
the form id. By default the tableId is ec, but you usually want to set
a tableId so that code is easier to follow for people reading your
code. With the parameterMap you will then call the POJO getTable
method. The showTable is a callback that tells DWR what to call when it
returns from the getTable() method.
</p>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=AJAX_enabled_eXtremeTable_Tutorial&amp;action=edit&amp;section=6" title="AJAX enabled eXtremeTable Tutorial">edit</a>]</div>
		<a name="Conclusion">
		</a>
		<h3> Conclusion </h3>
		<p>This tutorial described the steps needed to get the eXtremeTable
working with AJAX. One of the main things to keep in mind is there is
no actual integration with AJAX. You simply tell the eXtremeTable what
javascript to call when one of the table actions is invoked. The other
thing to get from this example is that the DWR toolkit works with POJOs
and can be easily used with any framework.
</p>
		<div id="stickies-count" style="display: none;">0</div>
<img src ="http://www.blogjava.net/lucky/aggbug/37625.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-03-27 16:12 <a href="http://www.blogjava.net/lucky/archive/2006/03/27/37625.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>extremeComponents使用AJAX 指南</title><link>http://www.blogjava.net/lucky/archive/2006/03/27/37623.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Mon, 27 Mar 2006 08:09:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/03/27/37623.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/37623.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/03/27/37623.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/37623.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/37623.html</trackback:ping><description><![CDATA[
		<h2>AJAX 指南</h2>
		<p>
				<i>进行中...</i>
		</p>
		<p>
				<br />
在eXtremeTable中使用AJAX非常简单，对现有功能的扩展也非常方便。
AJAX整合一个最强大的地方是它不需要整合。你可以自由地使用任何你想要使用的AJAX工具包。所有你要做的就是：当表的action被调用时，告诉
eXtremeTable使用什么javascript。表的actions包括：过滤、排序、分页、显示的行数和导出。
</p>
		<p>在我自己的示例中我将使用非常酷的<a href="http://getahead.ltd.uk/dwr/" class="external text" title="http://getahead.ltd.uk/dwr/" rel="nofollow">DWR</a>工具包。DWR 需要的粘合代码非常少，这样我们只需要关注如何构建表。你可以通过本站<a href="http://extremecomponents.org/extremesite/assembler.run" class="external text" title="http://extremecomponents.org/extremesite/assembler.run" rel="nofollow">示例</a>看到效果!
</p>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=Simplified_Chinese_Tutorials_AJAX&amp;action=edit&amp;section=3" title="Simplified Chinese Tutorials AJAX">edit</a>]</div>
		<a name="Assembler_Example">
		</a>
		<h3> Assembler Example </h3>
		<p>本示例中将需要安装DWR工具包，创建POJO来构造表并创建包含eXtremeTable的JSP页面。
</p>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=Simplified_Chinese_Tutorials_AJAX&amp;action=edit&amp;section=4" title="Simplified Chinese Tutorials AJAX">edit</a>]</div>
		<a name=".E5.AE.89.E8.A3.85DWR">
		</a>
		<h3> 安装DWR </h3>
		<p>首先要做的就是<a href="http://getahead.ltd.uk/dwr/download" class="external text" title="http://getahead.ltd.uk/dwr/download" rel="nofollow">下载</a>DWR工具包。你应该浏览网站的使用说明，不过下面是我让它符合我的需要来工作所进行的操作:
</p>
		<ul>
				<li> 将dwr-1.1.jar拷贝到WEB-INF/lib目录
</li>
				<li> 在WEB-INF目录下创建一个dwr.xml文件
</li>
		</ul>
		<pre>&lt;!DOCTYPE dwr PUBLIC<br />    "-//GetAhead Limited//DTD Direct Web Remoting 1.0//EN"<br />    "http://www.getahead.ltd.uk/dwr/dwr10.dtd"&gt;<br /><br />&lt;dwr&gt;<br />  &lt;allow&gt;<br />    &lt;create creator="new" javascript="Assembler"&gt;<br />      &lt;param name="class" value="org.extremesite.controller.Assembler"/&gt;<br />      &lt;include method="getTable"/&gt;<br />    &lt;/create&gt;<br />  &lt;/allow&gt;<br />  &lt;signatures&gt;<br />    &lt;![CDATA[<br />       import java.util.Map;<br />       import java.util.List;<br />       import org.extremesite.controller.Assembler;<br />       import javax.servlet.http.HttpServletRequest;<br />       Assembler.getTable(Map&lt;String, List&gt; parameterMap, HttpServletRequest request);<br />       ]]&gt;<br />  &lt;/signatures&gt;<br />&lt;/dwr&gt;<br /></pre>
		<p>简而言之（In a
nutshell）创建（create）标签允许当方法被调用时，参照构建表需要的POJO。签名（signature）标签声明了被调用方法使用的实际
类型。 本示例的Assembler类的getTable方法将通过传入一个Map（包含form参数）和HttpServletRequest。
</p>
		<ul>
				<li> 在WEB-INF/web.xml中对DWR servlet进行声明
</li>
		</ul>
		<pre>  &lt;servlet&gt;<br />    &lt;servlet-name&gt;dwr-invoker&lt;/servlet-name&gt;<br />    &lt;display-name&gt;DWR Servlet&lt;/display-name&gt;<br />    &lt;servlet-class&gt;uk.ltd.getahead.dwr.DWRServlet&lt;/servlet-class&gt;<br />    &lt;init-param&gt;<br />       &lt;param-name&gt;debug&lt;/param-name&gt;<br />       &lt;param-value&gt;true&lt;/param-value&gt;<br />    &lt;/init-param&gt;<br />  &lt;/servlet&gt;<br />  &lt;servlet-mapping&gt;<br />    &lt;servlet-name&gt;dwr-invoker&lt;/servlet-name&gt;<br />      &lt;url-pattern&gt;/dwr/*&lt;/url-pattern&gt;<br />  &lt;/servlet-mapping&gt;<br /></pre>
		<p>以上就完成了DWR servlet的设置，它被用来调用你的POJO。除了设置它，你不需要对这个servlet有更多的了解。
</p>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=Simplified_Chinese_Tutorials_AJAX&amp;action=edit&amp;section=5" title="Simplified Chinese Tutorials AJAX">edit</a>]</div>
		<a name=".E5.88.9B.E5.BB.BAPOJO">
		</a>
		<h3> 创建POJO </h3>
		<p>DWR使用（works with）POJOs。这个非常符合我们的需要，因为eXtremeTable有足够的API使用Jsp标签来构造表。实际上，JSP标签只不过是eXtremeTable Java API的前端。首先，我将展示构造表的方法：
</p>
		<pre>public class Assembler {<br />  private Object build(TableModel model, Collection presidents) throws Exception {<br />    Table table = model.getTableInstance();<br />    table.setTableId("assembler");<br />    table.setItems(presidents);<br />    table.setAction(model.getContext().getContextPath() + "/assembler.run");<br />    table.setTitle("Presidents");<br />    table.setOnInvokeAction("buildTable('assembler')");<br />    model.addTable(table);<br /><br />    Export export = model.getExportInstance();<br />    export.setView(TableConstants.VIEW_XLS);<br />    export.setViewResolver(TableConstants.VIEW_XLS);<br />    export.setImageName(TableConstants.VIEW_XLS);<br />    export.setText(TableConstants.VIEW_XLS);<br />    export.setFileName("output.xls");<br />    model.addExport(export);<br /><br />    Row row = model.getRowInstance();<br />    row.setHighlightRow(Boolean.FALSE);<br />    model.addRow(row);<br /><br />    Column columnName = model.getColumnInstance();<br />    columnName.setProperty("fullName");<br />    columnName.setIntercept((AssemblerIntercept.class).getName());<br />    model.addColumn(columnName);<br /><br />    Column columnNickName = model.getColumnInstance();<br />    columnNickName.setProperty("nickName");<br />    model.addColumn(columnNickName);<br /><br />    Column columnTerm = model.getColumnInstance();<br />    columnTerm.setProperty("term");<br />    model.addColumn(columnTerm);<br /><br />    Column columnBorn = model.getColumnInstance();<br />    columnBorn.setProperty("born");<br />    columnBorn.setCell(TableConstants.DATE);<br />    model.addColumn(columnBorn);<br /><br />    Column columnDied = model.getColumnInstance();<br />    columnDied.setProperty("died");<br />    columnDied.setCell(TableConstants.DATE);<br />    model.addColumn(columnDied);<br /><br />    Column columnCareer = model.getColumnInstance();<br />    columnCareer.setProperty("career");<br />    model.addColumn(columnCareer);<br /><br />    return model.assemble();<br />  }<br />}<br /></pre>
		<p>上面的大部分代码是自解释性的，你将在下面看到如何构造一个TableModel，但是首先你应该注意到TableModel是构造表时需要交互的
唯一对象。构造表的第一步就是使用TableModel来创建Table、Row、Column和Export。
一旦你创建了一个model对象，你只需要将它添加到model中。除非你将它添加到TableModel，否则的话model将不会是用它。所有东西已
经构建好后，你只需要调用model.assemble()方法来构造表了。
</p>
		<p>可能<b>table.setOnInvokeAction("buildTable('assembler')");</b>是最有趣的调用。当你使用表的actions(翻页、过滤、排序......)，这个javascript方法将被调用。如果表的onInvokeAction空白，则默认的javascript方法将被提交（submit） ，正如你所期望的那样。
</p>
		<p>Assembler类的另一个方法---getTable()：
</p>
		<pre>public class Assembler {<br />  public String getTable(Map parameterMap, HttpServletRequest request) {<br />    WebApplicationContext webApplicationContext = WebApplicationContextUtils.getWebApplicationContext(request.getSession().getServletContext());<br /><br />    PresidentsDao presidentsDao = (PresidentsDao) webApplicationContext.getBean("presidentsDao");<br />    Collection presidents = presidentsDao.getPresidents();<br /><br />    Context context = null;<br />    if (parameterMap == null) {<br />      context = new HttpServletRequestContext(request);<br />    } else {<br />      context = new HttpServletRequestContext(request, parameterMap);<br />    }<br /><br />    TableModel model = new TableModelImpl(context);<br />    try {<br />      return build(model, presidents).toString();<br />    } catch (Exception e) {<br />      e.printStackTrace();<br />    }<br /><br />    return "";<br />  }<br />}<br /></pre>
		<p>这个方法调用比较频繁，它执行双重职责。它需要被Controller（如果使用Spring的话）在第一次调用，<i>如果使用Struts就等同于Action类。</i> 随后，
当使用AJAX时，这个方法也需要被调用，但是这次将传入一个定制的parameterMap。parameterMap将包含eXtremeTable使用AJAX需要的所有参数。当你看了 Controller和JSP后，这点将更加清晰。
</p>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=Simplified_Chinese_Tutorials_AJAX&amp;action=edit&amp;section=6" title="Simplified Chinese Tutorials AJAX">edit</a>]</div>
		<a name="Controller">
		</a>
		<h3> Controller </h3>
		<pre>public class AssemblerController extends AbstractController {<br />  public String successView;<br /><br />  public void setSuccessView(String successView) {<br />    this.successView = successView;<br />  }<br /><br />  protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {<br />    ModelAndView mv = new ModelAndView(successView);<br />    Assembler assembler = new Assembler();<br />    Object viewData = assembler.getTable(null, request);<br />    request.setAttribute("assembler", viewData);<br />    return mv;<br />  }<br />}<br /></pre>
		<p>controller在被第一次调用时来构建表。它调用POJO并将表传给request。注意空值（null）如何使用parameterMap传输。这是因为第一次表被构造时，没有对应表需要知道的actions。
</p>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=Simplified_Chinese_Tutorials_AJAX&amp;action=edit&amp;section=7" title="Simplified Chinese Tutorials AJAX">edit</a>]</div>
		<a name="JSP">
		</a>
		<h3> JSP </h3>
		<p>通过引入(importing)合适的javascript文件来开始构建JSP页面。唯一需要包含进工程的javascript文件是extremecomponents.js，其它的javascript文件申明都是DWR使用的。
</p>
		<pre>  &lt;script type="text/javascript" src="&lt;c:url value="/dwr/interface/Assembler.js"/&gt;"&gt;&lt;/script&gt;<br />  &lt;script type="text/javascript" src="&lt;c:url value="/dwr/engine.js"/&gt;"&gt;&lt;/script&gt;<br />  &lt;script type="text/javascript" src="&lt;c:url value="/dwr/util.js"/&gt;"&gt;&lt;/script&gt;<br />  &lt;script type="text/javascript" src="&lt;c:url value="/js/extremecomponents.js"/&gt;"&gt;&lt;/script&gt;<br /></pre>
		<p>接着，插入钩子（hook)来显示表，div被用来调用innerHtml并构建新的标签。
</p>
		<pre>  &lt;div id="tableDiv"&gt;<br />    &lt;c:out value="${assembler}" escapeXml="false"/&gt; <br />  &lt;/div&gt;<br /></pre>
		<p>最后，添加javascript来调用DWR的钩子（hooks）。 
</p>
		<pre>&lt;script type="text/javascript"&gt;<br />  function buildTable(form) {<br />    var parameterMap = getParameterMap(form);   <br />    Assembler.getTable(parameterMap, showTable);<br />  }<br /><br />  function showTable(table) {<br />    document.getElementById('tableDiv').innerHTML=table;<br />  }<br />&lt;/script&gt;<br /></pre>
		<p>getParameterMap()方法包含在extremecomponents.js文件中，将的到所有的form参数。你需要传入一个
form id的参照。记住，eXtremeTable本质上是一个form组建，tableid作为form
id使用。默认的tableId为ec，但是你通常想要设置tableId，以示大家能更容易阅读你的代码。你将使用parameterMap调用
POJO的getTable方法。showTable是一个callback告诉DWR当从getTable()方法返回时将调用什么操作。
</p>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=Simplified_Chinese_Tutorials_AJAX&amp;action=edit&amp;section=8" title="Simplified Chinese Tutorials AJAX">edit</a>]</div>
		<a name=".E7.BB.93.E8.AE.BA">
		</a>
		<h3> 结论 </h3>
		<p>本指南描述了在eXtremeTable中使用AJAX所需要的步骤。需要留心的一个主要事情是没有和AJAX发生实际整合。当表的actions
被使用是，你只需要简单地告诉eXtremeTable什么javascript将被调yong。另一个事情是，通过本示例我们可以知道DWR工具包使用
POJOs并能够简单地被任何框架使用。
</p>
<img src ="http://www.blogjava.net/lucky/aggbug/37623.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-03-27 16:09 <a href="http://www.blogjava.net/lucky/archive/2006/03/27/37623.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>eXtremeComponents相关（2006-03-22)</title><link>http://www.blogjava.net/lucky/archive/2006/03/22/36893.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Wed, 22 Mar 2006 09:59:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/03/22/36893.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/36893.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/03/22/36893.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/36893.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/36893.html</trackback:ping><description><![CDATA[    这两天完成的工作:<br />    1)导出Totals的工作已经完成，对应JIRA的issueET-55已经closed。<br />    2）翻译了M5升级说明<br />    3)在论坛上帮一个印度开发人员解决导出PDF的页标题和页脚的问题。<br />   这两天Jeff在闭门练功，eXtremeComponents论坛上也看不见他的踪影（这是少有的事），好不容易今天收到他的一份mail： 他现在正在整理文档，特别是AJAX方面的指南，从现在(M5-A4)开始到release都应该不会增加什么新的令人兴奋的特性，AJAX已经足够让Jeff兴奋一阵了，剩下的工作就是把JIRA上提到的东西，进行修正。刚从JIRA上check了一个Issue，这两天争取对应完。<br />   头晕，今天早点睡觉。<br />   <br />   <br /><div id="stickies-count" style="display: none;">0</div><img src ="http://www.blogjava.net/lucky/aggbug/36893.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-03-22 17:59 <a href="http://www.blogjava.net/lucky/archive/2006/03/22/36893.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>eXtremeComponents1.0.1-M5-A4版中，中国程序员可能最关注的特性</title><link>http://www.blogjava.net/lucky/archive/2006/03/21/36565.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Tue, 21 Mar 2006 02:03:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/03/21/36565.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/36565.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/03/21/36565.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/36565.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/36565.html</trackback:ping><description><![CDATA[
		<p>
				<font size="5">    </font>
				<font size="4"> eXtremeComponents的作者Jeff，前天release了在正式Release版之前的最后一个开发者版：eXtremeComponents1.0.1-M5-A4，相关的对于M4的升级以及新增特性，大家可以参照<a id="_3f13f614c8c3_HomePageDays_DaysList_ctl01_DayItem_DayList_ctl00_TitleUrl" class="postTitle2" href="../archive/2006/03/20/36324.html">M5 Release</a>或<a id="_3f13f614c8c3_HomePageDays_DaysList_ctl00_DayItem_DayList_ctl00_TitleUrl" class="postTitle2" href="../archive/2006/03/21/36543.html">1.0.1-M5-A4升级说明(M5 Release翻译稿）</a>。我下面列出的是我自己认为的我们中国程序员最关注的新的特性。至于更多信息大家可以参考上面两篇文档，或浏览<a id="SingleColumn1_Categories_CatList_ctl04_LinkList_ctl01_Link" class="listitem" href="http://www.extremecomponents.org/extremesite/welcome.jsp">eXtremeComponents</a>网站。</font>
		</p>
		<div class="postTitle">
		</div>
		<p>
				<font size="4">
						<br />
				</font>
		</p>
		<p>
				<font size="4">1）导出EXCLE文件时的本地语言的支持</font>
		</p>
		<p>
				<font size="4">        默认的XlsView使用UTF-16编码，这样能够支持对于双字节语言导出。如果要使用unicode，你可以设置 
ExportTag的新的encoding属性，这个属性接受的值为：UTF和UNICODE。</font>
		</p>
		<p>
				<font size="4">
						<br />
				</font>
		</p>
		<p>
				<font size="4">2) 导出PDF文件时的本地语言的支持<br />       eXtremeComponents使用FOP来导出PDF文件，现在eXtremeComponents能够根据支持FOP对于导出双字节语言PDF的应用，具体操作请参照<a id="_3f13f614c8c3_HomePageDays_DaysList_ctl06_DayItem_DayList_ctl00_TitleUrl" class="postTitle2" href="../archive/2006/03/10/34717.html">最新eXtremeComponents包：支持 PDF中文导出</a></font>
		</p>
		<p>
				<font size="4">3）AJAX特性</font>
		</p>
		<p>
				<font size="4">        eXtremeComponents现在能够支持AJAX，这使得用户可以在不刷新页面的情况下进行相关操作。</font>
		</p>
		<p>
				<font size="4">          最新的eXtremeSite实例代码（eXtremeComponents的全站代码，包括大多数展示M5升级说明特性：Ajax、通过Java生成表......），我将在整理后放到Sina邮箱中。用户名： extremetable 密码：extremetable.</font>
		</p>
		<p>
				<font size="4">           <i><u><b>eXtremeSite使用Hsql，所以运行时不需要另外配置数据库。</b></u></i></font>
		</p>
		<p>
				<font size="5">
						<font size="4">             P.S. 刚才登录Sina邮箱，提示我这个邮箱存在技术问题（晕）。 大家可以通过eXtremeComponents网站下载最新<a id="_3f13f614c8c3_HomePageDays_DaysList_ctl06_DayItem_DayList_ctl00_TitleUrl" class="postTitle2" href="http://www.extremecomponents.org/extremesite/public/download/eXtremeSite.zip">eXtremeSite.zip</a>或从CVS中获取代码。</font>
				</font>
		</p>
		<div id="stickies-count" style="display: none;">0</div>
		<div id="stickies-count" style="display: none;">0</div>
		<div id="stickies-count" style="display: none;">0</div>
<img src ="http://www.blogjava.net/lucky/aggbug/36565.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-03-21 10:03 <a href="http://www.blogjava.net/lucky/archive/2006/03/21/36565.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>1.0.1-M5-A4升级说明(M5 Release翻译稿）</title><link>http://www.blogjava.net/lucky/archive/2006/03/21/36543.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Tue, 21 Mar 2006 01:18:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/03/21/36543.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/36543.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/03/21/36543.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/36543.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/36543.html</trackback:ping><description><![CDATA[
		<div class="chapter" lang="en">
				<div class="titlepage">
						<div>
								<div>
										<h2 class="title" style="clear: both;">
												<a name="d0e4">
												</a>1.1. 开发快照版</h2>
								</div>
						</div>
				</div>
				<div class="section" lang="en">
						<div class="titlepage">
								<div>
										<div>
										</div>
								</div>
						</div>
						<p>
								<a href="http://extremecomponents.org/extremesite/public/download/extremecomponents-1.0.1-M5-A4.zip" target="_top">extremecomponents-1.0.1-M5-A4版（下载）</a> 
是正式版发行前的最后开发快照版。这个build版所使用的代码将被下一个release版沿用。 </p>
				</div>
				<div class="section" lang="en">
						<div class="titlepage">
								<div>
										<div>
												<h2 class="title" style="clear: both;">
														<a name="d0e12">
														</a>1.2. 1.0.1-M5-A4</h2>
										</div>
								</div>
						</div>
						<p>我决定发布一个新的里程碑(milestone)版是因为我对视图(view)的代码做了一些调整，现在eXtremeTable将能够支持AJAX(而不是局部build)。 
在确认release候选版前，这些增加的大的特性能够完美地工作。</p>
						<p>下面列出的是eXtremeTable下一个里程碑（milestone）版特性和改进，我希望从上一个里程碑版升级到现在这版没有任何问题（breakage）。 
然而，在完成M4版视图实现后，我决定我必须做最后的更改...将静态builders变为具体的类。这将是唯一可能出现问题(breakage)并且 
将只影响到定制视图(定制cells也一样，但是更多的是较平和的deprecated)。尽管那样，这些更改将很容易实现。</p>
				</div>
				<div class="section" lang="en">
						<div class="titlepage">
								<div>
										<div>
												<h2 class="title" style="clear: both;">
														<a name="d0e19">
														</a>1.3. Html 
Builder类具体化</h2>
										</div>
								</div>
						</div>
						<p>所有的视图builder类具体化，需要被实例化，这些只对开发者需要创建定制试图或cells有影响。 
这是因为需要使得视图代码能够像他们需要的那样具有弹性。builder classes是静态的能够很好地工作，但是 
将来没有机会来做一些有意义的事，并且创建定制试图更加麻烦。然而，现在这些方法和原来的一样，而仅仅是需要对它进行实例化。 </p>
						<p>为了使这种转变更容易CellBuilder仍然是静态的，但是现在为deprecated。新的(非静态)builder称为ColumnBuilder，通过这个名称我们能更确切地知道什么被构建了。</p>
						<pre class="programlisting">public String getHtmlDisplay(TableModel model, Column column) {<br />		ColumnBuilder columnBuilder = new ColumnBuilder(column);<br />		columnBuilder.tdStart();<br />		columnBuilder.tdBody(getCellValue(model, column));<br />		columnBuilder.tdEnd();<br />		return columnBuilder.toString();<br />}</pre>
						<p>另一个例子，使用ColumnBuilder定制cells如下：</p>
						<pre class="programlisting">public String getHtmlDisplay(TableModel model, Column column) {<br />		InputBuilder inputBuilder = new InputBuilder(column);<br />		inputBuilder.tdStart();<br />		try {<br />			Object bean = model.getCurrentRowBean();<br />			Integer id = new Integer(BeanUtils.getProperty(bean, "id"));<br />			inputBuilder.tdBody(id);<br />		} catch (Exception e) {}<br />		inputBuilder.tdEnd();<br />		return inputBuilder.toString();<br />		}<br />		private static class InputBuilder extends ColumnBuilder {<br />		public InputBuilder(Column column) {<br />			super(column);<br />		}<br />		public void tdBody(Integer id) {<br />		 getHtmlBuilder().input("radio").name("location.id").id("location.id").value(id.toString()).onclick("populateLocationFields(this.value)");<br />		 getHtmlBuilder().xclose();<br />	    }<br />    }<br />}</pre>
						<p>这样更简洁，只需要扩展你关心的builder，并构建你定制的实现。</p>
						<p>另外toolbar被完全重构，但是这个实现被隐藏在ToolbarBuilder类的背后，所以不会有影响。</p>
						<p>最后，我探索性地增加了toolbar特性，这样可以在preferences配置表关联到不同的toolbars。 
这个特性能够用来动态构造toolbar。这将使开发者很简单地通过preferences来定义一个定制的toolbar。 
例如，一个toolbar当使用Limit定制不包含最后一页按钮，或者另一个toolbar不包含rows displayed... 
如果你要定制的就是这些东西而不需要别的新的特性，你最好等待一两个星期直到我实现完成。</p>
				</div>
				<div class="section" lang="en">
						<div class="titlepage">
								<div>
										<div>
												<h2 class="title" style="clear: both;">
														<a name="d0e38">
														</a>1.4. 新的表的showTitle属性</h2>
										</div>
								</div>
						</div>
						<p>TableTag新的showTitle属性用来确认是否现实title，这是一个boolean值默认为true。</p>
				</div>
				<div class="section" lang="en">
						<div class="titlepage">
								<div>
										<div>
												<h2 class="title" style="clear: both;">
														<a name="d0e43">
														</a>1.5. Limit现在能使用State特性</h2>
										</div>
								</div>
						</div>
						<p>Limit特性为了使用State特性，你需要使用TableLimitFactory的带有state的构造函数，当使用state 
特性时，你应该提供唯一的tableId（本例为presidents），带有state的构造函数同时也需要这个tableId。</p>
						<pre class="programlisting">		Context context = new HttpServletRequestContext(request);<br />		LimitFactory limitFactory = new TableLimitFactory(context, presidents, TableConstants.STATE_PERSIST, null);<br />		Limit limit = new TableLimit(limitFactory);<br /></pre>
				</div>
				<div class="section" lang="en">
						<div class="titlepage">
								<div>
										<div>
												<h2 class="title" style="clear: both;">
														<a name="d0e50">
														</a>1.6. 新的列的filterOptions属性/FilterOption接口</h2>
										</div>
								</div>
						</div>
						<p>TableTag新的filterOptions属性，能够接受一个filter 
options的集合，这个集合中的每个bean都实现FilterOption的 
接口。被用来和filterCell=droplist结合，当使用Limit时使用定制droplist时非常有用。</p>
				</div>
				<div class="section" lang="en">
						<div class="titlepage">
								<div>
										<div>
												<h2 class="title" style="clear: both;">
														<a name="d0e55">
														</a>1.7. 导出EXCLE文件时的本地语言的支持</h2>
										</div>
								</div>
						</div>
						<p>默认的XlsView使用UTF-16编码，这样能够支持对于双字节语言导出。如果要使用unicode，你可以设置 
ExportTag的新的encoding属性，这个属性接受的值为：UTF和UNICODE。</p>
				</div>
				<div class="section" lang="en">
						<div class="titlepage">
								<div>
										<div>
												<h2 class="title" style="clear: both;">
														<a name="d0e60">
														</a>1.8. 删除Compact视图的title的style</h2>
										</div>
								</div>
						</div>
						<p>当使用compact视图是我硬编码了表的title，这是一个bug。只需要通过CSS的titleRow属性style（或移走）title。</p>
				</div>
				<div class="section" lang="en">
						<div class="titlepage">
								<div>
										<div>
												<h2 class="title" style="clear: both;">
														<a name="d0e65">
														</a>1.9. TableModel现在变为接口</h2>
										</div>
								</div>
						</div>
						<p>TableModel现在变为接口，这只对TableAssembler产生影响。然而，正如下面提到的，使用Java代码来组装一个表将更容易。</p>
				</div>
				<div class="section" lang="en">
						<div class="titlepage">
								<div>
										<div>
												<h2 class="title" style="clear: both;">
														<a name="d0e70">
														</a>1.10. TableAssembler整合到TableModel</h2>
										</div>
								</div>
						</div>
						<p>当使用Java代码来组装一个表将更容易：</p>
						<pre class="programlisting">		TableModel model = new TableModelImpl(context);<br /><br />		Table table = new Table(model); table.setItems(presidents); table.setAction("assembler.run"); table.setTitle("Presidents"); table.setShowTooltips(Boolean.FALSE); model.addTable(table);<br /><br />		Row row = new Row(model); row.setHighlightRow(Boolean.FALSE); model.addRow(row);<br /><br />		Column columnName = new Column(model); columnName.setProperty("fullName"); columnName.setIntercept((AssemblerIntercept.class).getName()); model.addColumn(columnName);<br /><br />		Column columnNickName = new Column(model); columnNickName.setProperty("nickName"); model.addColumn(columnNickName);<br /><br />		Object view = model.assemble();</pre>
				</div>
				<div class="section" lang="en">
						<div class="titlepage">
								<div>
										<div>
												<h2 class="title" style="clear: both;">
														<a name="d0e77">
														</a>1.11. 重命名FilterSet.getValue()方法</h2>
										</div>
								</div>
						</div>
						<p>FilterSet.getValue()方法被Deprecated，重命名为FilterSet.getFilterValue()。</p>
				</div>
				<div class="section" lang="en">
						<div class="titlepage">
								<div>
										<div>
												<h2 class="title" style="clear: both;">
														<a name="d0e82">
														</a>1.12. 删除TableTag的onsubmit</h2>
										</div>
								</div>
						</div>
						<p>onsubmit被删除，因为javascript被表的所有actions使用。</p>
				</div>
				<div class="section" lang="en">
						<div class="titlepage">
								<div>
										<div>
												<h2 class="title" style="clear: both;">
														<a name="d0e87">
														</a>1.13. 总计导出</h2>
										</div>
								</div>
						</div>
						<p>PDF和XLS现在包含总计导出，你只需要和平常一样设置Calc特性。</p>
				</div>
				<div class="section" lang="en">
						<div class="titlepage">
								<div>
										<div>
												<h2 class="title" style="clear: both;">
														<a name="d0e92">
														</a>1.14. 导出错误-Response头修改</h2>
										</div>
								</div>
						</div>
						<p>过滤器的response头应该能更好地适应不同环境，在response头后添加：</p>
						<pre class="programlisting">response.setHeader("Cache-Control", "must-revalidate, post-check=0,pre-check=0");</pre>
				</div>
				<div class="section" lang="en">
						<div class="titlepage">
								<div>
										<div>
												<h2 class="title" style="clear: both;">
														<a name="d0e99">
														</a>1.15. 列标签autoGenerateColumns的Preferences</h2>
										</div>
								</div>
						</div>
						<p>autoGenerateColumns属性现在可以在Preferences文件中配置，可以使用别名来避免全路径引用。</p>
				</div>
				<div class="section" lang="en">
						<div class="titlepage">
								<div>
										<div>
												<h2 class="title" style="clear: both;">
														<a name="d0e104">
														</a>1.16. 自动转换参数</h2>
										</div>
								</div>
						</div>
						<p>Registry能够接受null、String、List或者Array作为参数，Registry将把这些转换成String[]。</p>
				</div>
				<div class="section" lang="en">
						<div class="titlepage">
								<div>
										<div>
												<h2 class="title" style="clear: both;">
														<a name="d0e109">
														</a>1.17. 表的bufferView属性</h2>
										</div>
								</div>
						</div>
						<p>表的bufferView属性，默认为true将使用视图的默认buffer。如果不需要使用buffer可以设置为false。</p>
				</div>
				<div class="section" lang="en">
						<div class="titlepage">
								<div>
										<div>
												<h2 class="title" style="clear: both;">
														<a name="d0e114">
														</a>1.18. eXtremeTable的AJAX特性</h2>
										</div>
								</div>
						</div>
						<p>当使用eXtremeTable API来通过JAVA代码来创建表时，现在可以结合AJAX技术来生成视图。这意味着 
当navigate（比如：翻页）时不需要刷新web页，这令人非常兴奋，关于这个特性的更多的文档将会出来。开发 
者能够更好地测试并使用这个特性，这个特性的真正hook是表的onInvokeAction属性，它使得javascript方法 
能够被invoked。AJAX整合一个最强大的地方是它不需要整合。下一步是使eXtremeTable有一个清晰并且易于使用的API， 
这意味着你可以使用你感兴趣的AJAX技术因为eXtremeTable没有整合一个特定的技术。现在你可以通过CVS得到eXtremeSite代码， 
它展示了一个使用AJAX的实例，它现在使用HSQL所以只需要下载并直接运行。请暂时不要向我询问更多的文档，我现在正在整理 并将尽可能快的发布出来。 
</p>
				</div>
		</div>
		<div id="stickies-count" style="display: none;">0</div>
<img src ="http://www.blogjava.net/lucky/aggbug/36543.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-03-21 09:18 <a href="http://www.blogjava.net/lucky/archive/2006/03/21/36543.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>M5 Release</title><link>http://www.blogjava.net/lucky/archive/2006/03/20/36324.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Mon, 20 Mar 2006 06:53:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/03/20/36324.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/36324.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/03/20/36324.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/36324.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/36324.html</trackback:ping><description><![CDATA[
		<h1 class="firstHeading">M5 Release</h1>
		<h3 id="siteSub">From ExtremeComponents</h3>
		<!-- start content -->
		<table id="toc" class="toc">
				<tbody>
						<tr>
								<td>
										<div id="toctitle">
												<h2>Contents</h2>
												<span class="toctoggle">[<a href="javascript:toggleToc()" class="internal" id="togglelink">hide</a>]</span>
										</div>
										<ul>
												<li class="toclevel-1">
														<a href="http://extremecomponents.org/wiki/index.php/M5_Release#Development_Snapshot_Release">
																<span class="tocnumber">1</span>
																<span class="toctext">Development Snapshot Release</span>
														</a>
												</li>
												<li class="toclevel-1">
														<a href="http://extremecomponents.org/wiki/index.php/M5_Release#1.0.1-M5-A4">
																<span class="tocnumber">2</span>
																<span class="toctext">1.0.1-M5-A4</span>
														</a>
												</li>
												<li class="toclevel-1">
														<a href="http://extremecomponents.org/wiki/index.php/M5_Release#Html_Builder_classes_are_concrete_now.">
																<span class="tocnumber">3</span>
																<span class="toctext">Html Builder classes are concrete now.</span>
														</a>
												</li>
												<li class="toclevel-1">
														<a href="http://extremecomponents.org/wiki/index.php/M5_Release#New_Table_showTitle_attribute.">
																<span class="tocnumber">4</span>
																<span class="toctext">New Table showTitle attribute.</span>
														</a>
												</li>
												<li class="toclevel-1">
														<a href="http://extremecomponents.org/wiki/index.php/M5_Release#Limit_can_now_use_the_State_feature.">
																<span class="tocnumber">5</span>
																<span class="toctext">Limit can now use the State feature.</span>
														</a>
												</li>
												<li class="toclevel-1">
														<a href="http://extremecomponents.org/wiki/index.php/M5_Release#New_Column_filterOptions_attribute_.2F_FilterOption_interface.">
																<span class="tocnumber">6</span>
																<span class="toctext">New Column filterOptions attribute / FilterOption interface.</span>
														</a>
												</li>
												<li class="toclevel-1">
														<a href="http://extremecomponents.org/wiki/index.php/M5_Release#New_Export_encoding_attribute_.2F_XlsView_has_Locale_support.">
																<span class="tocnumber">7</span>
																<span class="toctext">New Export encoding attribute / XlsView has Locale support.</span>
														</a>
												</li>
												<li class="toclevel-1">
														<a href="http://extremecomponents.org/wiki/index.php/M5_Release#Removed_the_style_attribute_from_the_Compact_View_title.">
																<span class="tocnumber">8</span>
																<span class="toctext">Removed the style attribute from the Compact View title.</span>
														</a>
												</li>
												<li class="toclevel-1">
														<a href="http://extremecomponents.org/wiki/index.php/M5_Release#TableModel_is_an_Interface_now.">
																<span class="tocnumber">9</span>
																<span class="toctext">TableModel is an Interface now.</span>
														</a>
												</li>
												<li class="toclevel-1">
														<a href="http://extremecomponents.org/wiki/index.php/M5_Release#TableAssembler_is_integrated_into_the_TableModel.">
																<span class="tocnumber">10</span>
																<span class="toctext">TableAssembler is integrated into the TableModel.</span>
														</a>
												</li>
												<li class="toclevel-1">
														<a href="http://extremecomponents.org/wiki/index.php/M5_Release#Renamed_FilterSet.getValue.28.29_method.">
																<span class="tocnumber">11</span>
																<span class="toctext">Renamed FilterSet.getValue() method.</span>
														</a>
												</li>
												<li class="toclevel-1">
														<a href="http://extremecomponents.org/wiki/index.php/M5_Release#Remove_TableTag_onsubmit.">
																<span class="tocnumber">12</span>
																<span class="toctext">Remove TableTag onsubmit.</span>
														</a>
												</li>
												<li class="toclevel-1">
														<a href="http://extremecomponents.org/wiki/index.php/M5_Release#Export_Totaling">
																<span class="tocnumber">13</span>
																<span class="toctext">Export Totaling</span>
														</a>
												</li>
												<li class="toclevel-1">
														<a href="http://extremecomponents.org/wiki/index.php/M5_Release#Export_Errors_-_Response_Headers_Change">
																<span class="tocnumber">14</span>
																<span class="toctext">Export Errors - Response Headers Change</span>
														</a>
												</li>
												<li class="toclevel-1">
														<a href="http://extremecomponents.org/wiki/index.php/M5_Release#ColumnsTag_autoGenerateColumns_Preferences">
																<span class="tocnumber">15</span>
																<span class="toctext">ColumnsTag autoGenerateColumns Preferences</span>
														</a>
												</li>
												<li class="toclevel-1">
														<a href="http://extremecomponents.org/wiki/index.php/M5_Release#Automatically_Convert_Parameters">
																<span class="tocnumber">16</span>
																<span class="toctext">Automatically Convert Parameters</span>
														</a>
												</li>
												<li class="toclevel-1">
														<a href="http://extremecomponents.org/wiki/index.php/M5_Release#TableTag_bufferView_attribute">
																<span class="tocnumber">17</span>
																<span class="toctext">TableTag bufferView attribute</span>
														</a>
												</li>
												<li class="toclevel-1">
														<a href="http://extremecomponents.org/wiki/index.php/M5_Release#AJAX_enable_the_eXtremeTable">
																<span class="tocnumber">18</span>
																<span class="toctext">AJAX enable the eXtremeTable</span>
														</a>
												</li>
										</ul>
								</td>
						</tr>
				</tbody>
		</table>
		<p>
				<script type="text/javascript"><![CDATA[if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } ]]&gt;</script>
		</p>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=M5_Release&amp;action=edit&amp;section=1" title="M5 Release">edit</a>]</div>
		<a name="Development_Snapshot_Release">
		</a>
		<h6> Development Snapshot Release </h6>
		<p>This is the latest <a href="http://extremecomponents.org/extremesite/public/download/extremecomponents-1.0.1-M5-A4.zip" class="external text" title="http://extremecomponents.org/extremesite/public/download/extremecomponents-1.0.1-M5-A4.zip" rel="nofollow">Development Snapshot Release</a> (download). This build represents the code for the next release.
</p>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=M5_Release&amp;action=edit&amp;section=2" title="M5 Release">edit</a>]</div>
		<a name="1.0.1-M5-A4">
		</a>
		<h5> 1.0.1-M5-A4 </h5>
		<p>
				<i>I decided to do another milestone release because I made some
adjustments to the view code, and the eXtremeTable is now going to be
AJAX enabled (not part of build yet). These are big enough features
that I would really like to work perfectly before the release candidate.</i>
		</p>
		<p>The following features and enhancements represent the next
milestone build of the eXtremeTable. I was hoping to not have any
breakage going from the last milestone to this milestone. However,
after working through the implementation of the M4 view code I decided
I had to make one final change...going from static builders to concrete
classes. This will be the only breakage and only effects those with
custom views (custom cells too, but more gracefully deprecated). Even
then the changes can be easily implemented.
</p>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=M5_Release&amp;action=edit&amp;section=3" title="M5 Release">edit</a>]</div>
		<a name="Html_Builder_classes_are_concrete_now.">
		</a>
		<h4> Html Builder classes are concrete now. </h4>
		<p>All the view builder classes are concrete and need to be
instantiated. This only effects developers that have created custom
views or custom cells. This was a much needed change to make the view
code as flexible as it needs to be. Having the builder classes be
static worked Ok, but there would be no opportunities to do anything
interesting in the future, and made creating custom views more
difficult. However, the methods are all the same yet and just requires
a builder class to be instantiated with an HtmlBuilder.
</p>
		<p>To make the transition easier the CellBuilder is still static,
but is now deprecated. The new (non-static) builder is called the
ColumnBuilder, which actually makes more sense as that is what is being
built.
</p>
		<pre>   public String getHtmlDisplay(TableModel model, Column column) {<br />       ColumnBuilder columnBuilder = new ColumnBuilder(column);<br />       columnBuilder.tdStart();<br />       columnBuilder.tdBody(getCellValue(model, column));<br />       columnBuilder.tdEnd();<br />       return columnBuilder.toString();<br />   }<br /></pre>
		<p>As another example, now that the ColumnBuilder is not static I would write custom cells more like this:
</p>
		<pre> public String getHtmlDisplay(TableModel model, Column column) {<br />        InputBuilder inputBuilder = new InputBuilder(column);<br />        inputBuilder.tdStart();<br /><br />        try {<br />            Object bean = model.getCurrentRowBean();<br />            Integer id = new Integer(BeanUtils.getProperty(bean, "id"));<br />            inputBuilder.tdBody(id);<br /><br />        } catch (Exception e) {}<br /><br />        inputBuilder.tdEnd();<br /><br />        return inputBuilder.toString();<br />    }<br /><br />    private static class InputBuilder extends ColumnBuilder {<br />        public InputBuilder(Column column) {<br />            super(column);<br />        }<br /><br />        public void tdBody(Integer id) {<br />            getHtmlBuilder().input("radio").name("location.id").id("location.id").value(id.toString()).onclick("populateLocationFields(this.value)");<br />            getHtmlBuilder().xclose();<br />        }<br />    }<br /> } <br /></pre>
		<p>It is much cleaner to just extend the builder you care about and then build your custom implmentation.
</p>
		<p>In addition the toolbar code has been completely refactored, but
the implemenation was hidden behind the ToolbarBuilder class and so no
one should be effected by the changes.
</p>
		<p>Lastly, I am exploring creating a named toolbar feature that
would enable different toolbars to be referenced in the preferences and
on the table. The feature would use reflection to dynamically build the
toolbar. This would enable a developer to easily define a custom
toolbar through the preferences. For example a toolbar could be defined
to not include the last page for the Limit, or another toolbar that
does not include the rows displayed...things like that. If this is the
only reason you have a custom view you are better off waiting a week or
two until I get this done, unless you need one of the new features.
</p>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=M5_Release&amp;action=edit&amp;section=4" title="M5 Release">edit</a>]</div>
		<a name="New_Table_showTitle_attribute.">
		</a>
		<h4> New Table showTitle attribute. </h4>
		<p>New TableTag showTitle attribute is used to specify whether or not
to show the title. This is a boolean value with the default being true.
</p>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=M5_Release&amp;action=edit&amp;section=5" title="M5 Release">edit</a>]</div>
		<a name="Limit_can_now_use_the_State_feature.">
		</a>
		<h4> Limit can now use the State feature. </h4>
		<p>To use the State feature with the Limit feature you need to use the
TableLimitFactory constructor that accepts the state. When using the
state feature you should always give a unique tableId (in this example
called presidents) so the constructor with the state will require the
tableId also.
</p>
		<pre>   Context context = new HttpServletRequestContext(request);<br />   LimitFactory limitFactory = new TableLimitFactory(context, presidents, TableConstants.STATE_PERSIST, null);<br />   Limit limit = new TableLimit(limitFactory);<br /></pre>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=M5_Release&amp;action=edit&amp;section=6" title="M5 Release">edit</a>]</div>
		<a name="New_Column_filterOptions_attribute_.2F_FilterOption_interface.">
		</a>
		<h4> New Column filterOptions attribute / FilterOption interface. </h4>
		<p>New ColumnTag filterOptions attribute. Accepts a Collection of
filter options where each bean in the Collection implements the
FilterOption interface. Is used in conjunction with the
filterCell=droplist. Very useful when using the Limit to use a custom
droplist.
</p>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=M5_Release&amp;action=edit&amp;section=7" title="M5 Release">edit</a>]</div>
		<a name="New_Export_encoding_attribute_.2F_XlsView_has_Locale_support.">
		</a>
		<h4> New Export encoding attribute / XlsView has Locale support. </h4>
		<p>By default the XlsView uses UTF-16 character encoding. If you need
to use unicode then use the new ExportTag encoding attribute. The
acceptable values are UTF and UNICODE.
</p>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=M5_Release&amp;action=edit&amp;section=8" title="M5 Release">edit</a>]</div>
		<a name="Removed_the_style_attribute_from_the_Compact_View_title.">
		</a>
		<h4> Removed the style attribute from the Compact View title. </h4>
		<p>This was kind of bug in the view code as I hard coded the title of
the table when using the compact view. Just style (or move) the title
through the CSS titleRow attribute.
</p>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=M5_Release&amp;action=edit&amp;section=9" title="M5 Release">edit</a>]</div>
		<a name="TableModel_is_an_Interface_now.">
		</a>
		<h4> TableModel is an Interface now. </h4>
		<p>The TableModel is now an interface. This does not impact any code
except the TableAssembler. However, as mentioned below, assembling a
table with just Java code is even easier now.
</p>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=M5_Release&amp;action=edit&amp;section=10" title="M5 Release">edit</a>]</div>
		<a name="TableAssembler_is_integrated_into_the_TableModel.">
		</a>
		<h4> TableAssembler is integrated into the TableModel. </h4>
		<p>When building an eXtremeTable in Java code in the last release you
would use the TableAssembler class. That code was refactored and
completely integrated into the TableModel. This makes the feature even
easier to use than before.
</p>
		<pre>    TableModel model = new TableModelImpl(context);<br /><br />    Table table = new Table(model);<br />    table.setItems(presidents);<br />    table.setAction("assembler.run");<br />    table.setTitle("Presidents");<br />    table.setShowTooltips(Boolean.FALSE);<br />    model.addTable(table);<br /><br />    Row row = new Row(model);<br />    row.setHighlightRow(Boolean.FALSE);<br />    model.addRow(row);<br /><br />    Column columnName = new Column(model);<br />    columnName.setProperty("fullName");<br />    columnName.setIntercept((AssemblerIntercept.class).getName());<br />    model.addColumn(columnName);<br /><br />    Column columnNickName = new Column(model);<br />    columnNickName.setProperty("nickName");<br />    model.addColumn(columnNickName);<br /><br />    Object view = model.assemble();<br /></pre>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=M5_Release&amp;action=edit&amp;section=11" title="M5 Release">edit</a>]</div>
		<a name="Renamed_FilterSet.getValue.28.29_method.">
		</a>
		<h4> Renamed FilterSet.getValue() method. </h4>
		<p>Deprecated the poorly named FilterSet.getValue() method and renamed it to FilterSet.getFilterValue().
</p>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=M5_Release&amp;action=edit&amp;section=12" title="M5 Release">edit</a>]</div>
		<a name="Remove_TableTag_onsubmit.">
		</a>
		<h4> Remove TableTag onsubmit. </h4>
		<p>The onsubmit was removed as it was never being called because javascript is used for all the table actions.
</p>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=M5_Release&amp;action=edit&amp;section=13" title="M5 Release">edit</a>]</div>
		<a name="Export_Totaling">
		</a>
		<h4> Export Totaling </h4>
		<p>The PDF and XLS exports now include totaling capability. There is nothing you need to do except use the Calc feature as normal.
</p>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=M5_Release&amp;action=edit&amp;section=14" title="M5 Release">edit</a>]</div>
		<a name="Export_Errors_-_Response_Headers_Change">
		</a>
		<h4> Export Errors - Response Headers Change </h4>
		<p>The filter response headers should handle exporting in different environments better. Add the following to the response headers:
</p>
		<pre>response.setHeader("Cache-Control", "must-revalidate, post-check=0, pre-check=0");<br /></pre>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=M5_Release&amp;action=edit&amp;section=15" title="M5 Release">edit</a>]</div>
		<a name="ColumnsTag_autoGenerateColumns_Preferences">
		</a>
		<h4> ColumnsTag autoGenerateColumns Preferences </h4>
		<p>The tag attributes that are backed by an interface have the ability
to alias out the attribute to avoid having to give the fully qualified
package name. The ColumnsTag autoGenerateColumns attribute now includes
this feature. </p>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=M5_Release&amp;action=edit&amp;section=16" title="M5 Release">edit</a>]</div>
		<a name="Automatically_Convert_Parameters">
		</a>
		<h4> Automatically Convert Parameters </h4>
		<p>Greatly improved the Registry to accept either a null, String, List
or Array as a parameter. The Registry will convert it to a String[] for
you.
</p>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=M5_Release&amp;action=edit&amp;section=17" title="M5 Release">edit</a>]</div>
		<a name="TableTag_bufferView_attribute">
		</a>
		<h4> TableTag bufferView attribute </h4>
		<p>TableTag bufferView attribute. The default is true to buffer the
view by default. This will improve the performance of the tag rendering
in that the html view is streamed right out to the response writer if
the bufferView is set to false. This does in theory improve the
performance but I only included the feature because I thought it would
be a nice feature. In general the eXtremeTable is very streamlined and
this is just an additional performance kick.
</p>
		<div class="editsection" style="float: right; margin-left: 5px;">[<a href="http://extremecomponents.org/wiki/index.php?title=M5_Release&amp;action=edit&amp;section=18" title="M5 Release">edit</a>]</div>
		<a name="AJAX_enable_the_eXtremeTable">
		</a>
		<h4> AJAX enable the eXtremeTable </h4>
		<p>When creating a table with Java code using the eXtremeTable API it
is now possible to combine AJAX technology to render the view. For
those new to AJAX this means that the web page does not have to refresh
to navigate the eXtremeTable! This is very exciting and more
documentation will be coming out soon so that developers can start
testing and using this feature. The only real hook to use this feature
is to use the new Table onInvokeAction attribute to give the javascript
method that should be invoked. One of the most powerful aspects of the
AJAX integration is there is no integration. The eXtremeTable has a
very clear and easy API to use and so this was the logical next step.
This also means you can use your favorite AJAX technology as the
eXtremeTable does not actually integrate with any specific one. There
is an example in the site code that is only checked into CVS right now.
However, my site runs on HSQL now so anyone can check out the source
code and run the example. Please do not ask for more documentation at
this time as I will be working to pull some together and will have it
available soon!
</p>
		<div id="stickies-count" style="display: none;">0</div>
<img src ="http://www.blogjava.net/lucky/aggbug/36324.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-03-20 14:53 <a href="http://www.blogjava.net/lucky/archive/2006/03/20/36324.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>eXtremeComponents相关（2006-03-19)</title><link>http://www.blogjava.net/lucky/archive/2006/03/19/36091.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Sun, 19 Mar 2006 11:34:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/03/19/36091.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/36091.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/03/19/36091.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/36091.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/36091.html</trackback:ping><description><![CDATA[   家里不能上网，刚好公司要买一台笔记本要我验货，下午3点来公司。等了两天，Jeff终于给我回信了，而且一回就是7封。这些信的内容大概分4个方面：<br />  1）关于我提交的merge原来的PDFView、XLSView和别人contribute的TotalPDFView、TotalXLSView，现在这两种已经合并为一种PDFView、XLSView。当用户使用了<br />extremeTable的total的特性，相应的PDF、XLS导出也能够导出对应列计算的总数（total）；<br />  2）关于AJAX，现在extremeTable已经具有AJAX的特性，可以在不刷页面的情况下察看下一页的数据（好像今天刚完成的），现在extremeSite的好像没有换成最新的；<br />  3）项目的计划，我们天天在改善eXtremeComponents（SourceForge的活跃率 98%），然后增加的特性都以M版放出，很多刚打算使用这类工具的开发者都不是太喜欢M1，M2，M3......这种M版本。他的想法是等到所有的都修改完后再release，这是出于对eXtremeComponents质量的保证，但是这样又对eXtremeComponents的推广不是很有利。下一个final release版预计在6周后放出，相对1.0.1到时大家可以能看到更多的新特性。<br />  4)release前的工作： 现在eXtremeComponents的JIRA上已经有59个issues需要改进，我们会在release之前按照优先度进行改进。<br /><br /><br /><br /><div id="stickies-count" style="display: none;">0</div><div id="stickies-count" style="display: none;">0</div><img src ="http://www.blogjava.net/lucky/aggbug/36091.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-03-19 19:34 <a href="http://www.blogjava.net/lucky/archive/2006/03/19/36091.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>eXtremeComponents相关（2006-03-17)</title><link>http://www.blogjava.net/lucky/archive/2006/03/17/35851.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Fri, 17 Mar 2006 10:18:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/03/17/35851.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/35851.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/03/17/35851.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/35851.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/35851.html</trackback:ping><description><![CDATA[   昨天想blog的时候，blogjava正在升级，所以今天就写着两天的事：<br />   昨天<br />          上午: 帮助一位网友解决问题，最后发现 extremeCompoments不支持变量为“action”。<br />          下午： 修改XLSView和PDFView使extremeCompoments能支持输出Total，已经提交给Jeff<br />           晚上：  一发狠一个晚上把《程序员》2005合订本扫了一遍<br />   今天<br />           静待Jeff的feedback。<br /><br /><a id="_2c4eeb6cd19a_HomePageDays_DaysList_ctl00_DayItem_DayList_ctl00_TitleUrl" class="postTitle2" href="../archive/2006/03/15/35469.html"></a><div id="stickies-count" style="display: none;">0</div><img src ="http://www.blogjava.net/lucky/aggbug/35851.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-03-17 18:18 <a href="http://www.blogjava.net/lucky/archive/2006/03/17/35851.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>eXtremeComponents相关（2006-03-15)</title><link>http://www.blogjava.net/lucky/archive/2006/03/15/35469.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Wed, 15 Mar 2006 10:23:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/03/15/35469.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/35469.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/03/15/35469.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/35469.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/35469.html</trackback:ping><description><![CDATA[&nbsp; 1）完成 autoGenerateColumns 的配置，在JIRA中close了对应的Issue：ET-22。<br>&nbsp; 2）现在需要对原来提交给pdfTotalView，xlsTotalView，进行一些修改。<br>&nbsp; 对于sourceForge不能访问eXtremeComponents工程的问题（奇怪访问别的工程没有任何问题），在Jeff的帮助下解决，解决方法：创建了一个账号，采用extssh方式访问。<br>&nbsp; 今天Jeff又提到了AJAX的特性，可惜我连上CVS后（北京时间14：28，美国应该是凌晨2：30），Jeff去睡觉了。今晚先看一下代码，不过不能对比，也不知道哪里改动了......<br><div id="stickies-count" style="display: none;">0</div><img src ="http://www.blogjava.net/lucky/aggbug/35469.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-03-15 18:23 <a href="http://www.blogjava.net/lucky/archive/2006/03/15/35469.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>eXtremeComponents相关（2006-03-14)</title><link>http://www.blogjava.net/lucky/archive/2006/03/14/35239.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Tue, 14 Mar 2006 06:59:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/03/14/35239.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/35239.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/03/14/35239.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/35239.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/35239.html</trackback:ping><description><![CDATA[&nbsp;需要我解决的问题：<br>1. autoGenerateColumns 的配置<br>2.&nbsp; 导出total 的locale文件的翻译和现在view的整合<br>&nbsp;&nbsp; 今天Jeff告诉我eXtremeComponents好像已经集成了AJAX的特性，不过我始终连不上Sourecfoge所以看不到效果，郁闷。<br><div id="stickies-count" style="display: none;">0</div><img src ="http://www.blogjava.net/lucky/aggbug/35239.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-03-14 14:59 <a href="http://www.blogjava.net/lucky/archive/2006/03/14/35239.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>最新eXtremeComponents包：支持 PDF中文导出</title><link>http://www.blogjava.net/lucky/archive/2006/03/10/34717.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Fri, 10 Mar 2006 11:33:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/03/10/34717.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/34717.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/03/10/34717.html#Feedback</comments><slash:comments>18</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/34717.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/34717.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 经过一个星期的努力，导出PDF的中文支持问题已经解决。最新的jar我已经放到<font color="#ff0000">Sina</font>邮箱中了。由于extremeComponents使用的是FOP生成PDF。为了支持中文还需要如下动作：<br>&nbsp;&nbsp;&nbsp; 1）注册字体： 选择自己想要使用的字体(例如: 宋体)，使用fop的TTFReader转换。<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 大家可以参照<a href="http://xml.apache.planetmirror.com/fop/fonts.html">FOP：font</a> 进行，也可以自己在网上找一下相关的参照；<br>&nbsp;&nbsp; 2） 编辑字体的配置文件： userconfig.xml<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 增加要使用字体的声明<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 并将它放在工程的目录中比如：<span class="q"><wbr>org.extremesite.resource<wbr>.userconfig.xml</span><br>&nbsp; 3） 在对应的extremeComponents的配置文件（<span class="q">extremesite的配置文件：</span>extremecomponents.properties）中增加<span class="q">
exportPdf.userconfigLocation和</span><span class="q">
exportPdf.font</span>：<br><span class="q"><font color="#ff0000">
exportPdf.userconfigLocation=</font><wbr><font color="#ff0000">/org/extremesite/resource</font><wbr><font color="#ff0000">/userconfig.xml<br>
exportPdf.font=arialuni</font><br>&nbsp;&nbsp; 4）在相应的JSP页面，增加PDF的标签<br><br>相关的FOP字体大家可以参考下面IBM </span>developerWorksd<span class="q">两篇文献：<br></span><h1><font size="5"><a href="http://www-128.ibm.com/developerworks/cn/xml/x-fop/index.html">如何在程序中嵌入FOP</a></font><br></h1><h6><font size="5"><a href="http://www-128.ibm.com/developerworks/cn/xml/x-ospdf/">在 Web 应用程序中动态生成国际化的 PDF</a></font></h6><br><hr size="2" width="100%">P.S. 现在我和Jeff正在讨论要不要通过资源文件支持不同的字体，比如： 在extremecomponentsResourceBundle_zh_CN.properties<br><span class="q"><font color="#ff0000">
exportPdf.font= 宋体<br></font></span>在extremecomponentsResourceBundle_ja_JP.properties<br><span class="q"><font color="#ff0000">
exportPdf.font= 日文输出的相关字体<br>还是就像上面一样直接在</font></span><font color="#ff0000">extremeComponents的配置文件中提供font设置，还有文件名的问题.....<br>大家有什么意见和想法请和我联系！<br></font><br><div id="stickies-count" style="display: none;">0</div><img src ="http://www.blogjava.net/lucky/aggbug/34717.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-03-10 19:33 <a href="http://www.blogjava.net/lucky/archive/2006/03/10/34717.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>eXtremeComponents相关（2006-03-09)</title><link>http://www.blogjava.net/lucky/archive/2006/03/06/33806.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Mon, 06 Mar 2006 02:38:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/03/06/33806.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/33806.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/03/06/33806.html#Feedback</comments><slash:comments>10</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/33806.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/33806.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 这两天在家把eXtremeComponents的源代码学习了一遍，由于不能上网所以也就可以安心地学习了。eXtremeComponents的结构写的比较清晰、明了，整个结构的思路和组织，和作者在文档中描写的类似（除了一些重构的，文档没来的及修正外）。加上上回Jeff帮着我一起修正了Excel的导出时的中文问题，所以整个工程的大体轮廓在脑中还是有些映像的。Jeff让我帮着加一些小的特性（feature），他还没有告诉我要加什么。不过，我现在更愿意解决，PDF导出时的中文问题。虽然网上有相关的文章去指导解决它，但是总不能每个使用者要用这个特性就去crack代码吧？！所以这个问题比较紧迫，现在解决的思路，我在eXtremeComponents介绍中提过了，不过到现在还没有哪位朋友给我些意见..... 那我就先尝试着继续使用fop吧。（希望大家能在下一个release版中能轻松使用这个特性^-^）<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 今天我在Sina的邮箱中放了eXtremeComponents可能依赖的jar的压缩包，如果大家使用时提示引用的jar有问题的话，下载替换试一下。<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#ff0000"> eXtremeComponents网站的代码，包含eXtremeComponents指南的所有示例： extremeSite。已经放到Sina的邮箱中，希望大家喜欢！<br><br>　　求助： 关于MediaWiki<br>&nbsp;&nbsp;&nbsp; </font><font color="#ff0000">eXtremeComponents现在已经使用</font><font color="#ff0000">MediaWiki，在使用中我碰到两个问题： 1. 节号 每节的编号太长，而且莫名其妙 2. 表 如何使用表？<br>&nbsp;&nbsp;<a href="http://extremecomponents.org/wiki/index.php/Main_Page"> </a></font><font color="#ff0000"><a href="http://extremecomponents.org/wiki/index.php/Main_Page">eXtremeComponents Wiki&nbsp; </a><br>&nbsp;&nbsp; 有知道的，麻烦赐教一下，谢谢！<br><br></font><hr size="2" width="100%">2006年3月9日<font color="#ff0000"><br>&nbsp;&nbsp; <font color="#000000">这几天忙着正在修正PDF导出中文的问题，如果是自己使用的话，代码比较好改，不过要“In general”就比较困难了。我修改的代码已经mail给Jeff，他今天早上给我mail说可能已经搞定？ 但是还有一些其他的细小的东西，我们需要交流。由于中美的时差，所以交流起来不是太顺畅。期待明天的mail。大家期待的特性，在未来的版本都应该会考虑的。想想openSource真的不容易，今天13：30的时候Jeff还给我回mail（美国应该凌晨1：30吧）。<br>&nbsp;&nbsp; </font></font><font color="#ff0000">eXtremeComponents网站开通了Wiki 和 JIRA,我已经把所有的文档放到了Wiki内。以后我将会适时更新这里和Wiki。<br></font><font color="#ff0000"><font color="#000000"><font color="#ff0000">&nbsp;&nbsp; 今天在网上找到一份介绍extremeTable的PPT，现在已经放到Sina的邮箱里。由于没找到作者的mail，所以不能跟他联系。如果有版权问题的话，我将立即删除它。</font><br></font></font><div id="stickies-count" style="display: none;">0</div><div id="stickies-count" style="display: none;">0</div><div id="stickies-count" style="display: none;">0</div><div id="stickies-count" style="display: none;">0</div><div id="stickies-count" style="display: none;">0</div><img src ="http://www.blogjava.net/lucky/aggbug/33806.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-03-06 10:38 <a href="http://www.blogjava.net/lucky/archive/2006/03/06/33806.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>eXtremeComponents介绍</title><link>http://www.blogjava.net/lucky/archive/2006/03/03/33552.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Fri, 03 Mar 2006 15:04:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/03/03/33552.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/33552.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/03/03/33552.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/33552.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/33552.html</trackback:ping><description><![CDATA[<div class="article" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title"><a name="d0e1"></a>eXtremeComponents介绍</h2></div></div>

<hr>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e4"></a>1.&nbsp;引言</h2></div></div>
</div>
<p>终于完成eXtremeComponents官方文档的翻译，通过翻译也学习到了很多东西：包括技术架构、细节，最重要的还是作者的激情和毅力。</p>
<p>eXtremeComponents是一系列提供高级显示的开源JSP定制标签，当前的包含的组件为eXtremeTable，用于以表形式显示数据。 </p>
<p>下面我以一个简单示例来介绍eXtremeComponents的安装使用，更详细的使用和定制请参考<a href="http://www.extremecomponents.org/extremesite/welcome.jsp" target="_top">ExtremeComponents网站</a>示例以及我翻译的<a href="/lucky/category/7495.html" target="_top">指南和参考文档</a>。</p></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e19"></a>2.&nbsp;安装</h2></div></div>
</div>
<p>从 <a href="http://sourceforge.net/project/showfiles.php?group_id=108168" target="_top">sourceforge</a> 
下载发行包：eXtremeComponents-1.0.1-M4-with-dependencies.rar，并下载本示例：一个只包含jsp的Eclipse工程(见附件)。 
</p>
<p>将发行包中的lib目录下的所有jar文件 拷贝到附件的工程中的../WEB-INF/lib文件下， 
在Tomcat的conf目录下新建一个xml文件指向webapp目录，我的xml文件配置如下,请将路径改为自己的路径: </p><pre class="programlisting">&lt;Context path="/extremeTable" reloadable="true" docBase="C:\usr\workspace\3.1.1\ExtremeTest\webapp" workDir="C:\usr\workspace\3.1.1\ExtremeTest\work" /&gt;</pre>
<p>或者将webapp目录重命名为extremeTable并拷贝到Tomcat的webapps目录下,完成部署。 </p></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e32"></a>3.&nbsp;运行</h2></div></div>
</div>
<p>在浏览器中http://localhost/extremeTable/test.jsp，这样你就可以看到效果了。附件中提供了三个jsp： </p>
<div class="orderedlist">
<ol type="i"><li>
<p>test(en).jsp,eXtremeComponents发行包中自带</p>
</li><li>
<p>test.jsp,修改自test(en)，里面的一些值改为中文。采用gb2312，检测eXtremeComponents对中文的支持</p>
</li><li>
<p>test(UTF-8).jsp,修改自test(en)，里面的一些值改为中文和日文。采用UTF-8编码，检测eXtremeComponents对UTF-8的支持。 
<span class="emphasis"><em>注意打开次页面时请使用提供UTF-8编码的Editor，我使用的是EmEditor。</em></span> 
</p></li></ol></div>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e51"></a>4.&nbsp;效果(见附件：doc.rar)</h2></div></div>
</div>

<div class="figure"><a name="d0e56"></a>
<div><img alt="运行test.jsp的效果" src="images/cn.png"></div>
<p class="title"><b>Figure&nbsp;1.&nbsp;运行test.jsp的效果</b></p></div>


<div class="figure"><a name="d0e63"></a>
<div><img alt="导出XLS文件的效果" src="images/cn.jpg"></div>
<p class="title"><b>Figure&nbsp;2.&nbsp;导出XLS文件的效果</b></p></div>


<div class="figure"><a name="d0e70"></a>
<div><img alt="运行test(utf-8).jsp的效果" src="images/utf-8.png"></div>
<p class="title"><b>Figure&nbsp;3.&nbsp;运行test(utf-8).jsp的效果</b></p></div>


<div class="figure"><a name="d0e77"></a>
<div><img alt="导出XLS文件的效果" src="images/utf-8.jpg"></div>
<p class="title"><b>Figure&nbsp;4.&nbsp;导出XLS文件的效果</b></p></div>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e82"></a>5.&nbsp;代码</h2></div></div>
</div>
<p>实现代码如下test.jsp：</p><pre class="programlisting">		&lt;ec:table<br>		items="pres"<br>		action="${pageContext.request.contextPath}/test.jsp"<br>		imagePath="${pageContext.request.contextPath}/images/table/*.gif"<br>		title="Presidents"<br>		width="60%"<br>		rowsDisplayed="5"<br>		locale="zh_CN"<br>		&gt;<br>		&lt;ec:exportXls<br>			fileName="中文.xls"<br>			tooltip="Export Excel"<br>			text="XLS"<br>			/&gt;<br>		&lt;ec:row&gt;<br>			&lt;ec:column property="name" title="姓名"/&gt;<br>			&lt;ec:column property="nickname" title="昵称"/&gt;<br>			&lt;ec:column property="term"/&gt;<br>		&lt;/ec:row&gt;<br>	&lt;/ec:table&gt;<br>		</pre>
<p>具体的标签以及标签中的含义，请参看参考文档。</p></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e91"></a>6.&nbsp;中文问题</h2></div></div>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="d0e94"></a>6.1.&nbsp;EXCLE中文导出问题</h3></div></div>
</div>
<p>现在，eXtremeComponents已经解决了导出EXCLE文件中文乱码问题（附件中包含的eXtremeComponents.jar），最新的 
eXtremeComponents包将在4月份发布。 </p></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="d0e99"></a>6.2.&nbsp;PDF中文导出问题</h3></div></div>
</div>
<p>对于导出PDF中的乱码问题，由于eXtremeComponents使用了FOP来导出PDF，FOP最新版仍然没有很好地解决东亚文字的 
输出问题，除非通过userConfig.xml来指定字体。目前，我们在探讨解决方案：</p>
<div class="orderedlist">
<ol type="i"><li>
<p>继续采用fop，但提供一个配置文件用于指定需要的字体</p>
</li><li>
<p>换用别的对双字节语言更好的包，比如：iText......</p></li></ol></div>如果大家有什么好的意见、建议，请和我联系: <a href="xplucy@gmail.com" target="_top">xplucy@gmail.com</a>。 </div></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e115"></a>7.&nbsp;其他</h2></div></div>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="d0e118"></a>7.1.&nbsp;ExtremeComponents网站</h3></div></div>
</div>
<p><a href="http://www.extremecomponents.org/extremesite/welcome.jsp" target="_top">ExtremeComponents网站</a></p></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="d0e124"></a>7.2.&nbsp;定制</h3></div></div>
</div>
<p>eXtremeComponents提供了很强的定制功能，可以定制样式，表、行、列的显示，追加列......更多详细信息请参看 <a href="/lucky/category/7495.html" target="_top">指南和参考文档</a>。 
</p></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="d0e132"></a>7.3.&nbsp;其他资源</h3></div></div>
</div>
<p>江南白衣： <a href="http://www.springside.org.cn/" target="_top">SpringSide</a></p>
<p>庄脚人不Log：<a href="http://www.javaworld.com.tw/roller/page/KentChu/Weblog/2005_9_12_eXtremeTable?catname=" target="_top">一款不錯用的tag - eXtremeTable</a></p>
<p>java视线：<a href="http://www.hibernate.org.cn/viewtopic.php?t=17938" target="_top">eXtremeComponent在中文环境下的使用</a></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.hibernate.org.cn/viewtopic.php?t=17989" target="_top">回报eXtremeComponent</a></p>
<p>efa's blog：<a href="/davidxu/archive/2005/08/09/9683.aspx" target="_top">也来介绍 一下extremeTable</a></p>
<p>张竞在线：<a href="http://www.54bk.com/user1/7071/index.html" target="_top">extremeTable分类</a></p>
<p>。。。。。。</p><font color="#0000ff" size="5">注: 由于我访问blogjava太慢，所有相关附件包括使用的所有jar都放到<font color="#ff0000">sina</font>邮箱中：<br><br>用户名：<font color="#ff0000">extremetable</font><br><br>密&nbsp;&nbsp; 码：<font color="#ff0000">extremetable</font></font><br><p><a href="../../Files/lucky/ExtremeTest.rar"><font color="#ff0000" size="6"> </font><br></a></p></div></div></div><div id="stickies-count" style="display: none;">0</div><div id="stickies-count" style="display: none;">0</div><div id="stickies-count" style="display: none;">0</div><div id="stickies-count" style="display: none;">0</div><img src ="http://www.blogjava.net/lucky/aggbug/33552.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-03-03 23:04 <a href="http://www.blogjava.net/lucky/archive/2006/03/03/33552.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Chapter 16. Tag Attributes</title><link>http://www.blogjava.net/lucky/archive/2006/03/03/33372.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Fri, 03 Mar 2006 01:55:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/03/03/33372.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/33372.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/03/03/33372.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/33372.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/33372.html</trackback:ping><description><![CDATA[<div class="chapter" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title"><a name="d0e1167"></a>Chapter&nbsp;16.&nbsp;Tag Attributes</h2></div></div>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e1170"></a>16.1.&nbsp;TableTag</h2></div></div>
</div>
<div class="table"><a name="d0e1174"></a>
<p class="title"><b>Table&nbsp;16.1.&nbsp;</b></p>
<table summary="" border="1">
<colgroup>
<col>
<col></colgroup>
<thead>
<tr>
<th>Name</th>
<th>Description</th></tr></thead>
<tbody>
<tr>
<td><tt class="literal">action</tt></td>
<td><tt class="literal">The URI that will be called when the filter, sort and 
pagination is used.</tt></td></tr>
<tr>
<td><tt class="literal">autoIncludeParameters</tt></td>
<td><tt class="literal">Specify whether or not to automatically include the 
parameters, as hidden inputs, passed into the JSP.</tt></td></tr>
<tr>
<td><tt class="literal">border</tt></td>
<td><tt class="literal">The table border attribute. The default is 
0.</tt></td></tr>
<tr>
<td><tt class="literal">cellpadding</tt></td>
<td><tt class="literal">The table cellpadding attribute. The default is 
0.</tt></td></tr>
<tr>
<td><tt class="literal">cellspacing</tt></td>
<td><tt class="literal">The table cellspacing attribute. The default is 
0.</tt></td></tr>
<tr>
<td><tt class="literal">filterable</tt></td>
<td><tt class="literal">Specify whether or not the table is filterable. Boolean 
value with the default being true.</tt></td></tr>
<tr>
<td><tt class="literal">filterRowsCallback</tt></td>
<td><tt class="literal">A fully qualified class name to a custom 
FilterRowsCallback implementation. Could also be a named type in the 
preferences. Used to filter the Collection of Beans or Collection of 
Maps.</tt></td></tr>
<tr>
<td><tt class="literal">form</tt></td>
<td><tt class="literal">The reference to a surrounding form 
element.</tt></td></tr>
<tr>
<td><tt class="literal">imagePath</tt></td>
<td><tt class="literal">The path to find the images. For example 
imagePath=/extremesite/images/*.png is saying look in the image directory for 
the .png images.</tt></td></tr>
<tr>
<td><tt class="literal">intercept</tt></td>
<td><tt class="literal">A fully qualified class name to a custom InterceptTable 
implementation. Could also be a named type in the preferences. Used to add table 
attributes.</tt></td></tr>
<tr>
<td><tt class="literal">items</tt></td>
<td><tt class="literal">Reference the collection that will be 
retrieved.</tt></td></tr>
<tr>
<td><tt class="literal">locale</tt></td>
<td><tt class="literal">The locale for this table. For example fr_FR is used for 
the French translation.</tt></td></tr>
<tr>
<td><tt class="literal">method</tt></td>
<td><tt class="literal">Used to invoke the table action using a POST or 
GET.</tt></td></tr>
<tr>
<td><tt class="literal">onsubmit</tt></td>
<td><tt class="literal">The javascript onsubmit action for the 
table.</tt></td></tr>
<tr>
<td><tt class="literal">retrieveRowsCallback</tt></td>
<td><tt class="literal">A fully qualified class name to a custom 
RetrieveRowsCallback implementation. Could also be a named type in the 
preferences. Used to retrieve the Collection of Beans or Collection of 
Maps.</tt></td></tr>
<tr>
<td><tt class="literal">rowsDisplayed</tt></td>
<td><tt class="literal">The number of rows to display in the table.</tt></td></tr>
<tr>
<td><tt class="literal">scope</tt></td>
<td><tt class="literal">The scope (page, request, session, or application) to find 
the Collection of beans or Collection of Maps defined by the collection 
attribute.</tt></td></tr>
<tr>
<td><tt class="literal">showPagination</tt></td>
<td><tt class="literal">Specify whether or not the table should use pagination. 
Boolean value with the default being true.</tt></td></tr>
<tr>
<td><tt class="literal">showExports</tt></td>
<td><tt class="literal">Specify whether or not the table should use the exports. 
Boolean value with the default being true.</tt></td></tr>
<tr>
<td><tt class="literal">showStatusBar</tt></td>
<td><tt class="literal">Specify whether or not the table should use the status 
bar. Boolean value with the default being true.</tt></td></tr>
<tr>
<td><tt class="literal">showTooltips</tt></td>
<td><tt class="literal">Specify whether or not to show the tooltips. Boolean value 
with the default being true.</tt></td></tr>
<tr>
<td><tt class="literal">sortRowsCallback</tt></td>
<td><tt class="literal">A fully qualified class name to a custom SortRowsCallback 
implementation. Could also be a named type in the preferences. Used to sort the 
Collection of Beans or Collection of Maps.</tt></td></tr>
<tr>
<td><tt class="literal">sortable</tt></td>
<td><tt class="literal">Specify whether or not the table is sortable. Boolean 
value with the default being true.</tt></td></tr>
<tr>
<td><tt class="literal">state</tt></td>
<td><tt class="literal">The table state to use when returning to a table. 
Acceptable values are default, notifyToDefault, persist, 
notifyToPersist.</tt></td></tr>
<tr>
<td><tt class="literal">stateAttr</tt></td>
<td><tt class="literal">The table attribute used to invoke the state change of the 
table.</tt></td></tr>
<tr>
<td><tt class="literal">style</tt></td>
<td><tt class="literal">The css inline style sheet.</tt></td></tr>
<tr>
<td><tt class="literal">styleClass</tt></td>
<td><tt class="literal">The css class style sheet.</tt></td></tr>
<tr>
<td><tt class="literal">tableId</tt></td>
<td><tt class="literal">The unique identifier for the table.</tt></td></tr>
<tr>
<td><tt class="literal">theme</tt></td>
<td><tt class="literal">The theme to style the table. The default is 
eXtremeTable.</tt></td></tr>
<tr>
<td><tt class="literal">title</tt></td>
<td><tt class="literal">The title of the table. The title will display above the 
table.</tt></td></tr>
<tr>
<td><tt class="literal">var</tt></td>
<td><tt class="literal">The name of the variable to hold the current row 
bean.</tt></td></tr>
<tr>
<td><tt class="literal">view</tt></td>
<td><tt class="literal">Generates the output. The default is the HtmlView to 
generate the HTML. Also used by the exports to generate XLS-FO, POI, and 
CSV.</tt></td></tr>
<tr>
<td><tt class="literal">width</tt></td>
<td><tt class="literal">Width of the 
table.</tt></td></tr></tbody></table></div></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e1417"></a>16.2.&nbsp;RowTag</h2></div></div>
</div>
<div class="table"><a name="d0e1421"></a>
<p class="title"><b>Table&nbsp;16.2.&nbsp;</b></p>
<table summary="" border="1">
<colgroup>
<col>
<col></colgroup>
<thead>
<tr>
<th>Name</th>
<th>Description</th></tr></thead>
<tbody>
<tr>
<td><tt class="literal">highlightClass</tt></td>
<td><tt class="literal">The css class style sheet when highlighting 
rows.</tt></td></tr>
<tr>
<td><tt class="literal">highlightRow</tt></td>
<td><tt class="literal">Used to turn the highlight feature on and off. Acceptable 
values are true or false. The default is false.</tt></td></tr>
<tr>
<td><tt class="literal">intercept</tt></td>
<td><tt class="literal">A fully qualified class name to a custom InterceptRow 
implementation. Could also be a named type in the preferences. Used to add or 
modify row attributes.</tt></td></tr>
<tr>
<td><tt class="literal">onclick</tt></td>
<td><tt class="literal">The javascript onclick action</tt></td></tr>
<tr>
<td><tt class="literal">onmouseout</tt></td>
<td><tt class="literal">The javascript onmouseout action</tt></td></tr>
<tr>
<td><tt class="literal">onmouseover</tt></td>
<td><tt class="literal">The javascript onmouseover action</tt></td></tr>
<tr>
<td><tt class="literal">style</tt></td>
<td><tt class="literal">The css inline style sheet.</tt></td></tr>
<tr>
<td><tt class="literal">styleClass</tt></td>
<td><tt class="literal">The css class style 
sheet.</tt></td></tr></tbody></table></div></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e1489"></a>16.3.&nbsp;ColumnTag</h2></div></div>
</div>
<div class="table"><a name="d0e1493"></a>
<p class="title"><b>Table&nbsp;16.3.&nbsp;</b></p>
<table summary="" border="1">
<colgroup>
<col>
<col></colgroup>
<thead>
<tr>
<th>Name</th>
<th>Description</th></tr></thead>
<tbody>
<tr>
<td><tt class="literal">alias</tt></td>
<td><tt class="literal">Used to uniquely identify the column when the same 
property is used for more than one column.</tt></td></tr>
<tr>
<td><tt class="literal">calc</tt></td>
<td><tt class="literal">A fully qualified class name to a custom Calc 
implementation. Could also be a named type in the preferences. Used to do math 
on a column.</tt></td></tr>
<tr>
<td><tt class="literal">calcTitle</tt></td>
<td><tt class="literal">The title of the calc.</tt></td></tr>
<tr>
<td><tt class="literal">cell</tt></td>
<td><tt class="literal">Display for the column. The valid values are display, 
currency, rowCount, and date. The default value is display. The cell can also be 
a fully qualified class name to a custom Cell. Be sure to implement the Cell 
interface or extend AbstractCell if making a custom cell.</tt></td></tr>
<tr>
<td><tt class="literal">escapeAutoFormat</tt></td>
<td><tt class="literal">Specify whether auto format of value will be skipped. 
False by default, and is only effective if autoformatting is implement in the 
view.</tt></td></tr>
<tr>
<td><tt class="literal">filterable</tt></td>
<td><tt class="literal">Specify whether or not the column should be filterable. 
Acceptable values are true or false. The default is to use the value for the 
table filterable attribute.</tt></td></tr>
<tr>
<td><tt class="literal">filterCell</tt></td>
<td><tt class="literal">Displays the filter column. The valid values are filter 
and droplist. The default is filter. The cell can also be a fully qualified 
class name to a custom cell.</tt></td></tr>
<tr>
<td><tt class="literal">filterClass</tt></td>
<td><tt class="literal">The css class style sheet used to define what the table 
filter column looks like.</tt></td></tr>
<tr>
<td><tt class="literal">filterStyle</tt></td>
<td><tt class="literal">The css class style sheet to use for the filter 
column.</tt></td></tr>
<tr>
<td><tt class="literal">format</tt></td>
<td><tt class="literal">The format to use for the cell. For instance if used with 
a date cell then the format can be MM/dd/yyyy.</tt></td></tr>
<tr>
<td><tt class="literal">headerCell</tt></td>
<td><tt class="literal">Display for the header column. The default is header. The 
cell can also be a fully qualified class name to a custom cell.</tt></td></tr>
<tr>
<td><tt class="literal">headerClass</tt></td>
<td><tt class="literal">The css class style sheet used to define what the table 
header column looks like.</tt></td></tr>
<tr>
<td><tt class="literal">headerStyle</tt></td>
<td><tt class="literal">The css class style sheet to use for the header 
column.</tt></td></tr>
<tr>
<td><tt class="literal">intercept</tt></td>
<td><tt class="literal">A fully qualified class name to a custom InterceptColumn 
implementation. Could also be a named type in the preferences. Used to add or 
modify column attributes.</tt></td></tr>
<tr>
<td><tt class="literal">parse</tt></td>
<td><tt class="literal">Used if the format needs to be interpreted. For instance, 
a date needs to be parsed in the specific format, such as 
MM-dd-yyyy.</tt></td></tr>
<tr>
<td><tt class="literal">property</tt></td>
<td><tt class="literal">The bean attribute to use for the column.</tt></td></tr>
<tr>
<td><tt class="literal">sortable</tt></td>
<td><tt class="literal">Specify whether or not the column should be sortable. The 
acceptable values are true or false. The default is to use the value for the 
table sortable attribute.</tt></td></tr>
<tr>
<td><tt class="literal">style</tt></td>
<td><tt class="literal">The css inline style sheet.</tt></td></tr>
<tr>
<td><tt class="literal">styleClass</tt></td>
<td><tt class="literal">The css class style sheet.</tt></td></tr>
<tr>
<td><tt class="literal">title</tt></td>
<td><tt class="literal">The display for the table column header. If the title is 
not specified then it will default to the name of the property, changing the 
camelcase syntax to separate words.</tt></td></tr>
<tr>
<td><tt class="literal">value</tt></td>
<td><tt class="literal">The value for the column. If the value attribute is not 
specifed then it will be retrieved automatically using the property attribute. 
The value can also be defined within the column body.</tt></td></tr>
<tr>
<td><tt class="literal">viewsAllowed</tt></td>
<td><tt class="literal">The comma separated list of views that this column will be 
used in.</tt></td></tr>
<tr>
<td><tt class="literal">viewsDenied</tt></td>
<td><tt class="literal">The comma separated list of views that this column will 
not be used in.</tt></td></tr>
<tr>
<td><tt class="literal">width</tt></td>
<td><tt class="literal">Specify the column 
width.</tt></td></tr></tbody></table></div></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e1673"></a>16.4.&nbsp;ExportTag</h2></div></div>
</div>
<div class="table"><a name="d0e1677"></a>
<p class="title"><b>Table&nbsp;16.4.&nbsp;</b></p>
<table summary="" border="1">
<colgroup>
<col>
<col></colgroup>
<thead>
<tr>
<th>Name</th>
<th>Description</th></tr></thead>
<tbody>
<tr>
<td><tt class="literal">fileName</tt></td>
<td><tt class="literal">The name of the export file.</tt></td></tr>
<tr>
<td><tt class="literal">imageName</tt></td>
<td><tt class="literal">The image name.</tt></td></tr>
<tr>
<td><tt class="literal">intercept</tt></td>
<td><tt class="literal">A fully qualified class name to a custom InterceptExport 
implementation. Could also be a named type in the preferences. Used to add or 
modify export attributes.</tt></td></tr>
<tr>
<td><tt class="literal">view</tt></td>
<td><tt class="literal">A fully qualified class name to a custom View 
implementation. Could also be a named type in the preferences. Default types are 
pdf, xls, or csv.</tt></td></tr>
<tr>
<td><tt class="literal">viewResolver</tt></td>
<td><tt class="literal">A fully qualified class name to a custom ViewResolver 
implementation. Could also be a named type in the preferences. Default types are 
pdf, xls, or csv.</tt></td></tr>
<tr>
<td><tt class="literal">text</tt></td>
<td><tt class="literal">The text for the export view.</tt></td></tr>
<tr>
<td><tt class="literal">tooltip</tt></td>
<td><tt class="literal">The tooltip that shows up when you mouseover the export 
image.</tt></td></tr></tbody></table></div></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e1738"></a>16.5.&nbsp;ExportXlsTag</h2></div></div>
</div>
<div class="table"><a name="d0e1742"></a>
<p class="title"><b>Table&nbsp;16.5.&nbsp;</b></p>
<table summary="" border="1">
<colgroup>
<col>
<col></colgroup>
<thead>
<tr>
<th>Name</th>
<th>Description</th></tr></thead>
<tbody>
<tr>
<td><tt class="literal">fileName</tt></td>
<td><tt class="literal">The name of the export file.</tt></td></tr>
<tr>
<td><tt class="literal">imageName</tt></td>
<td><tt class="literal">The image name.</tt></td></tr>
<tr>
<td><tt class="literal">intercept</tt></td>
<td><tt class="literal">A fully qualified class name to a custom InterceptExport 
implementation. Could also be a named type in the preferences. Used to add or 
modify export attributes.</tt></td></tr>
<tr>
<td><tt class="literal">view</tt></td>
<td><tt class="literal">A fully qualified class name to a custom View 
implementation. Could also be a named type in the preferences. Default types are 
pdf, xls, or csv.</tt></td></tr>
<tr>
<td><tt class="literal">viewResolver</tt></td>
<td><tt class="literal">A fully qualified class name to a custom ViewResolver 
implementation. Could also be a named type in the preferences. Default types are 
pdf, xls, or csv.</tt></td></tr>
<tr>
<td><tt class="literal">text</tt></td>
<td><tt class="literal">The text for the export view.</tt></td></tr>
<tr>
<td><tt class="literal">tooltip</tt></td>
<td><tt class="literal">The tooltip that shows up when you mouseover the export 
image.</tt></td></tr></tbody></table></div></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e1803"></a>16.6.&nbsp;ExportCsvTag</h2></div></div>
</div>
<div class="table"><a name="d0e1807"></a>
<p class="title"><b>Table&nbsp;16.6.&nbsp;</b></p>
<table summary="" border="1">
<colgroup>
<col>
<col></colgroup>
<thead>
<tr>
<th>Name</th>
<th>Description</th></tr></thead>
<tbody>
<tr>
<td><tt class="literal">delimiter</tt></td>
<td><tt class="literal">What to use as the file delimiter. The default is a 
comma.</tt></td></tr>
<tr>
<td><tt class="literal">fileName</tt></td>
<td><tt class="literal">The name of the export file.</tt></td></tr>
<tr>
<td><tt class="literal">imageName</tt></td>
<td><tt class="literal">The image name.</tt></td></tr>
<tr>
<td><tt class="literal">intercept</tt></td>
<td><tt class="literal">A fully qualified class name to a custom InterceptExport 
implementation. Could also be a named type in the preferences. Used to add or 
modify export attributes.</tt></td></tr>
<tr>
<td><tt class="literal">view</tt></td>
<td><tt class="literal">A fully qualified class name to a custom View 
implementation. Could also be a named type in the preferences. Default types are 
pdf, xls, or csv.</tt></td></tr>
<tr>
<td><tt class="literal">viewResolver</tt></td>
<td><tt class="literal">A fully qualified class name to a custom ViewResolver 
implementation. Could also be a named type in the preferences. Default types are 
pdf, xls, or csv.</tt></td></tr>
<tr>
<td><tt class="literal">text</tt></td>
<td><tt class="literal">The text for the export view.</tt></td></tr>
<tr>
<td><tt class="literal">tooltip</tt></td>
<td><tt class="literal">The tooltip that shows up when you mouseover the export 
image.</tt></td></tr></tbody></table></div></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e1875"></a>16.7.&nbsp;ExportPdfTag</h2></div></div>
</div>
<div class="table"><a name="d0e1879"></a>
<p class="title"><b>Table&nbsp;16.7.&nbsp;</b></p>
<table summary="" border="1">
<colgroup>
<col>
<col></colgroup>
<thead>
<tr>
<th>Name</th>
<th>Description</th></tr></thead>
<tbody>
<tr>
<td><tt class="literal">headerBackgroundColor</tt></td>
<td><tt class="literal">The background color on the header column.</tt></td></tr>
<tr>
<td><tt class="literal">headerColor</tt></td>
<td><tt class="literal">The font color for the header column.</tt></td></tr>
<tr>
<td><tt class="literal">headerTitle</tt></td>
<td><tt class="literal">The title displayed at the top of the page.</tt></td></tr>
<tr>
<td><tt class="literal">fileName</tt></td>
<td><tt class="literal">The name of the export file.</tt></td></tr>
<tr>
<td><tt class="literal">imageName</tt></td>
<td><tt class="literal">The image name.</tt></td></tr>
<tr>
<td><tt class="literal">intercept</tt></td>
<td><tt class="literal">A fully qualified class name to a custom InterceptExport 
implementation. Could also be a named type in the preferences. Used to add or 
modify export attributes.</tt></td></tr>
<tr>
<td><tt class="literal">view</tt></td>
<td><tt class="literal">A fully qualified class name to a custom View 
implementation. Could also be a named type in the preferences. Default types are 
pdf, xls, or csv.</tt></td></tr>
<tr>
<td><tt class="literal">viewResolver</tt></td>
<td><tt class="literal">A fully qualified class name to a custom ViewResolver 
implementation. Could also be a named type in the preferences. Default types are 
pdf, xls, or csv.</tt></td></tr>
<tr>
<td><tt class="literal">text</tt></td>
<td><tt class="literal">The text for the export view.</tt></td></tr>
<tr>
<td><tt class="literal">tooltip</tt></td>
<td><tt class="literal">The tooltip that shows up when you mouseover the export 
image.</tt></td></tr></tbody></table></div></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e1961"></a>16.8.&nbsp;ColumnsTag</h2></div></div>
</div>
<div class="table"><a name="d0e1965"></a>
<p class="title"><b>Table&nbsp;16.8.&nbsp;</b></p>
<table summary="" border="1">
<colgroup>
<col>
<col></colgroup>
<thead>
<tr>
<th>Name</th>
<th>Description</th></tr></thead>
<tbody>
<tr>
<td><tt class="literal">autoGenerateColumns</tt></td>
<td><tt class="literal">A fully qualified class name to a custom 
AutoGenerateColumns implementation. Could also be a named type in the 
preferences. Used to generate columns on the 
fly.</tt></td></tr></tbody></table></div></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e1984"></a>16.9.&nbsp;ParameterTag</h2></div></div>
</div>
<div class="table"><a name="d0e1988"></a>
<p class="title"><b>Table&nbsp;16.9.&nbsp;</b></p>
<table summary="" border="1">
<colgroup>
<col>
<col></colgroup>
<thead>
<tr>
<th>Name</th>
<th>Description</th></tr></thead>
<tbody>
<tr>
<td><tt class="literal">name</tt></td>
<td><tt class="literal">The name of the parameter.</tt></td></tr>
<tr>
<td><tt class="literal">value</tt></td>
<td><tt class="literal">The value of the 
parameter.</tt></td></tr></tbody></table>&lt;译者注： 由于本章是eXtremeTable的标签参考，比较简单而且为了保留原味所以未翻译。&gt;<br></div></div></div><div id="stickies-count" style="display: none;">0</div><img src ="http://www.blogjava.net/lucky/aggbug/33372.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-03-03 09:55 <a href="http://www.blogjava.net/lucky/archive/2006/03/03/33372.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Chapter 15. 1.0.1-M4升级说明(2)</title><link>http://www.blogjava.net/lucky/archive/2006/03/03/33368.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Fri, 03 Mar 2006 01:49:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/03/03/33368.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/33368.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/03/03/33368.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/33368.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/33368.html</trackback:ping><description><![CDATA[<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="d0e1053"></a>15.1.6.&nbsp;TableTag的collection属性</h3></div></div>
</div>
<p>TableTag的collection属性被删除，现在变为三个新属性：tableId、items和var。 
因为我按照标准的JSTL命名，你应该能够根据这些名称知道他们的作用。tableId属性 
被用来作为表的唯一标识，items属性用来表示从各种servlet的scopes里取得的集合， var属性表示你将使用EL编写脚本的名称。</p>
<p>依赖你的需要来决定如何使用新的属性，tableId用来唯一标识表。如果你的页面上只使用了 
一个eXtremeTable并且不使用Limit特性，那么你根本不需要定义它。默认的表示名为'ec'；如果使用 
Limit特性你也可以使用'ec'这个名称。然而，如果的一个JSP页面上同时使用两个eXtremeTables你就 
需要使用tableId来唯一标识他们。var属性被用来你将使用EL编写脚本的名称。items属性用来表示从 
各种servlet的scopes里取得的集合，而且现在非常健壮。你现在能nest集合到另外的对象，或者nest你想的 深度。</p>
<p>取得集合的语法如下：</p><pre class="programlisting">&lt;ec:table items="command.myObject.myCol" /&gt;</pre>
<p>本示例将从命令对象（command object）取得myCol集合。</p><pre class="programlisting">&lt;ec:table items="myCol" /&gt;</pre>
<p>本示例中将根据名称自动取得集合，就像以前版本的collection属性一样。</p></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="d0e1070"></a>15.1.7.&nbsp;BaseModel</h3></div></div>
</div>
<p>BaseModel被重命名为TableModel，这是因为已经不需要一个基础包（base package）了，这也 
意味着不再需要BaseModel了。</p></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="d0e1075"></a>15.1.8.&nbsp;Properties和ResourceBundle</h3></div></div>
</div>
<p>web.xml文件中使用extremecomponentsPreferencesLocation属性取代extremecomponentsPropertiesLocation属性， 
properties现在被Preferences接口控制。在以后的版本，我将提供可选的xml文件配置。</p>
<p>eXtremeTable不再默认在顶层类路径（top level classpath）寻找 
extremecomponents.properties文件。你应该在web.xml中使用设置context-param属性的 
值为extremecomponentsPreferencesLocation，这将更为通用。</p>
<p>web.xml文件中使用extremecomponentsMessagesLocation属性取代extremecomponentsResourceBundleLocation属性， 
internationalization现在被Messages接口控制。</p>
<p>Properties和ResourceBundle属性根据table、row、column、export和filterare区分开。 
在以前版本中每个属性都以'table'开头，现在每个属性关联到被使用的标签。另外poperty不再需要使用奇怪的下划线语法， 而是使用dot来强调。</p>
<p>下面为properties文件的示例：</p><pre class="programlisting">table.imagePath=/extremesite/images/*.gif<br>table.rowsDisplayed=12<br>column.parse.date=yyyy-MM-dd<br>column.format.date=MM/dd/yyyy<br>column.format.currency=$###,###,##0.00<br></pre>
<p>[<span class="optional">英文的属性文件示例如下：</span>]</p><pre class="programlisting">statusbar.resultsFound={0} results found, displaying {1} to {2}<br>statusbar.noResultsFound=There were no results found.<br><br>toolbar.firstPageTooltip=First Page<br>toolbar.lastPageTooltip=Last Page<br>toolbar.prevPageTooltip=Previous Page<br>toolbar.nextPageTooltip=Next Page<br>toolbar.filterTooltip=Filter<br>toolbar.clearTooltip=Clear<br><br>toolbar.clearText=Clear<br>toolbar.firstPageText=First<br>toolbar.lastPageText=Last<br>toolbar.nextPageText=Next<br>toolbar.prevPageText=Prev<br>toolbar.filterText=Filter<br><br>column.headercell.sortTooltip=Sort By<br><br>column.calc.total=Total<br>column.calc.average=Average<br></pre></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="d0e1095"></a>15.1.9.&nbsp;pageContext</h3></div></div>
</div>
<p>TableModel （以前的BaseModel）不再直接访问pageContext，取而代之的是使用Context接口， 
默认的被pageContext支持。直接访问pageContext是一个不好的实现，Context提供你需要从不同servlet scopes中 
取得需要属性值的所有方法。然而，如果你需要直接访问背后的对象，可以使用getContextObject()方法。</p></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="d0e1100"></a>15.1.10.&nbsp;Limit和LimitFactory</h3></div></div>
</div>
<p>Limit和LimitFactory现在都是接口，以前版本的实现不如我想象的简单。然而， 
Limit对象的方法命名和以前版本的一样，因此你以前的代码也能很好的工作。</p>
<p>我两个Limit实现重构为一个，但是仍有两个LimitFactory实现， 从coding的观点用户只要使用一个 
实现，但是它必须兼容以前的版本。现在只有一个Limit实现我重命名为TableLimit。同时，因为Limit特性 
依赖Context而不是request，我重命名工厂类（TableLimitFactory）来reflect它。</p>
<p>Limit在导出时正确地显示行信息，Limit具有一个isExported()方法。</p>
<p>使用Limit和LimitFactory的示例如下：</p><pre class="programlisting">Context context = new HttpServletRequestContext(request);<br>LimitFactory limitFactory = new TableLimitFactory(context, tableId);<br>Limit limit = new TableLimit(limitFactory);<br></pre>
<p>设置row属性，仅设置totalRows和默认的行显示：</p><pre class="programlisting">limit.setRowAttributes(totalRows, DEFAULT_ROWS_DISPLAYED);<br></pre>
<p>RequestLimitFactory具有另一个如果没有指定tableId将设置为ec的构造函数：</p><pre class="programlisting">Context context = new HttpServletRequestContext(request);<br>LimitFactory limitFactory = new TableLimitFactory(context);<br></pre></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="d0e1121"></a>15.1.11.&nbsp;TableTag的saveFilterSort属性</h3></div></div>
</div>
<p>saveFilterSort属性被state属性取代，state属性参照State接口并能插接不通的关于 如何保存表状态的实现。</p>
<p>State接口如下：</p><pre class="programlisting">public interface State {<br>    public void saveParameters(TableModel model, Map parameters);<br>    public Map getParameters(TableModel model);<br>}<br></pre>
<p>表新增了两个属性：state和stateAttr。state属性使用预设的四种 
状态（default、notifyToDefault、persist和notifyToPersist）之一， 
你也可以插接自己的实现。default状态不维持任何状态；persist状态没有任何参数传入，将一直维持表的状态； 
notifyToDefault状态将一直维持表的状态直到你传入参数告诉它回到default状态；notifyToPersist状态 
将一直维持当前状态直到你传入参数告诉它维持persisted状态。stateAttr为指定参数提供了一条途径，你 
也可以使用属性文件在全局范围内指定它。为了向后兼容，默认参数一直为useSessionFilterSort。</p>
<p>如果你想state按照不同方式工作你只要实现State接口，然后使用TableTag的state属性来指定实现类的 全路径。</p></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="d0e1133"></a>15.1.12.&nbsp;ColumnTag的showTotal属性</h3></div></div>
</div>
<p>列新增了两个属性：calc和calcTitle：</p><pre class="programlisting">&lt;ec:column property="data" calc="total" calcTitle="Total:" /&gt;</pre>
<p>calc属性实现具有唯一方法的Calc接口：</p><pre class="programlisting">public interface Calc {<br>    public Number getCalcResult(TableModel model, Column column);<br>}<br></pre>
<p>它传入model和column，并返回一个Number型的值。默认的实现为总计和平均值。</p>
<p>为了使用定制的Calc，只需要使用ColumnTag的calc属性来指定实现Calc接口的实现类的 全路径。</p>
<p>Calc为singleton并且不是线程安全的，因此不要定义任何类变量。</p>
<p>showTotal因为不再适用在新版中被删除，我也删除了表中的totalTitle。</p></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="d0e1152"></a>15.1.13.&nbsp;Image名</h3></div></div>
</div>
<p>search图片名从search变为filter。</p></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="d0e1157"></a>15.1.14.&nbsp;FormTag / InputTag 
Deprecated</h3></div></div>
</div>
<p>FormTag和InputTag现在为deprecated。他们在新的html视图（view）中不再被使用。</p></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="d0e1162"></a>15.1.15.&nbsp;RetrieveRowsCallbacks、FilterRowsCallback、SortRowsCallback</h3></div></div>
</div>
<p>Callbacks为singleton并且不是线程安全的，因此不要定义任何类变量。</p></div><div id="stickies-count" style="display: none;">0</div><img src ="http://www.blogjava.net/lucky/aggbug/33368.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-03-03 09:49 <a href="http://www.blogjava.net/lucky/archive/2006/03/03/33368.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Chapter 15. 1.0.1-M4升级说明(1)</title><link>http://www.blogjava.net/lucky/archive/2006/03/02/33170.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Thu, 02 Mar 2006 04:14:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/03/02/33170.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/33170.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/03/02/33170.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/33170.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/33170.html</trackback:ping><description><![CDATA[<div class="titlepage">
<div>
<div>
<h2 class="title"><a name="d0e932"></a>Chapter&nbsp;15.&nbsp;1.0.1-M4升级说明</h2></div></div>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e935"></a>15.1.&nbsp;变更概述</h2></div></div>
</div>
<p>下面的特性已经被更改：</p>
<div class="itemizedlist">
<ul type="disc"><li>
<p>HtmlView基于原来代码的实现已经deprecated</p>
</li><li>
<p>Cell接口更简单</p>
</li><li>
<p>增加RowTag</p>
</li><li>
<p>AutoGenerateColumns变为singleton，更易添加列属性</p>
</li><li>
<p>Extended Attributes方法名变更</p>
</li><li>
<p>TableTag的collection属性被删除</p>
</li><li>
<p>BaseModel更名为TableModel</p>
</li><li>
<p>Properties和ResourceBundle现在为Preferences和Messages</p>
</li><li>
<p>pageContext被Context接口代替</p>
</li><li>
<p>Limit和LimitFactory的语法变更，更易于使用</p>
</li><li>
<p>TableTag的saveFilterSort属性被state属性代替</p>
</li><li>
<p>ColumnTag的showTotal属性被calc属性代替</p>
</li><li>
<p>search图片的名称变为filter</p>
</li><li>
<p>FormTag/InputTag为deprecated</p>
</li><li>
<p>RetrieveRowsCallbacks、FilterRowsCallback、SortRowsCallback都变为singletons</p></li></ul></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="d0e986"></a>15.1.1.&nbsp;HtmlView</h3></div></div>
</div>
<p>我把和旧的view相关的代码：原始的view、cell和相关代码放到deprecated文件夹。 
原因是新的view代码非常成功，所以没有必要使用旧的代码。使用新代码构建定制view请参考 
view包中的HtmlView或CompactView。</p></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="d0e991"></a>15.1.2.&nbsp;Cell</h3></div></div>
</div>
<p>Cell接口已经改变，原因是想结束混乱以提高灵活性。以前对于如何处理区分html和export显示值 
不是十分明显。现在Column值设置html，Column的propertyValue设置export。另外因为Column值和 
propertyValue值被重写。现在他们在view中是不可见的。</p>
<p>cell现在是singleton并且不再线程安全，因此不要定义任何类变量。改变的原因是为 
了Cell接口能更简单地被使用。init()和destroy()方法作为singleton更灵活但是处于一种混乱的状态。</p>
<p>Cell接口如下：</p><pre class="programlisting">public interface Cell {<br><br>    /**<br>     * The display that will be used for the exports.<br>     */<br>    public String getExportDisplay(TableModel model, Column column);<br><br>    /**<br>     * The html that will be displayed in the table.<br>     */<br>    public String getHtmlDisplay(TableModel model, Column column);<br>}<br></pre>
<p>现在得到导出和html显示存在明显的区别。更重要的，需要返回字符串。列值和属性值不再 
需要设置。另一个细微的区别是：BaseModel已经被TableModel取代。这种改变是的不再需要一个 基础包（base 
package），这意味着不再需要BaseModel。</p>
<p>cell变为singleton不会导致使用复杂，如果你定义了任何类变量只需要把他们放到正确的 方法那么他们就能被任何其他方法使用。</p>
<p>BaseCell被删除因为不再需要添加任何值。替代的是AbstractCell，虚拟方法 
getCellValue被用来返回cell的值。这种方法非常容易使用并不需要关心markup。查看 
AbstractCell也是有意义的，你会发现这代码实现的多么简单。然而，很多时候需要做的仅仅是 实现Cell接口：</p>
<p>DisplayCell：</p><pre class="programlisting">public class DisplayCell extends AbstractCell {<br>    public String getExportDisplay(TableModel model, Column column) {<br>        return column.getPropertyValueAsString();<br>    }<br><br>    protected String getCellValue(TableModel model, Column column) {<br>        return column.getValueAsString();<br>    }<br>}<br></pre>
<p>AbstractCell： </p><pre class="programlisting">public abstract class AbstractCell implements Cell {<br>    public String getExportDisplay(TableModel model, Column column) {<br>        return getCellValue(model, column);<br>    }<br><br>    public String getHtmlDisplay(TableModel model, Column column) {<br>        HtmlBuilder html = new HtmlBuilder();<br>        CellBuilder.tdStart(html, column);<br>        CellBuilder.tdBody(html, getCellValue(model, column));<br>        CellBuilder.tdEnd(html);<br>        return html.toString();<br>    }<br><br>    /**<br>     * A convenience method to get the display value.<br>     */<br>    protected abstract String getCellValue(TableModel model, Column column);<br>}<br></pre></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="d0e1016"></a>15.1.3.&nbsp;RowTag</h3></div></div>
</div>
<p>RowTag&lt;ec:row&gt; 现在被需要，它被用来替代columns。 现在看来它一直被需要。它不知道表中到底有多少列，最近重构的时候我通过 
Table -&gt; Row -&gt; Column使结构固定来合并得到更好的灵活性。将来我可能提供更多的 
特性，因为我知道eXtremeTable有着清晰的架构。</p>
<p>典型的eXtremeTable如下：</p><pre class="programlisting">&lt;ec:table<br>  items="presidents"<br>  var="pres"<br>  action="${pageContext.request.contextPath}/presidents.run"<br>  &gt;<br>  &lt;ec:row&gt;<br>    &lt;ec:column property="name"/&gt;<br>    &lt;ec:column property="term"/&gt;<br>  &lt;/ec:row&gt;<br>&lt;/ec:table&gt;</pre></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="d0e1025"></a>15.1.4.&nbsp;AutoGenerateColumns</h3></div></div>
</div>
<p>AutoGenerateColumns得到了很大的提高，现在你只需要设置你需要的属性。 
当你添加列到ColumnHandler使，defaults将别自动调用。</p>
<p>AutoGenerateColumns为singleton并且不是线程安全的，因此不要定义任何类变量。</p>
<p>现在它的实现可能如下：</p><pre class="programlisting">public class AutoGenerateColumnsImpl implements AutoGenerateColumns {<br>    public void addColumns(TableModel model) {<br>        Iterator iterator = columnsToAdd().iterator();<br>        while (iterator.hasNext()) {<br>            Map columnToAdd = (Map) iterator.next();<br>            Column column = new Column(model);<br>            column.setProperty((String) columnToAdd.get(PROPERTY));<br>            column.setCell((String) columnToAdd.get(CELL));<br>            model.getColumnHandler().addAutoGenerateColumn(column);<br>        }<br>    }<br>}<br></pre></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="d0e1036"></a>15.1.5.&nbsp;Extended Attributes</h3></div></div>
</div>
<p>addExtendedAttributes方法重命名使得如何使用这个特性更清晰。 
因此RowTag的addExtendedAttributes现在变为addRowAttributes，ColumnTag变 
为addColumnAttributes，TableTag变为addTableAttributes，ExportTag变 
为addExportAttributes。另外你参考正确的model bean（它的实现更清晰）， 将知道如何添加属性到你的cell、view.....</p>
<p>使用ExportCsvTag的示例如下：</p><pre class="programlisting">public void addExportAttributes(Export export) {<br>    String view = export.getView();<br>    if (StringUtils.isBlank(view)) {<br>        export.setView(TableConstants.CSV);<br>        export.setImageName(TableConstants.CSV);<br>    }<br>    export.addAttribute(CsvView.DELIMITER, getDelimiter());<br>}<br></pre>
<p>为了得到delimiter属性值你只需要从Export bean中get它： </p><pre class="programlisting">Export export = model.getExportHandler().getCurrentExport();<br>String delimiter = export.getAttributeAsString(DELIMITER);</pre>
<p>现在你需要在ExportTag中覆盖它，你只需要调用setter方法。如果是新的属性，那么使用 
可以和前一版一样使用addAttribute()方法。为了得到值，首先从ExportHandler得到Export， 
然后调用需要的getter方法。这和使用其它tags一样。</p>
<p>在RowTag和ColumnTag中增加了两个新的callback方法：modifyRowAttributes和 
modifyColumnAttributes，因此你可以在rows/columns被处理时改变属性值。</p></div></div><div id="stickies-count" style="display: none;">0</div><img src ="http://www.blogjava.net/lucky/aggbug/33170.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-03-02 12:14 <a href="http://www.blogjava.net/lucky/archive/2006/03/02/33170.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Chapter 14. Utilities</title><link>http://www.blogjava.net/lucky/archive/2006/02/28/32921.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Tue, 28 Feb 2006 13:06:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/02/28/32921.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/32921.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/02/28/32921.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/32921.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/32921.html</trackback:ping><description><![CDATA[<div class="chapter" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title"><a name="d0e917"></a>Chapter&nbsp;14.&nbsp;Utilities</h2></div></div>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e920"></a>14.1.&nbsp;引言</h2></div></div>
</div>
<p>eXtremeTable包含许多Utility类。在这里我只简单地讨论一些，你可以通过javadocs 得到更多的信息。</p></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e925"></a>14.2.&nbsp;HtmlBuilder</h2></div></div>
</div>
<p>封装了所有html语法的类。这个简单类的使你能够写出更干净的html代码，而不用担心null或空字符串。 一个span标签的示例代码如下：</p><pre class="programlisting">HtmlBuilder html = new HtmlBuilder();<br>html.span().styleClass(FORM_BUTTONS).close();<br>html.append(formButtons);<br>html.spanEnd();<br>return html.toString();</pre></div></div><div id="stickies-count" style="display: none;">0</div><img src ="http://www.blogjava.net/lucky/aggbug/32921.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-02-28 21:06 <a href="http://www.blogjava.net/lucky/archive/2006/02/28/32921.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Chapter 13. AutoGenerateColumns</title><link>http://www.blogjava.net/lucky/archive/2006/02/28/32918.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Tue, 28 Feb 2006 12:50:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/02/28/32918.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/32918.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/02/28/32918.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/32918.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/32918.html</trackback:ping><description><![CDATA[<div class="chapter" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title"><a name="d0e886"></a>Chapter&nbsp;13.&nbsp;AutoGenerateColumns</h2></div></div>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e889"></a>13.1.&nbsp;引言</h2></div></div>
</div>
<p>大多数情况下你按照你需要的列来设计数据库表。但是，有时候需要运行时动态生成一些列。 
为了实现这点，eXtremeTable需要使用ColumnsTag并设置autoGenerateColumns属性。 </p>
<p>AutoGenerateColumns为singleton并且不是线程安全的，因此不要定义任何类变量。</p></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e896"></a>13.2.&nbsp;ColumnsTag</h2></div></div>
</div>
<p>ColumnsTag只有autoGenerateColumns这一个属性。所有你必须做的就是实现AutoGenerateColumns接口， 
并设置autoGenerateColumns属性为类的全路径。</p><pre class="programlisting">&lt;ec:table<br>  items="presidents"<br>  action="${pageContext.request.contextPath}/autoGenerateColumns.run"<br>  title="Presidents"<br>  &gt;<br>  &lt;ec:columns autoGenerateColumns="org.extremesite.controller.AutoGenerateColumnsImpl"/&gt;<br>&lt;/ec:table&gt;</pre>
<p>AutoGenerateColumns接口只有一个方法：</p><pre class="programlisting">public void addColumns(TableModel model);</pre>
<p>你需要做的就是添加列（columns）到model里。最简单的示例如下：</p><pre class="programlisting">public class AutoGenerateColumnsImpl implements AutoGenerateColumns {<br>    public void addColumns(TableModel model) {<br>        Iterator iterator = columnsToAdd().iterator();<br>        while (iterator.hasNext()) {<br>            Map columnToAdd = (Map) iterator.next();<br>            Column column = new Column(model);<br>            column.setProperty((String) columnToAdd.get(PROPERTY));<br>            column.setCell((String) columnToAdd.get(CELL));<br>            model.getColumnHandler().addAutoGenerateColumn(column);<br>        }<br>    }<br>}<br></pre>
<p>示例中columnsToAdd()方法简单返回一个包含生成列（columns）需要的所有信息的集合。 
作为参考，下面是我在eXtremeComponents网站实例中使用的columnsToAdd()方法：</p><pre class="programlisting">private List columnsToAdd() {<br>  List columns = new ArrayList();<br>  columns.add(columnToAdd("fullName", "display"));<br>  columns.add(columnToAdd("nickName", "display"));<br>  columns.add(columnToAdd("term", "display"));<br>  columns.add(columnToAdd("born", "date"));<br>  columns.add(columnToAdd("died", "date"));<br>  columns.add(columnToAdd("career", "display"));<br><br>  return columns;<br>}<br><br>private Map columnToAdd(String property, String cell) {<br>  Map column = new HashMap();<br>  column.put(Column.PROPERTY, property);<br>  column.put(Column.CELL, cell);<br>  return column;<br>}<br></pre>
<p>另外，我想声明的是只创建列一次。eXtremeTable为了高效，不会每行创建一列， 
而是通过循环持续插入新列值到已经存在的列。记住TableModel能够访问Context，因此 
你可以在Controller（Spring）或Action（Struts）中定义样式（look like）并通过request传输集合。 
所以你得AutoGenerateColumns实现只需要构建列（Columns）并添加到model.columns里。</p></div></div><div id="stickies-count" style="display: none;">0</div><img src ="http://www.blogjava.net/lucky/aggbug/32918.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-02-28 20:50 <a href="http://www.blogjava.net/lucky/archive/2006/02/28/32918.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Chapter 12. Limit</title><link>http://www.blogjava.net/lucky/archive/2006/02/28/32916.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Tue, 28 Feb 2006 12:47:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/02/28/32916.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/32916.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/02/28/32916.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/32916.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/32916.html</trackback:ping><description><![CDATA[<div class="chapter" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title"><a name="d0e806"></a>Chapter&nbsp;12.&nbsp;Limit</h2></div></div>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e809"></a>12.1.&nbsp;Limit指南</h2></div></div>
</div>
<p>默认的情况下eXtremeTable取得所有的结果集然后处理Beans集合，这样的好处是 
你可以随意进行排序、过滤和分页操作。你只需要组装Beans集合并让eXtremeTable知道如何 
引用它。这样的操作对于小到中等数据量的结果集非常有效，当结果集很大时这将非常糟糕。 这是一个判断，但我更喜欢描述如何做出我的技术决定。如果您认为在性能上有问题， 
那么最好是使用一个profiler工具记录并查看它。有许多开源和商业的profiler工具可以帮助 
你做出最好的判断。因此，假设我们发现了性能上存在问题，需要我们自己来处理分页。 </p>
<p>手动处理分页意味着你一次只想取得一页显示需要的结果集。同时，你需要自己处理排序、过滤和分页。 
下面的讨论是基于我假设你从数据库中取得集合，当然同样的原理能应用到任何地方。</p>
<p>这是一个重要的部分。为了得到较小的结果集，你可以创建一个普通的查询语句，但是limit你得到的结果集。 
在Sybase和SQLServer中你可以使用<span class="emphasis"><em>rowcount</em></span>命令，在MySql中你可以使用<span class="emphasis"><em>limit</em></span>命令。 我不知道其他数据库怎么使用，但我确信每个数据库都有相似的功能。 
也就是说当用户浏览第一页是得到第一页需要的 结果集，当用户浏览下一页时，再得到下一页需要的结果集。</p>
<p>使用Sybase的开发人员可能会说:<span class="emphasis"><em>rowcount</em></span>命令总是从第一条开始，那么当我到第二页时我也必须 从第一条数据开始。 
是的，你现在得到的是两页的结果集，而不需要得到所有的结果集。当你到第三页时，你只需要得到三页的结果集。。。。。。 
其他数据库比如MySQL，允许你精确地得到你想要的那段数据，这样你就可以只得到当前页面显示需要的结果集。</p>
<p>为了知道用户想如何排序和过滤，他们想浏览哪一页，一页需要显示几条结果，eXtremeTable有一个使用LimitFactory 
创建的名为Limit的简便接口：</p></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e831"></a>12.2.&nbsp;创建Limit</h2></div></div>
</div>
<p>首先你需要通过LimitFactory得到一个Limit实例：</p><pre class="programlisting">Context context = new HttpServletRequestContext(request);<br>LimitFactory limitFactory = new TableLimitFactory(context, tableId);<br>Limit limit = new TableLimit(limitFactory);<br></pre>
<p>Limit对象定义了limit结果集的所有方法。</p>
<p>TableLimitFactory具有另外一个构造函数，如果没有指定tableId的话默认的tableId将为ec。</p><pre class="programlisting">Context context = new HttpServletRequestContext(request);<br>LimitFactory limitFactory = new TableLimitFactory(context);<br>Limit limit = new TableLimit(limitFactory);<br></pre></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e844"></a>12.3.&nbsp;Filter和Sort属性</h2></div></div>
</div>
<p>当你对Limit实例化时，实例化对象包含两个对象：FilterSet和Sort。</p><pre class="programlisting">private FilterSet filterSet;<br>private Sort sort;<br></pre>
<p>FilterSet包含一个过滤动作（Action）和一个过滤器对象数组。 
动作为TableConstants.FILTER_ACTION或TableConstants.CLEAR_ACTION。 
一个过滤器包含一个property和这个过滤器的值。</p><pre class="programlisting">private final String action;<br>private final Filter[] filters;<br></pre>
<p>Sort对象包含property和sortOrder。sortOrder为 
TableConstants.SORT_ASC或TableConstants.SORT_DESC：</p><pre class="programlisting">private Sort sort;</pre></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e859"></a>12.4.&nbsp;设置页和行属性</h2></div></div>
</div>
<p>设置行属性：</p><pre class="programlisting">limit.setRowAttributes(totalRows, DEFAULT_ROWS_DISPLAYED);<br></pre>
<p>下面是设置行属性可能用到的信息：</p><pre class="programlisting">private int rowStart;<br>private int rowEnd;<br>private int currentRowsDisplayed;<br>private int page;<br>private int totalRows;<br></pre>
<p>每个变量都有一个getter方法,我将不深入讲解属性的细节。</p></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e872"></a>12.5.&nbsp;Setup</h2></div></div>
</div>
<p>在你完成所有的定制工作：排序、过滤.....定制的Controller（Spring）或者Action（Struts）或者其他类似的框架后， 
另外你需要创建一个callback，eXtremeTable已经提供了一个名为LimitCallback的实现。为了使用你只需要设置表 
属性：retrieveRowsCallback、filterRowsCallback和sortRowsCallback：</p><pre class="programlisting">&lt;ec:table<br>  items="presidents"<br>  retrieveRowsCallback="limit"<br>  filterRowsCallback="limit"<br>  sortRowsCallback="limit"<br>  action="${pageContext.request.contextPath}/limit.run"<br>  title="Presidents"<br>  &gt;<br>  &lt;ec:row&gt;<br>    &lt;ec:column property="fullName" title="Name"/&gt;<br>    &lt;ec:column property="nickName" /&gt;<br>    &lt;ec:column property="term" /&gt;<br>    &lt;ec:column property="born" cell="date"/&gt;<br>    &lt;ec:column property="died" cell="date"/&gt;<br>    &lt;ec:column property="career" /&gt;<br>  &lt;/ec:row&gt;<br> &lt;/ec:table&gt;<br></pre>
<p>使用callback需要做的唯一事情是传输集合到request，同时传输totalRows属性。 
totalRows表示总行数，使用PaginationCallback.TOTAL_ROWS静态变量将易于维护。 
如果JSP页面使用了两个（以上）eXtremeTable的话你可以利用tableId分别传输totalRows。 
例如如果tableId名为pres，你可以如下处理：</p><pre class="programlisting">request.setAttribute("pres", presidents);<br>request.setAttribute("pres_totalRows", new Integer(""+totalRows));<br></pre></div>
<p><span class="emphasis"><em>译者注:关于limit使用的更详细信息，请参考《Limit指南》。</em></span></p></div><div id="stickies-count" style="display: none;">0</div><img src ="http://www.blogjava.net/lucky/aggbug/32916.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-02-28 20:47 <a href="http://www.blogjava.net/lucky/archive/2006/02/28/32916.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Chapter 11. Messages</title><link>http://www.blogjava.net/lucky/archive/2006/02/28/32781.html</link><dc:creator>Lucky</dc:creator><author>Lucky</author><pubDate>Tue, 28 Feb 2006 00:54:00 GMT</pubDate><guid>http://www.blogjava.net/lucky/archive/2006/02/28/32781.html</guid><wfw:comment>http://www.blogjava.net/lucky/comments/32781.html</wfw:comment><comments>http://www.blogjava.net/lucky/archive/2006/02/28/32781.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/lucky/comments/commentRss/32781.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/lucky/services/trackbacks/32781.html</trackback:ping><description><![CDATA[<div class="titlepage">
<div>
<div>
<h2 class="title"><a name="d0e739"></a>Chapter&nbsp;11.&nbsp;Messages</h2></div></div>
</div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e742"></a>11.1.&nbsp;资源绑定</h2></div></div>
</div>
<p>为了设置资源绑定，你应该如下例所示在/WEB-INF/web.xml文件中声明一个context-param，并 指定你的资源文件的路径：</p><pre class="programlisting">&lt;context-param&gt;<br>  &lt;param-name&gt;extremecomponentsMessagesLocation&lt;/param-name&gt;<br>  &lt;param-value&gt;org/extremesite/resource/extremecomponentsResourceBundle&lt;/param-value&gt;<br>&lt;/context-param&gt;</pre>
<p>本示例中资源文件为extremecomponentsResourceBundle，它可以为任何名或者使用已经存在的资源文件。</p>
<p>如果你不指定locale，则它将根据你的servlet request来决定使用哪个资源文件。 
在eXtremeTable中可以通过使用TableTag的locale属性来设置它。</p><pre class="programlisting">&lt;ec:table<br>  items="presidents"<br>  action="${pageContext.request.contextPath}/public/demo/locale.jsp"<br>  title="table.title.president"<br>  locale="de_DE"<br>  &gt;<br>  ...<br>&lt;/ec:table&gt;</pre>
<p>在这里eXtremeTable将寻找德文资源文件。</p></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e757"></a>11.2.&nbsp;全局资源</h2></div></div>
</div>
<p>eXtremeTable使用一些全局的keys来与用户交互，包括：状态栏的文本信息，Rows Displayed 
droplist和不同的tooltips。如果你足够幸运，eXtremeTable已经提供了相应的语言支持 
的话，那么你什么也不用担心。否则的话，你需要申明下列keys：</p><pre class="programlisting">statusbar.resultsFound={0} results found, displaying {1} to {2}<br>statusbar.noResultsFound=There were no results found.<br><br>toolbar.firstPageTooltip=First Page<br>toolbar.lastPageTooltip=Last Page<br>toolbar.prevPageTooltip=Previous Page<br>toolbar.nextPageTooltip=Next Page<br>toolbar.filterTooltip=Filter<br>toolbar.clearTooltip=Clear<br><br>toolbar.clearText=Clear<br>toolbar.firstPageText=First<br>toolbar.lastPageText=Last<br>toolbar.nextPageText=Next<br>toolbar.prevPageText=Prev<br>toolbar.filterText=Filter<br><br>column.headercell.sortTooltip=Sort By<br><br>column.calc.total=Total<br>column.calc.average=Average<br></pre>
<p>现在仅支持英语和德语。如果你使用其他语言的话，并能提供相应的翻译的话我将不胜感激。你可以通过 
extremecomponents@gmail.com发送给我。</p>
<p><span class="emphasis"><em>译者注:我已经提供了中文和日文的资源文件。</em></span></p></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e769"></a>11.3.&nbsp;TableTag</h2></div></div>
</div>
<p>TableTag属性中能够使用locale方式指定的是：imagePath和title。</p>
<p>在eXtremeTable中，imagePath属性有一个特定的key：table.imagePath。你可以在你的资源文件中 
设置这个key为特定语言的目录结构。例如：德文图片可能放在de文件夹下，那么你可以在相应的资源文件中 进行如下设置：</p><pre class="programlisting">table.imagePath=/extremesite/images/table/de/*.gif</pre>
<p>title有一点不同，如果你指定的title属性值包含dot (.)并且你定义了一个资源文件，那么 
eXtremeTable将寻找匹配的key。例如，如果你像下例一样在表中指定属性title="table.title.president"：</p><pre class="programlisting">&lt;ec:table<br>  items="presidents"<br>  action="${pageContext.request.contextPath}/public/demo/locale.jsp"<br>  title="table.title.president"<br>  &gt;<br>  ...<br>&lt;/ec:table&gt;</pre>
<p>那么eXtremeTable将在属性文件中寻找匹配的key：</p><pre class="programlisting">table.title.president=US Präsidenten</pre></div>
<div class="section" lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both;"><a name="d0e786"></a>11.4.&nbsp;ColumnTag</h2></div></div>
</div>
<p>ColumnTag属性中能够使用locale方式指定的是：format和title。</p>
<p>在eXtremeTable中，format属性有一个特定的key：table.fomat.<span class="emphasis"><em>type</em></span>。参考属性文件的讨论 
来了解更多的细节，他们具有同样的概念。日期和货币的format类型定义可能如下所示：</p><pre class="programlisting">column.format.date=MM/dd/yyyy<br>column.format.currency=$###,###,##0.00<br></pre>
<p>title有一点不同，如果你指定的title属性值包含dot (.)并且你定义了一个资源文件，那么 
eXtremeTable将寻找匹配的key。例如，如果你像下例一样在列中指定属性title="table.column.nickName"：</p><pre class="programlisting">&lt;ec:table<br>  items="presidents"<br>  action="${pageContext.request.contextPath}/public/demo/locale.jsp"<br>  title="table.title.president"<br>  &gt;<br>  &lt;ec:row&gt;<br>    &lt;ec:column property="nickName" title="table.column.nickName" /&gt;<br>  &lt;/ec:row&gt;<br>&lt;/ec:table&gt;</pre>
<p>那么eXtremeTable将在属性文件中寻找匹配的key：</p><pre class="programlisting">table.column.nickName=Spitzname</pre></div><img src ="http://www.blogjava.net/lucky/aggbug/32781.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/lucky/" target="_blank">Lucky</a> 2006-02-28 08:54 <a href="http://www.blogjava.net/lucky/archive/2006/02/28/32781.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>