GridPanel分页不成功,读取java后台数据

[code="java"]
/**JS文件*/
Ext.onReady(function(){

/***DataGrid界面****/
var fields = ["id","time","source","destination","protocol","info"];

/*var dataUrl;*/

var proxy = new Ext.data.HttpProxy({
        url: 'dataPacket.action',
        method: 'POST'
});

var reader = new Ext.data.JsonReader(
    {totalProperty :'totalProperty',root:'root'},
    fields)

var store = new Ext.data.Store(
        { proxy: proxy, reader: reader }

);  

/* var store = new Ext.data.Store({
autoLoad:true,

remoteSort: false,
autoDestroy: true,
listeners: {
render: {
fn: function(){
store.load({
params: {
start: 0,
limit: 5
}
});
}
}
},
proxy:new Ext.data.HttpProxy({url: "dataPacket.action"}),

    //proxy: new Ext.data.PagingMemoryProxy(),
    reader:new Ext.data.JsonReader({id:"id",time:"time",source:"source",destination:"destination",protocol:"protocol",info:"info",totalProperty :'totalProperty',root:'root'},fields)

});*/
//store.load({params:{start:0,limit:10}});
//var sm = new Ext.grid.CheckboxSelectionModel();

var cm = new Ext.grid.ColumnModel([
{
    id:"id",
    header:"NO.",
    dataIndex:"id",
    menuDisabled:true
},{
    header:"Time",
    dataIndex:"time",
    menuDisabled:true
},{
    header:"Source",
    dataIndex:"source",
    menuDisabled:true
},{
    header:"Destination",
    dataIndex:"destination",
    menuDisabled:true
    //renderer:formetSex
},{
    header:"Protocol",
    dataIndex:"protocol",
    menuDisabled:true
    //sortable:true
},{
   header:"Info",
   dataIndex:"info",
   width:400,
   menuDisabled:true

}
]);

var grid = new Ext.grid.GridPanel({
    store :store,
    title:"解码服务的前端原型",
    region:'center',
    el:'north-div',  
    margins: '2 2 2 2',
    width:800,  
    height:300,
    cm:cm,
    autoExpandColumn: 'id',
    loadMask: {msg:'正在加载数据,请稍侯……'}, 
    bbar: new Ext.PagingToolbar({

        pageSize: 5,

        store: store,

        displayInfo: true,

        displayMsg: '显示第{0} 条到{1} 条记录,一共{2} 条',

        emptyMsg: "没有记录"

    })

});


grid.render(Ext.getBody()); 
store.load({ params: { start: 0, limit: 5} });
grid.addListener('rowclick', rowClickFn);  
 grid.getSelectionModel().selectFirstRow();

/***添加树界面 ***/
var Tree = Ext.tree;

var tree = new Tree.TreePanel({
region:'south',
el:'south-div',

margins: '2 2 2 2',
useArrows:true,
autoScroll:true,
animate:true,
enableDD:false,//是否可以拖动
//enableDrag:true,
containerScroll: true,
width:800,
height:300,
rootVisible:false,
loader: new Tree.TreeLoader({
dataUrl:'dataDetail.action?number=0'
})
});

  var root = new Tree.AsyncTreeNode({
    text: 'Ext JS',
    draggable:false,
    id:'source'

  });

  tree.setRootNode(root);
  root.expand();
function changeDataDetail(number)
{
    //alert("aa");

    tree.loader =  new Tree.TreeLoader({
        dataUrl:'dataDetail.action?number='+number
    });
    tree.root.reload();


}

function rowClickFn(grid, rowIndex, e) {
    changeDataDetail(rowIndex);
   //alert('你单击了' + rowIndex);   
}  

grid.addListener('rowcontextmenu', rightClickFn);//右键菜单代码关键部分 
var rightClick = new Ext.menu.Menu({ 
id:'rightClickCont', 
items: [
    { 
        //id: 'rMenu1', 
        //handler: rMenu1Fn, 
        text: '右键菜单1' 
    }, 
    { 
        //id: 'rMenu2', 
        //handler: rMenu2Fn, 
        text: '右键菜单2' 
    } 
]

});
function rightClickFn(grid,rowindex,e){
e.preventDefault();
rightClick.showAt(e.getXY());
}

var viewport = new Ext.Viewport({
//region:'north',
layout:'border',
items:[grid,tree]
});

});
[/code]
[code="java"]
/**后台java代码*/
package com.botwave.action;

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

import net.sf.json.JSONArray;

import com.botwave.actionform.DataActionform;
import com.opensymphony.xwork2.ActionSupport;

public class DataPacketAction extends ActionSupport{

private String menuString;//Json数据的字符串形式

private List<DataActionform> xmlDataPacket;//存储数据包信息的数组

public String execute() {
    System.out.println("aaa"); 
    XmlData();
    return "success";
}


public void XmlData()
{
    xmlDataPacket = new ArrayList<DataActionform>();
    //DataPacketDao dataPacket = new DataPacketDao();
    DataFactory createFactory = new DataFactory();//实例化工厂对象
    xmlDataPacket = createFactory.createDataPacket().selectPacketData();//返回IF_DataPacket接口实例并实现接口方法
    //DataActionform demoProperty=new DataActionform();//实例化actionform
    JSONArray jsonObject = JSONArray.fromObject(xmlDataPacket);//json数据包,通过json返回数据包
    try {
        /**这里的menuString是返回的到js的数据源,totalProperty的值为11*/
        menuString = "{totalProperty:" + (xmlDataPacket.size()) + ",root:" + jsonObject.toString()+ "}";
        //demoProperty.setMenuString("{totalProperty:" + (a-1) + ",root:" + jsonObject.toString()+ "}");
    } catch (Exception e) {
        menuString = "ss";
        //demoProperty.setMenuString("ss");
    }
   //System.out.println( xmlDataTitle.size() );
}


public String getMenuString() {
    return menuString;
}

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

}

[/code]

问题:在GridPanel里面显示的时候是全部数据都在第一页显示出来,并没有达到分页的效果,图片如下:

[img]http://dl.iteye.com/upload/attachment/284917/43bf3a23-aeb6-3917-bfdd-63c74eb662fb.jpg[/img]

1个回答

应该是你后台回的数据的问题,比如你收到前台发送的要第一到第五条的请求,但是还是返回了所有的数据,那么前台就会将你返回的数据全部显示了

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
【求救】GridPanel分页不成功(附代码和图片),读取java后台数据
问题:在GridPanel里面显示的时候是全部数据都在第一页显示出来,并没有达到分页的效果,图片如下: rn[img=http://hi.csdn.net/attachment/201007/29/984774_1280372229Ey8f.jpg][/img]rn[code=JScript]rn/**JS文件*/ rnExt.onReady(function() rn rn rn rn/***DataGrid界面****/ rn var fields = ["id","time","source","destination","protocol","info"]; rn /*var dataUrl;*/ rn rn var proxy = new Ext.data.HttpProxy( rn url: 'dataPacket.action', rn method: 'POST' rn ); rn rn var reader = new Ext.data.JsonReader( rn totalProperty :'totalProperty',root:'root', rn fields) rn rn var store = new Ext.data.Store( rn proxy: proxy, reader: reader rn rn ); rn rn/* var store = new Ext.data.Store( rn autoLoad:true, rn remoteSort: false, rn autoDestroy: true, rn listeners: rn render: rn fn: function() rn store.load( rn params: rn start: 0, rn limit: 5 rn rn ); rn rn rn , rn proxy:new Ext.data.HttpProxy(url: "dataPacket.action"), rn rn //proxy: new Ext.data.PagingMemoryProxy(), rn reader:new Ext.data.JsonReader(id:"id",time:"time",source:"source",destination:"destination",protocol:"protocol",info:"info",totalProperty :'totalProperty',root:'root',fields) rn rn );*/ rn //store.load(params:start:0,limit:10); rn //var sm = new Ext.grid.CheckboxSelectionModel(); rn rn var cm = new Ext.grid.ColumnModel([ rn rn id:"id", rn header:"NO.", rn dataIndex:"id", rn menuDisabled:true rn , rn header:"Time", rn dataIndex:"time", rn menuDisabled:true rn , rn header:"Source", rn dataIndex:"source", rn menuDisabled:true rn , rn header:"Destination", rn dataIndex:"destination", rn menuDisabled:true rn //renderer:formetSex rn , rn header:"Protocol", rn dataIndex:"protocol", rn menuDisabled:true rn //sortable:true rn , rn header:"Info", rn dataIndex:"info", rn width:400, rn menuDisabled:true rn rn rn ]); rn rn var grid = new Ext.grid.GridPanel( rn store :store, rn title:"解码服务的前端原型", rn region:'center', rn el:'north-div', rn margins: '2 2 2 2', rn width:800, rn height:300, rn cm:cm, rn autoExpandColumn: 'id', rn loadMask: msg:'正在加载数据,请稍侯……', rn bbar: new Ext.PagingToolbar( rn rn pageSize: 5, rn rn store: store, rn rn displayInfo: true, rn rn displayMsg: '显示第0 条到1 条记录,一共2 条', rn rn emptyMsg: "没有记录" rn rn ) rn rn ); rn rn rn grid.render(Ext.getBody()); rn store.load( params: start: 0, limit: 5 ); rn grid.addListener('rowclick', rowClickFn); rn grid.getSelectionModel().selectFirstRow(); rn rn/***添加树界面 ***/ rn var Tree = Ext.tree; rn var tree = new Tree.TreePanel( rn region:'south', rn el:'south-div', rn margins: '2 2 2 2', rn useArrows:true, rn autoScroll:true, rn animate:true, rn enableDD:false,//是否可以拖动 rn //enableDrag:true, rn containerScroll: true, rn width:800, rn height:300, rn rootVisible:false, rn loader: new Tree.TreeLoader( rn dataUrl:'dataDetail.action?number=0' rn ) rn ); rn rn var root = new Tree.AsyncTreeNode( rn text: 'Ext JS', rn draggable:false, rn id:'source' rn rn ); rn rn tree.setRootNode(root); rn root.expand(); rn function changeDataDetail(number) rn rn //alert("aa"); rn rn tree.loader = new Tree.TreeLoader( rn dataUrl:'dataDetail.action?number='+number rn ); rn tree.root.reload(); rn rn rn rn rn function rowClickFn(grid, rowIndex, e) rn changeDataDetail(rowIndex); rn //alert('你单击了' + rowIndex); rn rn rn grid.addListener('rowcontextmenu', rightClickFn);//右键菜单代码关键部分 rn var rightClick = new Ext.menu.Menu( rn id:'rightClickCont', rn items: [ rn rn //id: 'rMenu1', rn //handler: rMenu1Fn, rn text: '右键菜单1' rn , rn rn //id: 'rMenu2', rn //handler: rMenu2Fn, rn text: '右键菜单2' rn rn ] rn ); rn function rightClickFn(grid,rowindex,e) rn e.preventDefault(); rn rightClick.showAt(e.getXY()); rn rn rn var viewport = new Ext.Viewport( rn //region:'north', rn layout:'border', rn items:[grid,tree] rn ); rn rn rn); rn[/code]rn[code=Java]rn/**后台java代码*/ rnpackage com.botwave.action; rn rnimport java.util.ArrayList; rnimport java.util.List; rn rnimport net.sf.json.JSONArray; rn rnimport com.botwave.actionform.DataActionform; rnimport com.opensymphony.xwork2.ActionSupport; rn rn rn rnpublic class DataPacketAction extends ActionSupport rn rn rn private String menuString;//Json数据的字符串形式 rn rn private List xmlDataPacket;//存储数据包信息的数组 rn rn public String execute() rn System.out.println("aaa"); rn XmlData(); rn return "success"; rn rn rn rn public void XmlData() rn rn xmlDataPacket = new ArrayList(); rn //DataPacketDao dataPacket = new DataPacketDao(); rn DataFactory createFactory = new DataFactory();//实例化工厂对象 rn xmlDataPacket = createFactory.createDataPacket().selectPacketData();//返回IF_DataPacket接口实例并实现接口方法 rn //DataActionform demoProperty=new DataActionform();//实例化actionform rn JSONArray jsonObject = JSONArray.fromObject(xmlDataPacket);//json数据包,通过json返回数据包 rn try rn /**这里的menuString是返回的到js的数据源,totalProperty的值为11*/ rn menuString = "totalProperty:" + (xmlDataPacket.size()) + ",root:" + jsonObject.toString()+ ""; rn //demoProperty.setMenuString("totalProperty:" + (a-1) + ",root:" + jsonObject.toString()+ ""); rn catch (Exception e) rn menuString = "ss"; rn //demoProperty.setMenuString("ss"); rn rn //System.out.println( xmlDataTitle.size() ); rn rn rn rn public String getMenuString() rn return menuString; rn rn rn public void setMenuString(String menuString) rn this.menuString = menuString; rn rn rn rn rn[/code]rn
ext2.x中GridPanel本地数据分页的问题
由于数据量不多,大概3,40条,不分页又太长了,又不想服务器分页(很多东西写死了不好改),琢磨了一下怎么本地分页,还是没搞出来,请大家指点一下,我是用store的loadData把数据载入,PagingToolbar读到了数据,但是无法分页,也想不出来该怎么改了rn[code="js"]rncxtjFormPanel = Ext.extend(Ext.form.FormPanel,rn constructor:function()rn this.addEvents("query");rn this.addEvents("reset");rn rn cxtjFormPanel.superclass.constructor.call(this,rn autoHeight:true,rn baseCls:"x-plain",rn layout:"column",rn width:550,rn labelWidth:80,rn items:[rn rn columnWidth:.5,rn defaults:width:160,rn defaultType:"textfield",rn bodyStyle:"padding:5px",rn layout:"form",rn items:[rn rn fieldLabel:"案件登记序号",rn name:"ajdjXh",rn maxLength:14rn ,rn fieldLabel:"纳税人编码",rn name:"nsrbm",rn maxLength:20rn rn ]rn ,rn columnWidth:.5,rn defaults:width:160,rn defaultType:"textfield",rn bodyStyle:"padding:5px",rn layout:"form",rn items:[rn rn fieldLabel:"案源登记序号",rn name:"aydjXh",rn maxLength:14rn ,rn fieldLabel:"纳税人名称",rn name:"nsrmc"rn rn ]rn rn ],rn buttons:[rn rn text:"查询",rn handler:function()rn tryrn this.onQuery();rn catch(e)rn return;rn rn ,rn scope:thisrn ,rn text:"清空",rn handler:function()rn this.onReset();rn ,rn scope:thisrn rn ]rn );rn ,rn rn onQuery:function()rn if(this.getForm().isValid())rn this.fireEvent("query",this.getForm());rn elsern throw Error();rn ,rn rn onReset:function()rn this.fireEvent("reset",this.getForm());rn rn);rnrnajxxGridPanel = Ext.extend(Ext.grid.GridPanel,rn data:null,rn constructor:function()rn this.addEvents("delete");rn rn this.data = new Ext.data.JsonStore(rn fields:["ajdjxh","aydjxh","nsrmc","ajmc","ajzt"]rn ),rn rn ajxxGridPanel.superclass.constructor.call(this,rn title:"案件信息列表",rn autoHeight:true,rn frame:true,rn width:660,rn loadMask:msg:"正在加载,请稍后...",rn tbar:[rn rn text:"删除案件",rn handler:function()rn tryrn this.onDelete();rn catch(e)rn Ext.Msg.alert("提示","请选择要删除的案件!");rn return;rn rn ,rn scope:thisrn ,"-"rn ],rn columns:[rn new Ext.grid.CheckboxSelectionModel(),rn header:"案件编号",dataIndex:"ajdjxh",width:100,rn header:"案源编号",dataIndex:"aydjxh",width:100,rn header:"纳税人名称",dataIndex:"nsrmc",width:170,rn header:"案件名称",dataIndex:"ajmc",width:170,rn header:"案件状态",dataIndex:"ajzt",width:110rn ],rn store:this.data,rn// bbar: new Ext.PagingToolbar(rn// pageSize: 10, rn// store:this.data,rn// displayInfo: true, rn// displayMsg: '第0 到 1 条数据 共2条', rn// emptyMsg: "没有数据" rn// ), rn sm:new Ext.grid.RowSelectionModel(rn singleSelect:truern )rn );rn ,rn rn loadData:function(_data)rn this.getStore().loadData(_data,false);rn ,rn rn onDelete:function()rn if(this.getSelectionModel().getCount()>0)rn this.fireEvent("delete",this,this.getStore(),this.getSelectionModel().getSelected());rn elsern throw Error();rn rn);rnrnViewPanel = Ext.extend(Ext.Panel,rn form:null,rn grid:null,rn constructor:function()rn this.form = new cxtjFormPanel();rn this.grid = new ajxxGridPanel();rn rn ViewPanel.superclass.constructor.call(this,rn title:"删除案件信息",rn plain:true,rn frame:true,rn autoHeight:true,rn //height:450,rn items:[rn this.form,rn this.gridrn ]rn );rn rn);rnrnExt.onReady(function()rn Ext.QuickTips.init();rn Ext.form.TextField.prototype.msgTarget = "side";rn rn var _view = new ViewPanel();rn _view.render(Ext.getBody());rn rn _view.form.on("query",function(_form)rn //_form["waitMsgTarget"] = this.getEl();rn _form.submit(rn url:"/qt/qt036JcScajxxExt-query.pfv",rn waitMsg:"正在查询,请稍后...",rn success:function(_f,_a)rn this.grid.loadData(_a.result.data);rn ,rn failure:function(_f,_a)rn Ext.Msg.alert("错误","查询失败!");rn ,rn scope:thisrn );rn ,_view);rnrn _view.form.on("reset",function(_form)rn _form.reset();rn ,_view);rnrn _view.grid.on("delete",function(_grid,_store,_record)rn Ext.Msg.confirm("提示","是否删除案件["+_record.data.ajmc+"]?",function(_btn)rn if(_btn=="yes")rn this.grid.getEl().mask("正在删除,请稍后...");rn Ext.Ajax.request(rn url:"/qt/qt036JcScajxxExt-delete.pfv",rn params:ajdjXh:_record.data.ajdjxh,aydjXh:_record.data.aydjxh,rn success:function(_response)rn var _result = Ext.util.JSON.decode(_response.responseText);rn rn if(_result.state == "info")rn _store.remove(_record);rn rn Ext.Msg.alert("提示",_result.message);rn this.grid.getEl().unmask();rn ,rn failure:function()rn Ext.Msg.alert("错误","删除案件失败!");rn this.grid.getEl().unmask();rn ,rn scope:thisrn );rn rn ,this)rn ,_view);rn);rn[/code]
ExtJS Gridpanel分页以及绑定数据问题
var js = Ext.util.JSON.decode(webser.GetRows(key, "cad"));rnrn var store = new Ext.data.Storern ( rn reader: new Ext.data.ArrayReader(,colDS ),rnrn proxy: new Ext.data.MemoryProxy(js)rn );rn store.load();rn rn var colMArrs = colM.split(";");rn var colMArr = new Array();rn var colMArray = new Array();rn var colDS = new Array();rn for (var i = 0; i < colMArrs.length; i++) rn colMArr = colMArrs[i].split(",");rn colMArray[i] = header: colMArr[1], width: 75, dataIndex: colMArr[1] rn colDS[i] = name: colMArr[1] ;rn rn var column = new Ext.grid.ColumnModel(rn colMArrayrn );rnrn var grid = new Ext.grid.GridPanel(rn rn border: false,rn region: 'center',rn width: 1000,rn height: 150,rn store: store, rn cm: column,rn viewConfig: rn forceFit: truern ,rnrnrn关于问题的代码就贴在这了.js是后台传过来的json转换成的数组,我把json贴出来吧.格式差不多就是这样,因为数据太多所以我删了大部分,留这点样式给大家看一下,rn"["Document Number":"doc_001","Revision":"A","Name":"手机","Type":"Drawing","State":"Preliminary","Native File":"~vs9283.sql","Viewable File":"ArasIOM.vb","Changes":"0"rnrncolM = "item_number,Document Number;major_rev,Revision;name,Name;classification,Type;state,State;native_file,Native File;viewable_file,Viewable File;has_change_pending,Changes"rnrn因为用Ext的转换方法后自动把字段排序了.也就是JS的值,本来应该是Document Number第一列的.但是变成是Changes了,rn最后的问题是,Grid里什么也没显示,没有任何东西.我不知道是不是排序那里出的问题,请各位大神帮忙看一下 谢谢了rn
GridPanel 分页 加载数据
需求是这样子的:rn 在表格的工具栏上面有个查询按钮,点查询的时候表格里面才显示查询出来的数据,rnrn 现在要对数据分页,下面工具栏的分页,倒是有分页显示,但是表格里面的数据没有同步刷新。。rnrn rn[code=Java]rn //返回的值rnsuccess : function(response, action) rn // alert(response.responseText);rnrn var data = Ext.util.JSON.decode(response.responseText);rn if (data == null || data == "") rn Ext.MessageBox.alert("提示", "没有找到记录!");rn else rn updateGrid(data); //更新表格rn rnrn ,rnrnrn//查询数据更新表格rn function updateGrid(data) rnrn // alert(Ext.util.JSON.encode(data));rn var proCreate = new Ext.data.Record.create([rn name : "saleNo",rn mapping : "saleCodeNo",rn type : "string"rn , rn name : "saleVIP",rn mapping : "saleVipNo",rn type : "string"rn , rn name : "orderTime",rn mapping : "saleTime",rn type : "string"rn , rn name : "salePerson",rn mapping : "saleName",rn type : "string"rn , rn name : "saleNumber",rn mapping : "saleNum",rn type : "string"rn , rn name : "salePrice",rn mapping : "salePrice"rn ]);rnrn var jsonStore = new Ext.data.Store(rnrn proxy : new Ext.data.PagingMemoryProxy(data),rn reader : new Ext.data.JsonReader(rn totalProperty : "totalProperty", // 总记录数rn root : "root" // 所有的数据(json对象数组)rn , proCreate)rn );rnrn jsonStore.load(rn params : rn start : 0,rn limit : 5rn rn );rnrn// alert("totalCount = "+jsonStore.getTotalCount());rn// rn// alert("count = "+jsonStore.getCount());rn// for(var s = 0; s < jsonStore.getCount(); s++)rn// alert(" == "+jsonStore.getAt(i).get("saleVipNo"));rn// rn rn var saleQueryGrid = Ext.getCmp("saleQueryGird");rn saleQueryGrid.getStore().removeAll();rn saleQueryGrid.getStore().add(jsonStore.getRange()); // 表格重新绑定数据源rnrn // 分页工具重新绑定数据源rn Ext.getCmp("pagingToolbar").bind(jsonStore);rnrnrn[/code]rnrnrn请问这是怎么回事?
gridpanel 带分页的查询
当前页显示第3页数据时,如果此时点击查询,虽然查询出来的只有两页数据,但是页面还是停留在第3页,怎么解决?rn[img=https://img-bbs.csdn.net/upload/201312/25/1387934208_860141.png][/img]
GridPanel 分页工具条
示例如下:    /** * GridPanel 使用 * 创建可控制分页条数的分页工具条 如:{bbar : getPagingToolbar(grid, store ,20)} * * @param {} * grid * @param {} * gridStore * @param {} * ...
ext gridpanel分页问题
各位老大,我在做gridPanel分页时用到了PagingToolbar,但基本上所有的资料都只说了用 ds.load(params:start:0,limit:10); 建立一个HTTP 参数到远程数据源. 感觉这样使用数据页面(页面提供数据)的方法很原始,我必须在store中 使用 Ext.data.HttpProxy(url:'datapage.aspx'), 这种方式。rn但我目前后台AJAX类全写好的,我用方法 var data=getdata(20,25);就可得到服务器从第20条记录开始的25条数据。所以我把store使用内存模式 Ext.data.MemoryProxy(data),就行了。所有测试都OK,但PagingToolbar似乎不支持事件和方法的邦定,帮忙看下面问题DEMOrn=============================================================================================rnExt.onReady(function()rn//alert(TMKSOFT.getData(20,20).value); //成功调试Json数据源,服务器Ajax方法,从服务器获取JSON数据 数据源绝对没问题rnrnfunction getdata(st,pg)rnrn data=eval('('+TMKSOFT.getData(st,pg).value+')');rn return data;rnrnrnvar data=getdata(20,20); //初始化调试了下,能成功显示数据rnrnvar store = new Ext.data.Store(rn proxy: new Ext.data.MemoryProxy(data),rn reader: new Ext.data.JsonReader(rn totalProperty: 'results',rn root: 'rows'rn , [rn name: 'id', mapping: 'id',rn name: 'name', mapping: 'name',rn name: 'organization',mapping: 'organization',rn name: 'homepage',mapping: 'homepage',rn ])rn);rnrn//store.addListener('load',getdata); 想用Load侦听,但也失败rnrnvar colM=new Ext.grid.ColumnModel([header:'项目编号',dataIndex:'id',sortable:true,rn header:'项目名称',dataIndex:'name',sortable:true,rn header:'开发团队',dataIndex:'organization',sortable:true,rn header:'网站地址',dataIndex:'homepage',renderer:showUrl]);rnrnvar grid = new Ext.grid.GridPanel(rn renderTo:'hello',rn title:"中国Java开源产品及团队",rn bodyStyle:'width:100%',rn autoWidth:true,rn height:500,rn //width:'100%',rn cm:colM,rn store:store,rn autoExpandColumn:2,rn bbar: new Ext.PagingToolbar(rn id:'pagingtoolbar',rn pageSize: 20,rn store: store,rn displayInfo: true,rn displayMsg: '显示第 0 条到 1 条记录,一共 2 条',rn emptyMsg: "没有记录"rn )rn );rnrn //var p1=document.getElementById("ext-gen30").value; //这样可得到需要从第几条记录开始rn //var p2=Ext.getCmp('pagingtoolbar').pageSize; //这样可得到多少条纪录rn alert(p1+" + "+p2)rn store.load(callback:getdata); //每点一下PagingToolbar触发什么事件,重调我getdata方法获取新数据,我该怎么写?rn);
在Ext中,我使用GridPanel和PadingToolbar为什么设置分页不成功?
我打算用GridPanel和PagingToolbar实现一个可以分页的表格.rn数据是由后台传出来的.JSON格式大概如下:rn[code=JScript]rnrn "count":44, // 计算出来的记录数rn "results": rn [rn ... // 省略 rn ],rn "id":"id" // 这个是做什么的,哪位能帮我解释下,我没用上.rnrn[/code]rnrn我的Grid布局大概如下:rn[code=JScript]rn// 数据存储器rnvar store = new Ext.data.Storern(rn proxy: new Ext.data.HttpProxy(url:'myProject/myModule/query.action'), // 发送的请求rn reader: new Ext.data.JsonReader // JSON解析器rn (rn rn totalProperty: 'count', // 对应JSON数据的count.即记录数rn root: 'results', // 对应JSON的记录 rn id: "id" // 这个用途是干啥的还不清楚rn , rn [rn ... // 省略rn ]rn ) rn);rn[/code]rnrn[code=JScript]rn// 选择框rnvar sm = new Ext.grid.CheckboxSelectionModel();rn[/code]rnrn[code=JScript]rn// 表格rnvar myGrid = new Ext.grid.GridPanelrn(rn // 获得数据rn store: store,rnrn cm: new Ext.grid.ColumnModelrn ([rn new Ext.grid.RowNumberer(),rn sm,rn // 列结构 省略rn ... rn ]),rn rn sm: sm,rnrn viewConfig: rn rn forceFit:truern ,rnrn // 分页 指定了每页的记录数为20条, 数据的来源是storern bbar: new Ext.PagingToolbar(id: 'pagingToolbar', pageSize: 20, store: store, displayInfo: true);rn);rn[/code]rnrn这样做了之后,查询到的[color=#FF0000]数据能够正确显示到Grid中[/color].rn[color=#0000FF]但是没有分页效果[/color].rn我的pageSize是20条数据,总数据有44条.这样算来,需要分三页.rnrn在实际效果上看,这个padingToolbar知道要分三页,有显示: page: n of 3 (n = 1, 2, 3)rnrn但是无论切换到哪一页,都是一面显示所有的44条数据.rnrn我原以为,Ext Grid的分页是在客户端由它自己去实现的.如果是这样的话,我是哪里有问题??
ExtJS读取xml数据并显示在GridPanel
Ext.onReady(function(){    var MyRecord=Ext.data.Record.create([   {name:'name'},   {name:'org'},   {name:'homepage'}  ]);var myReader=new Ext.data.XmlReader({     totalRecords:&quot;results&quot;,record:&quot;row&quot;,...
java后台生成分页代码工具类
NULL 博文链接:https://coolboy-wangchaobo-163-com.iteye.com/blog/1125604
java后台实现简单分页
1.分页 public String selectObjects(UserVo userVo,@RequestParam(defaultValue=&quot;1&quot;)int cpage,Model model){ //分页单位 cpage代表当前页 int pageSize = 3; //总条数 int count = userService.selectCount(userVo); ...
jpGird 分页 Java后台
jpGird 分页 Java后台
java后台简单分页实现
1、写分页的DTO package pers.weisg.ssm.common.paginated; import java.io.Serializable; import java.util.List; /** * @Description: 分页的DTO * @author WEISANGNG * @date 2017年12月24日 */ public class
java后台读取xml
rn 主页rnrnrn后台有变量actionid,用于判断执行的哪个action。 要根据actionid的值读取xml文件里的 标签里的内容。rnrnrn求详细解答,在线等。rnrn
关于ext.net GridPanel分页问题
的分页事件怎么样获取
Ext.net GridPanel分页有问题
坨坨的gridpanel,点击"下一页"按钮,就直接跳转到“101”页,再点击下一页。再跳转到“10101”页,rn但是若先点击“上一页”然后再点击“下一页”它又可以正常分页。请问这个问题如何搞定,有源码最好
ext4 动态gridPanel 分页问题
我动态列名和数据已经弄好了 但是分页的时候不行 找了很久 也没能解决 有没有会的大虾们 求解决 比较急 在线等
Extjs Gridpanel 分组分页问题
我要做一个类似论坛的东西,但是回复的查看方式是按人名分组的,考虑到恢复量很大,所以要求分页,现在的问题是分页的话可能会吧同一个人的两条恢复给分成两页显示,请问各位大神怎么解决这个问题n[b]问题补充:[/b]n如果想你说的那样不时每次都要把数据全都load出来,如果有个几千条数据不是很慢??n[b]问题补充:[/b]n需求改了,用的tabpanel+grid做的,虽然不知道这个到底怎么做的还是谢谢了,有时间在研究这个东西
前端技术(4) : 分页,java后台专用分页
使用方法 : 在两个input标签内的value赋值即可完成分页初始化,每点击以下就会跳转当前url+page=跳转的页数;   效果图:     注: 需引入jQuery   代码如下:   html:     &amp;lt;div id=&quot;page&quot; class=&quot;page_div&quot;&amp;gt;&amp;lt;/div&amp;gt; &amp;lt;!-- 初始化当前页 --&amp;gt; ...
如何onclick事件读取extjs的gridpanel
在extjs中,我已经定义好gridpanel,并且显示了,但是我想在页面中添加一个,点击这个buttton然后让grdipanel从后台读数据,请问我这里的onclick应该如何写?这里我只在jsp页面上放了一个ext的gridpanel,其他的都是原生html标签
370万条数据 分页读取
我使用 ASP.NET 拼接SQL语句读取 不是使用存储过程rnrn每10条记录为一页..点击分页,越往后.越慢.要2秒多.rnrn算不算慢?怎么办?rn[code=SQL]rnselect * from(select * , row_number()over(order by id ) as row from con ) as tbrnwhere row between ((1-1)*10) and (1*10) rn[/code]
EXt gridpanel 显示数据
me.columns = [ rn text : '用户名',rn dataIndex : 'userName',rn flex : 1,rn editor:rn allowBlank:falsern rn , rn text : '电子邮件',rn dataIndex : 'email',rn flex : 1,rn editor:rn allowBlank:false,rn vtype:'email'rn rn , rn text : '角色',rn dataIndex : 'roles',rn flex : 1,rn editor:rn xtype: 'combo',rn store:'Roles',rn multiSelect:true,rn allowBlank:false,rn editable:false,rn emptyText:"请选择角色",rn forceSelection:truernrn rn , rn xtype : "datecolumn",rn text : '创建时间',rn dataIndex : 'createdDateTime',rn format : "Y-m-d H:i:s",rn width : 150rn , rn xtype : "datecolumn",rn text : '最后登录时间',rn dataIndex : 'lastLoginDateTime',rn format : "Y-m-d H:i:s",rn width : 150rn , rn xtype : 'checkcolumn',rn dataIndex : "isApproved",rn text : "允许登录",rn winth : 150,rn editor: rn xtype: 'checkbox',rn cls:'x-grid-checkheader-editor'rn rn ];rn我的json数据有值:rn"total":2,"data":["createdDateTime":"2013-10-31T00:00:00","email":"11newuser@email.com","id":6,"isApproved":"true","lastLoginDateTime":"2013-11-01T00:00:00","password":"123","roles":"系統管理者","userName":"admin","createdDateTime":"2013-10-30T00:00:00","email":"newuser@email.com","id":8,"isApproved":"true","lastLoginDateTime":"2013-11-01T00:00:00","password":"456","roles":"普通用戶","userName":"user"],"success":truernrn但是前台不显示页面。rn如果json的数据是:rn["createdDateTime":"2013-10-31T00:00:00","email":"11newuser@email.com","id":6,"isApproved":"true","lastLoginDateTime":"2013-11-01T00:00:00","password":"123","roles":"系統管理者","userName":"admin","createdDateTime":"2013-10-30T00:00:00","email":"newuser@email.com","id":8,"isApproved":"true","lastLoginDateTime":"2013-11-01T00:00:00","password":"456","roles":"普通用戶","userName":"user"]rn就能正常显示。
GridPanel不显示数据
这段代码中,页面加载时,firebug显示processList.action被调用了两次,这是为什么?另外,选中一条数据,点击“流程定义”按钮后,仅弹出窗口,却不显示数据,但firebug显示数据已经加载了,究竟是哪儿有问题?请大家帮忙看看rnExt.ns('Flow.processList');rn Flow.processList = function()rn var store;rn var sm;rn var colModel;rn var grid;rn rn returnrn getStore:function()rn store = new Ext.data.JsonStore(rn root: 'result',rn totalProperty: 'totalCount',rn remoteSort:false,rn storeId: 'processListId',rn autoDestroy: true,rn fields:['processId','processName','processVersion'],rn proxy: new Ext.data.HttpProxy(rn url: 'processList.action'rn ),rn autoLoad: true,rn sortInfo: field:'processId',direction: 'ASC'rn );rn //store.load();rn return store;rn ,rn getSmModel: function()rn sm = new Ext.grid.CheckboxSelectionModel(rn handleMouseDown: Ext.emptyFn //点击行时,不选中此行,要使的点击时,自动选中行,去掉此参数rn );rn return sm;rn ,rn getColModel:function()rn colModel = new Ext.grid.ColumnModel(rn columns: [rn new Ext.grid.RowNumberer(),rn header: "流程ID",dataIndex:'processId', sortable: true,rn header: "流程名称",dataIndex:'processName',rn header: "流程版本",dataIndex:'processVersion',rn this.getSmModel(),rn ],rn defaults: rn sortable: truern rn );rn return colModel;rn ,rn getGrid:function()rn grid = new Ext.grid.GridPanel(rn id: 'processListGrid',rn title:'流程列表',rn store: this.getStore(),rn cm: this.getColModel(),rn //colModel: this.colModel,rn sm: this.getSmModel(),rn viewConfig:rn forceFit: truern ,rn tbar: [rn iconCls: '',rn text: '启动流程',rn handler:this.startProcessrn ,'-',rn iconCls: '',rn text: '删除流程',rn //disabled: true,rn handler: this.removeProcessrn ,'-',rn rn iconCls: '',rn text: '流程定义',rn handler: this.getProcessDefinitionrn ,'-',rn iconCls: '',rn text: '流程图',rn handler: this.getProcessImagern rn ],rn bbar: new Ext.PagingToolbar(rn pageSize: 10,rn store: this.getStore(),rn displayInfo: true,rn displayMsg: '显示流程 0 - 1 of 2',rn emptyMsg: "没有流程可显示",rn items:[rn '-', rn pressed: true,rn enableToggle:true,rn text: 'Show Preview',rn cls: 'x-btn-text-icon details',rn toggleHandler: function(btn, pressed)rn var view = grid.getView();rn view.showPreview = pressed;rn view.refresh();rn rn ]rn )rn );rn return grid;rn ,rn startProcess: function()rn if(!sm)rn sm = this.getSmModel();rn rn var s = sm.getSelections()rn var process = s[0].data.processId;rn if(!process)rn Ext.Msg.alert('信息','未选择任何流程');rn return false;rn rn elsern Ext.Ajax.request(rn url: 'startProcess.action?processId=' + process,rn success: function(response, opts) rn var json = response.responseText||response.responseData;rn var result = Ext.decode(json);rn Ext.Msg.alert('信息',result.message);rn ,rn failure: function() rn Ext.Msg.alert("错误","启动流程失败!");rn ,rn scope: thisrn );rn rn rn ,rn removeProcess: function()rn if(!sm)rn sm = this.getSmModel();rn rn var s = sm.getSelections()rn var process = s[0].data.processId;rn if(!process)rn Ext.Msg.alert('信息','未选择任何流程');rn return false;rn rn elsern Ext.Ajax.request(rn url: 'deleteProcess.action?processId=' + process,rn success: function(response, opts) rn var json = response.responseText||response.responseData;rn var result = Ext.decode(json);rn Ext.Msg.alert('信息',result.message);rn ,rn failure: function() rn Ext.Msg.alert("错误","删除流程失败!");rn ,rn scope: thisrn );rn rn ,rn getProcessDefinition: function()rn if(!sm)rn sm = this.getSmModel();rn rn var s = sm.getSelections()rn var process = s[0].data.processId;rn if(!process)rn Ext.Msg.alert('信息','请选择要查看的流程');rn return false;rn rn else rn var processGrid = new Ext.grid.GridPanel(rn store: new Ext.data.JsonStore(rn root: 'resultSet',rn autoDestroy: true,rn fields:['processDefinition'],rn proxy: new Ext.data.HttpProxy(rn url: 'processDefinition.action?processId='+processrn ),rn autoLoad: truern ), rn columns: [rn header: "流程定义", dataIndex: 'processDefinition'rn ],rn viewConfig: rn forceFit: true,rn ,rn sm: new Ext.grid.RowSelectionModel(singleSelect:true),rn// width:600,rn// height:300,rn frame:true,rn title:'',rn iconCls:'icon-grid'rn );rn var win = new Ext.Window(rn id: 'processWin',rn width: 600,rn height: 300,rn title: '流程定义',rn plain: true,rn closable: true,rn //resizable: false,rn frame: true,rn layout: 'fit',rn autoScroll: true,rn border: false,rn modal: true,rn items:[processGrid]rn ); rn win.show();rn rn ,rn getProcessImage: function()rn //TODOrn ,rn render: function(tab)rn if(!this.grid)rn this.grid = this.getGrid();rn tab.add(this.grid); rn rn rn rn rn ;rn Ext.onReady(function()rn var win = new Ext.Window();rn var f = new Flow.processList();rn f.render(win);rn win.show();rn );
ADOQuery读取数据库数据有时不成功?
我在一个线程中循环读取数据库4个表的数据,rn例如:rn[code=Delphi(Pascal)]rntempStr:='exec Read_Call_Order '+inttostr(maxid1);rn ADOQuery1.Close;rn ADOQuery1.SQL.Clear;rn ADOQuery1.SQL.Add(tempStr);rn ClientDataSet1.Close;rn clientdataset1.Open;rn order3:= clientdataset1.RecordCount;rnrn //没有则退出rn if(clientdataset1.RecordCount >0) thenrn beginrn while not ClientDataSet1.Eof dorn beginrn is_new:=ClientDataSet1.FieldByName('well_is_new').AsBoolean;rn ReadRealdata(ClientDataSet1,is_new); //发送读取数据功能rn ClientDataSet1.Next;rn sleep(1);rn Application.ProcessMessages;rn end;rn maxid1:=Clientdataset1.fieldbyname('gprs_data_id').AsInteger;rn end;rnrn //发送命令rn tempStr:='exec Read_CheckClock_Order '+inttostr(maxid2);rn ADOQuery1.Close;rn ADOQuery1.SQL.Clear;rn ADOQuery1.SQL.Add(tempStr);rn ClientDataSet1.Close;rn clientdataset1.Open;rn order1:=clientdataset1.RecordCount;rnrn //没有则退出rn if(clientdataset1.RecordCount >0) thenrn beginrn while not ClientDataSet1.Eof dorn beginrn is_new:=ClientDataSet1.FieldByName('is_new').AsBoolean;rn CheckClock(ClientDataSet1,is_new); //发送校时功能rn ClientDataSet1.Next;rn sleep(1);rn Application.ProcessMessages;rn end;rn maxid2:=Clientdataset1.fieldbyname('gprs_set_date_id').AsInteger;rn end;rn[/code]rn开始运行正常,过一段时间大概七八天后(不确定),从所有的order(order1,order2...)的值(固定不变了)看出,这段代码已经不执行了,adoquery不再读取数据库数据了。rnps:Read_CheckClock_Order等为存储过程。
php,分页不成功,求解……
[code=php]rn $array_area = explode(',',C('play_area'));rn $array_year = explode(',',C('play_year'));rn if($type_pid)rn $array_list = getlistarr($type_pid);rn $type_cid = $type_pid;rn elsern $array_list = getlistarr($type_id);rn $type_cid = $type_id;rn rn [/code] rnrn[code=php] rn rn 类型hover">全部 hover">$cid|getlistnamern rn 字母hover">全部 for($i=1;$i<=26;$i++)if($type_letter==chr($i+64))echo ''.chr($i+64).'';elseecho ''.chr($i+64).'';hover">0-9rn 地区 hover">全部 hover">$arearn 年份 hover">全部 hover">$yearhover">90年代hover">80后hover">更早rn 排序 hover">最新播放 hover">最热播放 hover">最高评分 hover">最新上映rn [/code]rnrn[code=php]rn if(strlen($type_year)==8)rn $type_year = substr($type_year,0,4).','.substr($type_year,4,8);rn rn if($type_id) rn C('jumpurl',UU('Home-vod/type',array('id'=>$type_id,'wd'=>$type_wd,'year'=>$type_year,'area'=>$type_area,'order'=>$type_order,'p'=>'!page!'),false,true));rn $vod_list = ff_mysql_vod('cid:'.$type_id.';tag:'.$type_wd.';year:'.$type_year.';area:'.$type_area.';letter:'.$type_letter.';actor:'.$type_actor.';limit:20;page:true;order:vod_'.$type_order.' desc,vod_id desc');rn $page = $vod_list[0]['page'];rn rn[/code]rnrn[code=php]……rn $pagern……[/code]rnrn这是一个筛选内容的页面,如此,分页怎么不成功?页数显示是对的,可就是按不了下一页,还是显示第一页。
我的DataGrid分页不成功
我的DataGrid分页不成功rn点了下面的页数(1 2 3 4),结果还是第一行,高手指教rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn
为什么分页不成功?
界面是出来了rn单我点了“1,2,3”rn的2想去第2页时,为什么显示的不会变化呢?rn小弟已非常郁闷,请大家帮帮忙。rnrn<%@ Page Language="C#" ContentType="text/html" %>rn<%@Import Namespace="System.Data"%>rn<%@Import Namespace="System.Data.SqlClient"%> rn<%rn string strConnection="server=10.57.48.123;uid=sa;pwd=sa;database=beast";rn SqlConnection objConnection=new SqlConnection(strConnection);rn objConnection.Open();rnrnrn SqlDataAdapter objDataAdapter=new SqlDataAdapter("select * from ziliao",objConnection);rn// DataSet objDataSet=new DataSet();rn// objDataAdapter.Fill(objDataSet);rn// dgrdMain.DataSource=objDataSet;rn DataTable objDataTable=new DataTable();rn objDataAdapter.Fill(objDataTable);rn dgrdMain.DataSource=objDataTable;rnrn dgrdMain.DataBind();rn objConnection.Close();rnrn rn%>rnrnrnrnrnrnrn rn 无标题文档rnrn rn rn rnrnrn rn rn rn rn rnrnrnrnrn rnrn
为什么分页不成功啊!!!
我想用DropDownList.SelectedIndex来得到当前的页,可是处理后怎么没有反映啊!!!
Grivew 分页不成功!
分页出错。rnrn我看过书上的例子,他是这样的:rnrn在.cs文件中:rnpublic void getdata()rnrn DataTable DT=new DataTable();rn ...rn //到数据库取得数据,给DT,然后rnrn this.GridView1.DataSource=DT;rn this.GridView1.DataBind();rnrnrn他分页时(那个分页属性为TRUE,这个不用我多说了),是在以下事件处理中进行的:rnrnGridView1_PageIndexChanging(....)rnrn this.GridView1.PageIndex=e.NewPageIndexrn getdata();rnrnrnrn那时我没注意到它是否有错,所以就不试,而现在我自己的网站上,也用到分页了,可是出错了,方法也跟他上面差不多,如下:rnrnDataTable DT=new DataTable();//作为全局(这个页面)的对象rnrn在页面加载时,我就到数据库取得数据,赋给DT了,然后就是:rnthis.GridView1.DataSource=DT;rn this.GridView1.DataBind();rnrn我在分页时,也是在:rnGridView1_PageIndexChanging(....)rnrn this.GridView1.PageIndex=e.NewPageIndexrn this.GridView1.DataSource=DT;rn this.GridView1.DataBind();rnrnrnrn可是分页不成功!!!!!!rnrn我想不通,他的例子上的,不就是每次分页时再到数据库去取数据一次吗?那我现在的DT是全局的对象啊,和再次取没什么区别吧?对道DT数据会自己丢失?????rnrn因为一些原因,我没有测试每次分页时再到数据库去取数据一次这样行不行,所以上来这里问。rnrn请有经验的朋友能帮我解决一下。rnrnrn我见过有些书上的例子是在:rnrnGridView1_PageIndexChanged(....)rnrn //他是在这里处理的,代码我忘了,不知道有什么区别?rnrnrnrnrn分页,例子上有的是,可是现实就是不同书的,真是郁闷!!rnrnrnrn
asp查询数据分页,不成功
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>rnrnrnrn rnrnrnrn rn rn rnrnrn rn rn rn 出 库 信 息 查 询rn rn rn 编号rn 出库编号rn 材料名称rn rn rn rn rn rn rn rn rnrn<%rnif request("ckc")="查" thenrnif request("bh")<>""thenrnif cond="" thenrncond="编号 like '%" & trim(request("bh")) & "%'"rnelserncond = cond & " AND 编号 like '%" & trim(request("bh")) & "%'"rnend ifrnend ifrnif request("ckbh")<>""thenrnif cond="" thenrncond="出库编号 like '%" & trim(request("ckbh")) & "%'"rnelserncond = cond & " AND 出库编号 like '%" & trim(request("ckbh")) & "%'"rnend ifrnend ifrnif request("clmc")<>"" thenrnIf cond="" Thenrncond="材料名称 like '%" & trim(request("clmc")) & "%'"rnelserncond = cond & "and 材料名称 like '%" & trim(request("clmc")) & "%'"rnend ifrnend ifrnif cond<>""thenrnsql="select * from 出库表 where " & cond & "order by 日期"rnelsernsql="select * from 出库表 order by 日期"rnend ifrnsession("sql")=(sql)rnset rs=server.createobject("adodb.recordset")rn rs.open sql,conn,1,1rn response.write " "rnresponse.write " "rnresponse.write " 编号 出库编号 日期 材料名称 导出查询数据"rnresponse.write ""rn%>rn 共有记录<%=rs.recordcount%>条rn<%rn do while not rs.eof rn %>rn rn >rn >rn >rn >rn " target="_blank">详细rn ">修改rn ">删除rn rn <%rnrs.MoveNextrnlooprnrs.Closern %>rn rn <% end if %>rnrnrnrn请哪位高手帮忙在以上代码中加一个带页码跳转历能的查询分页代码(带"1" "2" "3"…… 页码的链接跳转和带页码的下拉菜单跳转) 请在原代码上添加rn非常感谢
Extjs+asp.net对GridPanel进行分页,怎么得不到数据???
rnrn后端返回的json数据格式是这样的rntotalProperty:17,root[did:5,dname:'部门5',did:6,dname:'部门6',did:7,dname:'部门7',did:8,dname:'部门8',did:9,dname:'部门9']rnrnrn麻烦大家帮我看一下,这个问题究竟我两天了,谢谢!
java后台的数据层数据组织
1、DataGrid的数据组织—service在事物内 (1)actionpublic void getExchange() { this.writeJson(orderService.getExchange(exchange)); }(2)serviceStringBuffer data = new StringBuffer(); Map<String,
js获取java后台数据
我用JSONArray封装java servlet中从数据库读取的list,然后在js中运用JSONArray的数据,这样写不知对不,哪位大牛帮忙看下,谢谢!下面为部分java代码:rn JSONArray ja=JSONArray.fromObject(lists);rn System.out.println(ja);rn下面为JS部分代码:rnfunction getdata()rn var data="";rn $.ajax(rn type : "POST",rn contentType : "application/json",rn url : "ShowServlet,rn dataType : 'json',rn success : function(result) rn alert(result);rn var statementsdata="";rn for(i=0;i
flash获取java后台数据
利用flash的脚步语言获取后台数据库的数据信息,后台是java链接mysql
Java后台数据自动备份的实现
有个F5项目想定期记录设备的状态,想实现自动备份,前端页面有个选择框分别是:7天、15天以及30天。 首先实现自动备份必须用到线程,因为自动备份以计时的方式进行(一直在运行状态,如果不是线程,必须上一个程序完成结束后下一个方法才能继续执行),一旦达到选择的天数就执行自动备份的方法。 在网上查找开启线程的三种方法,分别是:main方法,Servlet和Listener监听。 最佳的解决方法思路
java后台获取xml文件数据()
java后台获取xml文件数据(无需了解xml标签内容) 第一种:按标签获取数据(大部分人博客上都有,这里不做记载) 第二种:按照顺序从根节点一直遍历往下知道最后一级数据 public static void main(String[] args) throws Exception {         // TODO Auto-generated method stub
java后台数据批量处理
当对数据库操作的数据量比较大的时候,批量处理可以大大得减少系统访问数据库的次数,提高了系统的效率     public boolean SecondUpdateChEn(Session session,             List doclist) throws SQLException  {         try {             //获得该Session使用的数据
Java后台实时输出数据到页面
Java后台实时输出数据到页面
java后台;java后台
java后台java后台;java后台;java后台
Ext中GridPanel,分页通用实现方式
[code=&quot;js&quot;] /*------------------后台交互,支持分页排序----------------------------*/ function getGrid(title,urlpath,header,fileds) { var columns =getColModel(header,fileds); var filed = getFiled(filed...
相关热词 c# stream 复制 android c# c#监测窗口句柄 c# md5 引用 c# 判断tabtip 自己写个浏览器程序c# c# 字符串变成整数数组 c#语言编程写出一个方法 c# 转盘抽奖 c#选中treeview