锘??xml version="1.0" encoding="utf-8" standalone="yes"?>成人婷婷网色偷偷亚洲男人的天堂,亚洲色图黄色小说,亚洲精品无码久久毛片http://www.tkk7.com/usherlight/category/29407.html澶╁鉤灞變笂鐧戒簯娉夛紝浜戣嚜鏃犲績姘磋嚜闂層備綍蹇呭鍐插北涓嬪幓錛屾洿娣繪嘗嫻悜浜洪棿錛?/description>zh-cnThu, 03 Sep 2009 22:56:43 GMTThu, 03 Sep 2009 22:56:43 GMT60Extjs Tree + JSON + Struts2 鐨勬墍鏈夌ず渚嬫簮浠g爜鍜寃ar鏂囦歡涓嬭澆http://www.tkk7.com/usherlight/archive/2009/09/01/293417.html浜戣嚜鏃犲績姘磋嚜闂?/dc:creator>浜戣嚜鏃犲績姘磋嚜闂?/author>Tue, 01 Sep 2009 03:07:00 GMThttp://www.tkk7.com/usherlight/archive/2009/09/01/293417.htmlhttp://www.tkk7.com/usherlight/comments/293417.htmlhttp://www.tkk7.com/usherlight/archive/2009/09/01/293417.html#Feedback1http://www.tkk7.com/usherlight/comments/commentRss/293417.htmlhttp://www.tkk7.com/usherlight/services/trackbacks/293417.htmlExtjs Tree + JSON + Struts2涓垜浠嬬粛浜嗗浣曞紓姝ュ姞杞戒竴涓狤xtjs鐨勬爲錛屼絾鏄緢澶氱綉鍙嬬暀璦璇翠笉鑳芥垚鍔熸搷浣溿傜幇鍦ㄦ垜鑷繁鍋氫簡涓涓墍鏈夋簮浠g爜鐨勫寘錛屼緵澶у涓嬭澆銆?br /> 鏈夊嚑鐐逛簨欏硅澶у娉ㄦ剰
1銆乥logjava鐨勬枃浠朵笂杞借姹傚崟涓枃浠朵笉鑳借秴榪?M錛屾墍浠ワ紝鎴戞妸web-inf鐩綍涓嬬殑鎵鏈塲ar鏂囦歡鍒犻櫎浜嗐?br /> 鎵鏈塲ar鏂囦歡鐨勫垪琛ㄦ槸錛?br /> commons-beanutils-1.7.0.jar
commons-collections-3.2.jar
commons-digester-1.6.jar
commons-lang-2.3.jar
commons-logging-1.1.jar
dom4j-1.6.1.jar
ezmorph-1.0.4.jar
freemarker-2.3.8.jar
javassist-3.8.1.jar
json-lib-2.2.1-jdk15.jar
log4j-1.2.13.jar
ognl-2.6.11.jar
struts2-core-2.0.11.jar
xml-apis-1.0.b2.jar
xwork-2.0.4.jar
娉ㄦ剰綰㈣壊鏍囪鐨勯偅涓猨ar鏂囦歡鏄笂嬈¢殢絎斾腑閬楁紡浜嗙殑銆傝繖涓枃浠舵槸闇瑕佺殑銆?br /> 2銆乥logjava瑕佹眰涓婁紶鏂囦歡涓嶈兘鏄痺ar鏂囦歡錛屾墍浠ユ垜鎶妛ar鏂囦歡鏀規垚浜唕ar鍚庣紑銆?br /> 鏂囦歡鐨刄RL錛?war鏂囦歡涓嬭澆



]]>
Extjs Tree + JSON + Struts2 http://www.tkk7.com/usherlight/archive/2008/02/19/180590.html浜戣嚜鏃犲績姘磋嚜闂?/dc:creator>浜戣嚜鏃犲績姘磋嚜闂?/author>Tue, 19 Feb 2008 01:27:00 GMThttp://www.tkk7.com/usherlight/archive/2008/02/19/180590.htmlhttp://www.tkk7.com/usherlight/comments/180590.htmlhttp://www.tkk7.com/usherlight/archive/2008/02/19/180590.html#Feedback38http://www.tkk7.com/usherlight/comments/commentRss/180590.htmlhttp://www.tkk7.com/usherlight/services/trackbacks/180590.html {"cls":"folder","id":10,"leaf":false,"children":[{"cls":"file","id":11,"leaf":true,"children":null,"text":"S600"},{"cls":"file","id":12,"leaf":true,"children":null,"text":"SLK200"}],"text":"Benz"}
鑰宔xtjs闇瑕佺殑鏁版嵁鏍煎紡濡備笅錛?br /> [{"cls":"folder","id":10,"leaf":false,"children":[{"cls":"file","id":11,"leaf":true,"children":null,"text":"S600"},{"cls":"file","id":12,"leaf":true,"children":null,"text":"SLK200"}],"text":"Benz"}]
鍖哄埆寰堝皬錛屽氨鍙浉宸渶澶栭潰鐨勪袱涓柟鎷彿銆備絾鏄皯浜嗚繖涓や釜鏂規嫭鍙鳳紝鍦╦son涓紝鍚箟榪ョ劧涓嶅悓錛屽墠鑰呰〃紺轟竴涓璞★紝鑰屽悗鑰呰〃紺轟竴涓暟緇勩傝宔xtjs涓? tree鐨刣ataloader闇瑕佺殑鏁版嵁蹇呴』鏄竴涓暟緇勩傝岃繖鏍風殑鏁版嵁鏍煎紡鏄痡son-plugin鑷姩鐢熸垚鐨勶紝鏃犳硶鏀瑰彉銆傛墍浠ワ紝鎴戞渶鍚庢斁寮冧簡json -plugin錛岃漿鑰屼嬌鐢╦son-lib鏉ヨВ鍐寵繖涓棶棰樸?br /> 1. 涓嬭澆json-lib, http://json-lib.sourceforge.net/
2. lib鐩綍涓嬬殑jar鏂囦歡娓呭崟錛?br /> commons-beanutils-1.7.0.jar
commons-collections-3.2.jar
commons-digester-1.6.jar
commons-lang-2.3.jar
commons-logging-1.1.jar
dom4j-1.6.1.jar
ezmorph-1.0.4.jar
freemarker-2.3.8.jar
javassist-3.8.1.jar
json-lib-2.2.1-jdk15.jar
log4j-1.2.13.jar
ognl-2.6.11.jar
struts2-core-2.0.11.jar
xml-apis-1.0.b2.jar
xwork-2.0.4.jar


棣栧厛閰嶇疆web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
  xmlns:xsi
="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation
="http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
>
  
<welcome-file-list>
    
<welcome-file>index.jsp</welcome-file>
  
</welcome-file-list>
  
<filter>
    
<filter-name>struts2</filter-name>
    
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
  
</filter>

  
<filter-mapping>
    
<filter-name>struts2</filter-name>
    
<url-pattern>/*</url-pattern>
  
</filter-mapping>
</web-app>

鐒跺悗鏄痵truts.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd"
>
   
<struts>
    
<constant name="struts.devMode" value="true"/>
    
<constant name="struts.i18n.encoding" value="UTF-8"/>
    
<package name="person" extends="struts-default">
        
<action name="menus" method="execute" class="com.lab.MenuAction">
            
<result>/menu.jsp</result>
        
</action>
    
</package>
</struts>

3. 鏍戠殑鑺傜偣妯″瀷錛堢渷鐣ヤ簡getter錛宻etter)
public class Menu {
    
private int id;
    
private String text;
    
private boolean leaf;
    
private String cls;
    
private List<Menu> children;
}

4. action
package com.lab;

import java.util.ArrayList;
import java.util.List;

import net.sf.json.JSONArray;

public class MenuAction {
    
private String menuString;
   
    
private List<Menu> menus;
   
    
public String execute() {

        menus 
= new ArrayList<Menu>();
       
        Menu benz 
= new Menu();
        benz.setText(
"Benz");
        benz.setCls(
"folder");
        benz.setLeaf(
false);
        benz.setId(
10);
        menus.add(benz);
       
        List
<Menu> benzList = new ArrayList<Menu>();
        benz.setChildren(benzList);
       
        Menu menu;
        menu 
= new Menu();
        menu.setText(
"S600");
        menu.setCls(
"file");
        menu.setLeaf(
true);
        menu.setId(
11);
        benzList.add(menu);
        menu 
= new Menu();
        menu.setText(
"SLK200");
        menu.setCls(
"file");
        menu.setLeaf(
true);
        menu.setId(
12);
        benzList.add(menu);
       
        Menu bmw 
= new Menu();
        bmw.setText(
"BMW");
        bmw.setCls(
"folder");
        bmw.setLeaf(
false);
        bmw.setId(
20);
        menus.add(bmw);
       
        List
<Menu> bmwList = new ArrayList<Menu>();
        bmw.setChildren(bmwList);
       
        menu 
= new Menu();
        menu.setText(
"325i");
        menu.setCls(
"file");
        menu.setLeaf(
true);
        menu.setId(
21);
        bmwList.add(menu);
       
        menu 
= new Menu();
        menu.setText(
"X5");
        menu.setCls(
"file");
        menu.setLeaf(
true);
        menu.setId(
22);
        bmwList.add(menu);
       
        JSONArray jsonObject 
= JSONArray.fromObject(menus);
        
try {
            menuString 
= jsonObject.toString();
        } 
catch (Exception e) {
            menuString 
= "ss";
        }

        
return "success";
    }

    
public String getMenuString() {
        
return menuString;
    }

    
public void setMenuString(String menuString) {
        
this.menuString = menuString;
    }
}

5. menu.jsp
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:property value="menuString" escape="false"/>

6. html欏甸潰鍜宩s
鎴戜嬌鐢ㄧ殑灝辨槸extjs鐨別xample涓殑reorder.html鍜宺eorder.js錛屾洿鏀逛簡reorder.js涓璽reeloader鐨刣ataurl錛?menus.action
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Reorder TreePanel</title>
<link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css" />

    
<!-- GC -->
     
<!-- LIBS -->
     
<script type="text/javascript" src="extjs/adapter/ext/ext-base.js"></script>
     
<!-- ENDLIBS -->
 
    
<script type="text/javascript" src="extjs/ext-all.js"></script>
<script type="text/javascript" src="reorder.js"></script>

<!-- Common Styles for the examples -->
<link rel="stylesheet" type="text/css" href="extjs/resources/css/example.css" />
</head>
<body>
<script type="text/javascript" src="../examples.js"></script><!-- EXAMPLES -->
<h1>Drag and Drop ordering in a TreePanel</h1>
<p>This example shows basic drag and drop node moving in a tree. In this implementation there are no restrictions and 
anything can be dropped anywhere except appending to nodes marked 
&quot;leaf&quot; (the files). <br></p>
<p>Drag along the edge of the tree to trigger auto scrolling while performing a drag and drop.</p>
<p>In order to demonstrate drag and drop insertion points, sorting was <b>not</b> enabled.</p>
<p>The data for this tree is asynchronously loaded with a JSON TreeLoader.</p>
<p>The js is not minified so it is readable. See <href="reorder.js">reorder.js</a>.</p>

<div id="tree-div" style="overflow:auto; height:300px;width:250px;border:1px solid #c3daf9;"></div>

</body>
</html>



js:
/*
 * Ext JS Library 2.0.1
 * Copyright(c) 2006-2008, Ext JS, LLC.
 * licensing@extjs.com
 *
 * http://extjs.com/license
 
*/

Ext.onReady(
function(){
    
// shorthand
    var Tree = Ext.tree;
   
    
var tree = new Tree.TreePanel({
        el:'tree
-div',
        autoScroll:
true,
        animate:
true,
        enableDD:
true,
        containerScroll: 
true,
        loader: 
new Tree.TreeLoader({
            dataUrl:'http:
//localhost:8080/lab/menus.action'
        })
    });

    
// set the root node
    var root = new Tree.AsyncTreeNode({
        text: 'Ext JS',
        draggable:
false,
        id:'source'
    });
    tree.setRootNode(root);

    
// render the tree
    tree.render();
    root.expand();
});

鎴戝凡緇忎笂浼犱簡瀹屾暣鐨刉ar鏂囦歡錛堝寘鍚墍鏈夋簮浠g爜錛夛紝瑙侊細Extjs Tree + JSON + Struts2 鐨勬墍鏈夌ず渚嬫簮浠g爜鍜寃ar鏂囦歡涓嬭澆



]]>
Struts2 and Ajax 錛嶏紞浣跨敤Dojo鍜孌ivhttp://www.tkk7.com/usherlight/archive/2008/02/10/179572.html浜戣嚜鏃犲績姘磋嚜闂?/dc:creator>浜戣嚜鏃犲績姘磋嚜闂?/author>Sun, 10 Feb 2008 12:56:00 GMThttp://www.tkk7.com/usherlight/archive/2008/02/10/179572.htmlhttp://www.tkk7.com/usherlight/comments/179572.htmlhttp://www.tkk7.com/usherlight/archive/2008/02/10/179572.html#Feedback6http://www.tkk7.com/usherlight/comments/commentRss/179572.htmlhttp://www.tkk7.com/usherlight/services/trackbacks/179572.html闃呰鍏ㄦ枃

]]>
主站蜘蛛池模板: 亚洲国产精品成人午夜在线观看| 国产日韩一区二区三免费高清| 亚洲黄片毛片在线观看| 黄页免费在线观看| 亚洲综合欧美色五月俺也去| 亚洲国产精品一区二区三区久久| 久久国产精品萌白酱免费| 亚洲激情视频图片| 国产亚洲色视频在线| 18禁网站免费无遮挡无码中文| 日日摸日日碰夜夜爽亚洲| 久久精品国产精品亚洲艾| 精品国产一区二区三区免费看 | h视频在线观看免费完整版| 久久久亚洲精华液精华液精华液 | 亚洲v高清理论电影| 免费无码又爽又刺激高潮| 国产午夜精品免费一区二区三区| 四虎必出精品亚洲高清| 亚洲国产精品无码av| 成人毛片免费播放| 无码少妇精品一区二区免费动态 | 国产一级高青免费| 韩国亚洲伊人久久综合影院| 亚洲成色在线综合网站| 免费一级特黄特色大片在线观看| 四虎精品视频在线永久免费观看| 国产日韩久久免费影院| 亚洲av无码成人精品国产 | 久久免费观看国产精品88av| 日本在线观看免费高清| 亚洲中文字幕无码爆乳| 亚洲老熟女@TubeumTV| 亚洲精品国产品国语在线| 亚洲A∨精品一区二区三区| 24小时日本在线www免费的| 222www在线观看免费| 最好免费观看高清在线| 国产精品玖玖美女张开腿让男人桶爽免费看 | 亚洲欧洲精品国产区| 亚洲av午夜福利精品一区|