现在的位置: 首页 > 综合 > 正文

smartclient–listgrid

2013年05月04日 ⁄ 综合 ⁄ 共 3442字 ⁄ 字号 评论关闭

哈哈 边学粤语,边工作,好好哦,鹅中意

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>ListGrid Test</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT> 
    <SCRIPT SRC=modules/ISC_History.js></SCRIPT>
    <SCRIPT SRC=modules/ISC_Core.js></SCRIPT>
    <SCRIPT SRC=modules/ISC_Foundation.js></SCRIPT>
    <SCRIPT SRC=modules/ISC_Containers.js></SCRIPT>
    <SCRIPT SRC=modules/ISC_Grids.js></SCRIPT>
    <SCRIPT SRC=modules/ISC_Forms.js></SCRIPT>
    <SCRIPT SRC=modules/ISC_DataBinding.js></SCRIPT>
	<SCRIPT SRC=modules/load_skin.js></SCRIPT>
  </head>
  <body>
  <script type="text/javascript">
  var countryData=[
  {country:"中国",dialect:"中国话",people:"中国人啦",size:"1",author:"shuting",remark:"无"},
    {country:"美国",dialect:"English",people:"美国人",size:"2",author:"舒婷",remark:"无"},
      {country:"英国",dialect:"English",people:"英国人",size:"1",author:"shuting",remark:"无"},
        {country:"韩国",dialect:"韩语",people:"韩国人",size:"1",author:"舒婷",remark:"无"},
          {country:"阿富汗",dialect:"English",people:"韩寒",size:"2",author:"shuting",remark:"无"},
            {country:"日本",dialect:"日本话",people:"小日本",size:"3",author:"舒婷",remark:"无"},
              {country:"柬埔寨",dialect:"English",people:"阿斯达",size:"4",author:"shuting",remark:"无"},
                {country:"蒙古",dialect:"English",people:"蒙古",size:"4",author:"舒婷",remark:"无"},
                  {country:"俄罗斯",dialect:"English",people:"俄罗斯",size:"1",author:"shuting",remark:"无"},
                    {country:"埃及",dialect:"English",people:"埃及",size:"1",author:"舒婷",remark:"文明古国"},
                      {country:"葡萄牙",dialect:"English",people:"葡萄牙",size:"5",author:"shuting",remark:"无"}
  ];
var cantoneseData=[
	{chinese:"你好",cantonese:"内侯",easy:"easy"},
	 {chinese:"高兴",cantonese:"勾恨",easy:"easy"},
	  {chinese:"荣幸",cantonese:"温恨",easy:"easy"},
	   {chinese:"身体",cantonese:"森台",easy:"easy"},
	    {chinese:"可好",cantonese:"给侯",easy:"easy"}
];
  country=[
  	{name:"country",title:"国名"},
  	{name:"dialect",title:"方言"},
  	{name:"people",title:"种类"},
  	{name:"size",title:"数量"},
  	{name:"author",title:"作者"},
  	{name:"remark",title:"备注"}
  ];
  
  cantonese=[
  	{name:"chinese",title:"国语"},
  	{name:"cantonese",title:"粤语"},
  	{name:"easy",title:"难易程度"}
  ]; 
  isc.ListGrid.create({
    ID: "countryList",
    width: 500,
    left:10,
    top:5,
    height:250,
  //dataSource: rbCountryTransactions, //远程数据库连接数据源
    autoFetchData: true,
    canEdit: true,
    autoSaveEdits: true,  
    fields:country, //对应的字段
    data:countryData, //数据来源
    alternateRecordStyles:true,
    canEdit:true,
    canDragRecordsOut:true,
    canAcceptDroppedRecords:true,
    canReorderRecords:true,
    canReorderFields:true,
    canResizeFields:true 
});
 
isc.ListGrid.create({
	ID:"Cantonese",
	left:25,
    top:350,
    width:300,
    height:500,
	autoFetchData:true,
	fields:cantonese,
	data:cantoneseData,
    alternateRecordStyles:true,
    canEdit:true,
    canDragRecordsOut:true,
    canAcceptDroppedRecords:true,
    canReorderRecords:true,
    canReorderFields:true,
    canResizeFields:true 
});
isc.IButton.create({
	ID:"insert",left:130,
	top:320,width:80,title:"新增词汇",click:"Cantonese.startEditingNew()"
});
isc.IButton.create({
    top:320, left: 30,width:80,
    title:"删除词汇",
    click:"Cantonese.discardAllEdits()"
});
isc.IButton.create({
    top:320, left: 220,
    title:"Save",
    click:"Cantonese.saveAllEdits()"
});
function deletefun(){
	isc.warn("暂时未提供此功能!");
}
  </script>
  </body>
</html>

抱歉!评论已关闭.