Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

treePanel json javaºǫ́

 function createTreeMenu(){//´´½¨Ò»¸öÊ÷µÄÃæ°å
 var treeMenu = new Ext.tree.TreePanel({
  lines : true,
  minSize : 150,
  border : false,
  root : new Ext.tree.AsyncTreeNode({text : 'root'}),
  loader : new Ext.tree.TreeLoader({dataUrl:'/extDemo/getData?action=treeMenu'})
 });
 
 var win = new Ext.Window({
  width : 600,
  height : 400,
  items : [treeMenu]
 });
 treeMenu.expandAll();
 win.show();
}
loaderÖеÄdataurl¶ÔÓ¦servletÖе÷ÓÃÒ»¸öÉú³ÉJsonµÄ·½·¨ÈçÏ£º
private String getTreeMenu(){
  List<Menu> list = new ArrayList<Menu>();
  
  for (int i = 0; i < 3; i++){
   Menu menu = new Menu();
   menu.setUrl(null);
   menu.setId("id_" + i);
   menu.setText("²Ëµ¥" + i);
   menu.setLeaf(false);
   for (int j = 0; j < 3; j++){
    Menu subMenu = new Menu();
    subMenu.setUrl("/extDemo/getData");
    subMenu.setId(i + "" + j);
    subMenu.setText("×Ӳ˵¥" + j);
    subMenu.setLeaf(true);
    menu.appendChild(subMenu);
   }
   list.add(menu);
  }
  
  return JSONArray.fromObject(list).toString();
 }
getTreeMenuÖеÄMenu´úÂëÈçÏ£º
public class Menu {
//ÒÔÏÂ×ֶεÄÃû×ÖÒ»¶¨ÒªÊÇÕâÑù£¬ÒòΪËüÃÇÒª¸úextÖеÄtreeNodeµÄÊôÐÔ¶ÔÓ¦.
 private String id;
 private String text;
 private String url;
 private boolean leaf;
 
 private List<Menu> children = new ArrayList<Menu>();
 public void appendChild(Menu subMenu){
  this.children.add(subMenu);
 }
/**»¹ÓкܶàgetºÍset·½·¨
*/
 
}


Ïà¹ØÎĵµ£º

ʹÓÃJavaµÄ´úÀí»úÖƽøÐÐÈÕÖ¾Êä³ö

ʾÀý´úÂëÈçÏÂ:
//LogProxy.java
package com.gc.action;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
public class LogProxy implements InvocationHandler{
 private ......

JAVAµÄÇ°ÊÀ½ñÉú

 -
JavaÊÇÓÉSun Microsystems¹«Ë¾ÓÚ1995Äê5ÔÂÍƳöµÄJava³ÌÐòÉè¼ÆÓïÑÔ£¨ÒÔϼò³ÆJavaÓïÑÔ£©ºÍJavaƽ̨µÄ×ܳơ£ÓÃJavaʵÏÖµÄHotJavaä¯ÀÀÆ÷£¨Ö§³ÖJava applet£©ÏÔʾÁËJavaµÄ÷ÈÁ¦£º¿çƽ̨¡¢¶¯Ì¬µÄWeb¡¢Internet¼ÆËã¡£´Ó´Ë£¬Java±»¹ã·º½ÓÊܲ¢Íƶ¯ÁËWebµÄѸËÙ·¢Õ¹£¬³£ÓõÄä¯ÀÀÆ÷ÏÖÔÚ¾ùÖ§³ÖJava applet¡£ÁíÒ»·½Ã棬Java¼¼ÊõÒ ......

Java ÊäÈë/Êä³ö

 ÔÚjavaÓïÑÔÖУ¬I/OµÄ·½Ê½ÊÇÁ÷µÄ·½Ê½¡£Á÷£¨stream£©ÕâÊǸöѧϰjavaÊäÈëÊä³öµÄ×î»ù±¾µÄ¸ÅÄî¡£Á÷ÊÇ×Ö½Ú´ÓÔ´µ½Ä¿µÄµÄÓÐÐòÐòÁС£Ò»·½ÃæÊÇ×Ö½Ú£¬Ò»·½ÃæÊÇÓÐÐòµÄ¡£Á÷ÃèÊöµÄÊÇÒ»¸ö¹ý³Ì£¬Ë³ÐòÑϸñ¡£Ò»¸öÐèÒª¼üÅÌÊäÈëµÄ³ÌÐò¿ÉÒÔÓÃÁ÷À´×öµ½ÕâÒ»µã¡£Á½ÖÖ»ù±¾µÄÁ÷ÊÇ£ºÊäÈëÁ÷ºÍÊä³öÁ÷¡£Äã¿ÉÒÔ´ÓÊäÈëÁ÷¶Á£¬µ«Äã²»ÄܶÔËüд¡£Òª´ÓÊäÈëÁ ......

java jdk5µÄ·ºÐÍÉùÃ÷

 ·ºÐÍÉùÃ÷¾ÍÊÇ·º·ºµÄÉùÃ÷ÀàÐÍ¡£ÎÒÃÇÓÃÆäËüµÄÓïÑÔ×öÒ»¸ö±È½Ï£º
JavascriptÉùÃ÷±äÁ¿£º var i= 1;var c = ‘char ’
VB ÉùÃ÷±äÁ¿£º dim i=1;dim c=’char’
Perl ÉùÃ÷±äÁ¿£º $i = 1; $c = ‘char’
ÕâЩ½Å±¾ÓïÑÔ£¬ÔÚÉùÃ÷±äÁ¿µÄʱºò£¬¸ù±¾¾Í²»ÏëjavaÄÇÑù»¹µÃÉùÃ÷ÀàÐÍ¡£ËûÃǵÄÀàÐÍÒѾ­× ......

Java¶ÔÏó´®Ðл¯ÊµÀý

 1.StudentList.java:
/**
 *
 * @author lucifer
 */
package JavaSerializable;
import java.util.*;
import java.io.*;
public class StudentList implements Serializable{
     Vector list = new Vector(6);
     public StudentList(){} ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ