treetest.jsp
来自「j2ee开发优秀的表格控件」· JSP 代码 · 共 452 行
JSP
452 行
<%@ taglib uri="/tld/extremecomponents" prefix="ec" %><html><head> <title>eXtremeTest</title> <style type="text/css">.eXtremeTable { margin: 0; padding: 0;}.eXtremeTable select { font-family: Verdana; font-size: 9px; border: solid 1px #EEE; width: 75px;}.eXtremeTable .tableRegion { border: 1px solid silver; padding: 2px; font-family:Verdana; font-size: 10px; margin-top: 7px;}.eXtremeTable .filter { background-color: #efefef;}.eXtremeTable .filter input { font-family: Verdana; font-size: 10px; width: 100%;}.eXtremeTable .filter select { font-family: Verdana; font-size: 9px; border: solid 1px #EEE; width: 100%;}.eXtremeTable .tableHeader { background-color: #308dbb; color: white; font-family:Verdana; font-size: 11px; font-weight: bold; text-align: left; padding-right: 3px; padding-left: 3px; padding-top: 4; padding-bottom: 4; margin: 0; border-right-style: solid; border-right-width: 1px; border-color: white;}.eXtremeTable .tableHeaderSort { background-color: #3a95c2; color: white; font-family:Verdana; font-size: 11px; font-weight: bold; text-align: left; padding-right: 3px; padding-left: 3px; padding-top: 4; padding-bottom: 4; border-right-style: solid; border-right-width: 1px; border-color: white;}.eXtremeTable .odd a, .even a { color: Black; font-size: 10px;}.eXtremeTable .odd td, .eXtremeTable .even td { padding-top: 2px; padding-right: 3px; padding-bottom: 2px; padding-left: 3px; vertical-align: middle; font-family:Verdana; font-size: 10px;}.eXtremeTable .odd { background-color: #FFFFFF;}.eXtremeTable .even { background-color: #dfe4e8;}.eXtremeTable .highlight td { color: black; font-size: 10px; padding-top: 2px; padding-right: 3px; padding-bottom: 2px; padding-left: 3px; vertical-align: middle; background-color: #fdecae;}.eXtremeTable .highlight a, .highlight a { color: black; font-size: 10px;}.eXtremeTable .toolbar { background-color: #F4F4F4; font-family:Verdana; font-size: 9px; margin-right: 1px; border-right: 1px solid silver; border-left: 1px solid silver; border-top: 1px solid silver; border-bottom: 1px solid silver;}.eXtremeTable .toolbar td { color: #444444; padding: 0px 3px 0px 3px; text-align:center;}.eXtremeTable .separator { width: 7px;}.eXtremeTable .statusBar { background-color: #F4F4F4; font-family:Verdana; font-size: 10px;}.eXtremeTable .filterButtons { background-color: #efefef; text-align: right;}.eXtremeTable .title { color: #444444; font-weight: bold; font-family:Verdana; font-size: 15px; vertical-align: middle;}.eXtremeTable .title span { margin-left: 7px;}.eXtremeTable .formButtons { display: block; margin-top: 10px; margin-left: 5px;}.eXtremeTable .formButton { cursor: pointer; font-family:Verdana; font-size:10px; font-weight: bold; background-color: #308dbb; color: white; margin-top: 5px; border: outset 1px #333; vertical-align: middle;}.eXtremeTable .tableTotal { background-color: #FFFFFF; border-top: solid 1px Silver; }.eXtremeTable .tableTotalEmpty { background-color: #FFFFFF; }</style> </head><% java.util.List presidents = new java.util.ArrayList(); %><% java.util.Map president = new java.util.HashMap(); %><% president.put("name", "George Washington"); %><% president.put("office", "President"); %><% president.put("nickname", "Father of His Country"); %><% president.put("term", "1789-1797"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "John Adams "); %><% president.put("president", "George Washington"); %><% president.put("office", "Vice President"); %><% president.put("term", "1789-1797"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "Thomas Jefferson "); %><% president.put("president", "George Washington"); %><% president.put("office", "Secretary of State"); %><% president.put("term", "1789-1794"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "Edmund Randolph"); %><% president.put("president", "George Washington"); %><% president.put("office", "Secretary of State"); %><% president.put("term", "1794"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "Timothy Pickering"); %><% president.put("president", "George Washington"); %><% president.put("office", "Secretary of State"); %><% president.put("term", "Dec. 1795"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "Alexander Hamilton"); %><% president.put("president", "George Washington"); %><% president.put("office", "Secretary of Treasury"); %><% president.put("term", "1789-1795"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "Oliver Wolcott, Jr."); %><% president.put("president", "George Washington"); %><% president.put("office", "Secretary of Treasury"); %><% president.put("term", "1795-97"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "Henry Knox"); %><% president.put("president", "George Washington"); %><% president.put("office", "Secretary of War"); %><% president.put("term", "1789-1795"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "Timothy Pickering"); %><% president.put("president", "George Washington"); %><% president.put("office", "Secretary of War"); %><% president.put("term", "1795-96"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "James McHenry"); %><% president.put("president", "George Washington"); %><% president.put("office", "Secretary of War"); %><% president.put("term", "1796-97"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "Edmund Randolph"); %><% president.put("president", "George Washington"); %><% president.put("office", "Attorney General"); %><% president.put("term", "1790-94"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "William Bradford"); %><% president.put("president", "George Washington"); %><% president.put("office", "Attorney General"); %><% president.put("term", "1794-95"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "Charles Lee"); %><% president.put("president", "George Washington"); %><% president.put("office", "Attorney General"); %><% president.put("term", "1795-97"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "John Adams"); %><% president.put("office", "President"); %><% president.put("nickname", "Atlas of Independence"); %><% president.put("term", "1797-1801"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "Thomas Jefferson "); %><% president.put("president", "John Adams"); %><% president.put("office", "Vice President"); %><% president.put("term", "1797-1801"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "Timothy Pickering"); %><% president.put("president", "John Adams"); %><% president.put("office", "Secretary of State"); %><% president.put("term", "1797-1800"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "John Marshall"); %><% president.put("president", "John Adams"); %><% president.put("office", "Secretary of State"); %><% president.put("term", "1800-1801"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "James McHenry"); %><% president.put("president", "John Adams"); %><% president.put("office", "Secretary of War"); %><% president.put("term", "1797-1800"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "Samuel Dexter"); %><% president.put("president", "John Adams"); %><% president.put("office", "Secretary of War"); %><% president.put("term", "1800-1801"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "Oliver Wolcott, Jr."); %><% president.put("president", "John Adams"); %><% president.put("office", "Secretary of Treasury"); %><% president.put("term", "1797-1801"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "Samuel Dexter"); %><% president.put("president", "John Adams"); %><% president.put("office", "Secretary of Treasury"); %><% president.put("term", "1801"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "Charles Lee"); %><% president.put("president", "John Adams"); %><% president.put("office", "Attorney General"); %><% president.put("term", "1797-1801"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "Thomas Jefferson"); %><% president.put("office", "President"); %><% president.put("nickname", "Man of the People, Sage of Monticello"); %><% president.put("term", "1801-09"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "Aaron Burr"); %><% president.put("president", "Thomas Jefferson"); %><% president.put("office", "Vice President"); %><% president.put("term", "1801-05"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "George Clinton"); %><% president.put("president", "Thomas Jefferson"); %><% president.put("office", "Vice President"); %><% president.put("term", "1805-09"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "James Madison"); %><% president.put("president", "Thomas Jefferson"); %><% president.put("office", "Secretary of State"); %><% president.put("term", "1801-09"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "Henry Dearborn"); %><% president.put("president", "Thomas Jefferson"); %><% president.put("office", "Secretary of War"); %><% president.put("term", "1801-09"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "Samuel Dexter"); %><% president.put("president", "Thomas Jefferson"); %><% president.put("office", "Secretary of Treasury"); %><% president.put("term", "1801"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "Albert Gallatin"); %><% president.put("president", "Thomas Jefferson"); %><% president.put("office", "Secretary of Treasury"); %><% president.put("term", "1801-09"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "Levi Lincoln"); %><% president.put("president", "Thomas Jefferson"); %><% president.put("office", "Attorney General"); %><% president.put("term", "1801-05"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "John C. Breckinridge"); %><% president.put("president", "Thomas Jefferson"); %><% president.put("office", "Attorney General"); %><% president.put("term", "1805-07"); %><% presidents.add(president); %><% president = new java.util.HashMap(); %><% president.put("name", "Ceasar A. Rodney"); %><% president.put("president", "Thomas Jefferson"); %><% president.put("office", "Attorney General"); %><% president.put("term", "1807-09"); %><% presidents.add(president); %><% request.setAttribute("pres", presidents); %><body style="margin:25px;"> <p style="font-family: Verdana;font-size:14px;"> Congratulations!! You have successfully configured eXtremeTable! </p> <br> <ec:tree items="pres" action="${pageContext.request.contextPath}/public/tree/treeTest.jsp" imagePath="${pageContext.request.contextPath}/images/table/*.gif" title="Presidents and Cabinet" width="60%" showPagination="false" parentAttribute="president" identifier="name" > <ec:row highlightRow="true"> <ec:column property="name" cell="tree"/> <ec:column property="office"/> <ec:column property="nickname"/> <ec:column property="term"/> </ec:row> </ec:tree> <br> </body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?