最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

gridpanel動態(tài)加載數(shù)據(jù)的實例代碼

 更新時間:2013年07月18日 16:59:04   作者:  
這篇文章介紹了gridpanel動態(tài)加載數(shù)據(jù)的實例代碼,有需要的朋友可以參考一下
復(fù)制代碼 代碼如下:

<script type='text/javascript'>
function editEsOrder(options,success,response){
if (success){
var tagModelManager_maxOrderIdJson=Ext.util.JSON.decode(response.responseText);
var orderValue = tagModelManager_maxOrderIdJson.maxOrderId ;
Ext.getCmp('esorder').setValue(orderValue) ;
}
}
var tagModelManager_toolBar=new Ext.Toolbar({
items:[
{id:'tagModel_Save',text:'添加',iconCls:'add',handler:tagModel_Save}
,'-',
{id:'tagModel_dropSelected',text:'刪除',iconCls:'remove',handler:tagModel_dropSelected}
]});
new Ext.grid.GridPanel({
id:'tagModelManager_tagModelGrid',
autoScroll:true,  store:new Ext.data.Store(),
cm:new Ext.grid.ColumnModel([new Ext.grid.RowNumberer()]),
sm:new Ext.grid.CheckboxSelectionModel(),
renderTo:'tagModelManager_tagModelDiv',
        width:Ext.getCmp('TagModel_win').getSize().width-16,
        height:Ext.getCmp('TagModel_win').getSize().height-35,
hideHeaders :false,
loadMask:{msg:'正在加載數(shù)據(jù),請稍候....'},
collapsible : true,
collapsed : false,
bbar:new Ext.PagingToolbar({
id:'tagModelManager_tagModelPagingBar',
pageSize:getComboValue(),
store:new Ext.data.Store(),
displayInfo:true
}),
tbar:tagModelManager_toolBar
});
Ext.getCmp('tagModelManager_tagModelGrid').render() ;
Ext.getCmp('tagModelManager_tagModelGrid').on('rowdblclick', tagModelSelectRowDblClickEvent);
function tagModelSelectRowDblClickEvent(selectionModel, rowIndex, selectedRecord) {
  var selectedRows = Ext.getCmp('tagModelManager_tagModelGrid').getSelectionModel().getSelections();
      var row=selectedRows[0];  
      tagModel_SaveOrEdit('edit',row);
}
function tagModel_Save() {
      tagModel_SaveOrEdit('save');
}
function tagModelList_search() {
  Ext.Ajax.request({
  url:'editTagModel.html?method=getParams',
   callback:getSearchList
   });
}
function getSearchList(options,success,response) {
if (success){
var tagModelManager_json=Ext.util.JSON.decode(response.responseText);
tagModelManager_tagModelGridTitle = tagModelManager_json.tagModelManager_tagModelGridTitle;
var record = tagModelManager_json.record ;
var tagModelManager_tagModelColumnModels = tagModelManager_json.tagModelManager_tagModelColumnModels ;
        var tagModelManager_tagModelColumnModel=new Ext.grid.ColumnModel(Ext.util.JSON.decode("["+"new Ext.grid.RowNumberer()"+","+"new Ext.grid.CheckboxSelectionModel()"+","+tagModelManager_tagModelColumnModels+"]"));
tagModelManager_tagModelColumnModel.defaultSortable=true;
var strucutreModelManager_tagModelDataStore = new Ext.data.Store({
         baseParams: { tagModelKeyword : Ext.getCmp('tagModelManager_search_button').el.dom.value.trim() },
proxy:new Ext.data.HttpProxy({
url:'editTagModel.html?method=getTagModelDataList'
}),
reader:new Ext.data.JsonReader({
totalProperty:'resultSize',root:'tagModelList'},Ext.util.JSON.decode(record))  });
Ext.getCmp('tagModelManager_tagModelPagingBar').bind(strucutreModelManager_tagModelDataStore);
strucutreModelManager_tagModelDataStore.load({params:{start:0,limit:getComboValue()}}) ;
Ext.getCmp('tagModelManager_tagModelGrid').setTitle(tagModelManager_tagModelGridTitle) ;
Ext.getCmp('tagModelManager_tagModelGrid').reconfigure(strucutreModelManager_tagModelDataStore,tagModelManager_tagModelColumnModel);
Ext.getCmp('tagModelManager_tagModelGrid').expand(false) ;
}
}
function tagModelList_all(){
Ext.Ajax.request({
url:'editTagModel.html?method=getParams',
callback:getTagModel
});
}
function getTagModel(options,success,response){
if (success){
var tagModelManager_json=Ext.util.JSON.decode(response.responseText);
tagModelManager_tagModelGridTitle = tagModelManager_json.tagModelManager_tagModelGridTitle;
var record = tagModelManager_json.record ;
var tagModelManager_tagModelColumnModels = tagModelManager_json.tagModelManager_tagModelColumnModels ;
        var tagModelManager_tagModelColumnModel=new Ext.grid.ColumnModel(Ext.util.JSON.decode("["+"new Ext.grid.RowNumberer()"+","+"new Ext.grid.CheckboxSelectionModel()"+","+tagModelManager_tagModelColumnModels+"]"));
tagModelManager_tagModelColumnModel.defaultSortable=true;
var strucutreModelManager_tagModelDataStore = new Ext.data.Store({
proxy:new Ext.data.HttpProxy({
url:'editTagModel.html?method=getTagModelDataList'
}),
reader:new Ext.data.JsonReader({
totalProperty:'resultSize',root:'tagModelList'},Ext.util.JSON.decode(record))  });
Ext.getCmp('tagModelManager_tagModelPagingBar').bind(strucutreModelManager_tagModelDataStore);
strucutreModelManager_tagModelDataStore.load({params:{start:0,limit:getComboValue()}}) ;
Ext.getCmp('tagModelManager_tagModelGrid').reconfigure(strucutreModelManager_tagModelDataStore,tagModelManager_tagModelColumnModel);
Ext.getCmp('tagModelManager_tagModelGrid').expand(false) ;
}
}
Ext.Ajax.request({
url:'editTagModel.html?method=getParams',
callback:getTagModel
});
</script>
    public void getTagModelDataList(ActionMapping mapping, ActionForm actionform,HttpServletRequest request, HttpServletResponse response){
    ITagModelManager tagmgr = this.getPkgServer().getDriver().getOperateServer().getTagModelManager() ;
    List<HashMap<String,String>> models = new ArrayList<HashMap<String,String>>();
    String tagModelKeyword = request.getParameter("tagModelKeyword");
    List<EssTagModel> tagModels ;
    tagModels =  tagmgr.getEssTagModels() ;
    int resultSize = 0 ;
    if (null != tagModels && !tagModels.isEmpty()){
    //數(shù)據(jù)分頁顯示
    resultSize = tagModels.size() ;
    String start = request.getParameter("start") ;
String perPage = request.getParameter("limit") ;
String esType ="";
if (null != start && null != perPage){
int fromIdx = Integer.parseInt(start);
int per =  Integer.parseInt(perPage);
int toIdx = fromIdx + per ;
if (toIdx  > resultSize) toIdx = resultSize ;
tagModels = tagModels.subList(fromIdx,toIdx) ;
}
    for(EssTagModel etm : tagModels){
    HashMap<String,String> map = new HashMap<String, String>();
    map.put("id",   Long.toString(etm.getId())) ;
    map.put("esidentifier", etm.getEsidentifier()) ;
    map.put("estype", etm.getEstype()) ;
    map.put("esdescription", etm.getEsdescription()) ;
    map.put("esorder", Long.toString(etm.getEsorder())) ;
    map.put("metadata", etm.getMetadata()) ;
    models.add(map) ;
    }
    }
    JSONObject json = new JSONObject();
    JSONArray ary = new JSONArray(models);
    json.put("tagModelList", ary);
json.put("resultSize",resultSize);
    writeJson(response, json.toString()) ;
    }
public void getParams(ActionMapping mapping, ActionForm actionform,HttpServletRequest request, HttpServletResponse response){
LinkedHashMap<String,String> tags = new LinkedHashMap<String,String>() ;
tags.put("id", "id") ;
tags.put("esidentifier", "字段") ;
tags.put("estype", "類型") ;
tags.put("esdescription", "描述") ;
tags.put("esorder", "順序") ;
tags.put("metadata", "元數(shù)據(jù)") ;
tags.put("esisnull", "是否為必填項") ;
tags.put("eslength", "字段長度") ;
tags.put("esdotlength", "小數(shù)點位數(shù)") ;
tags.put("esissystem", "是否為系統(tǒng)字段") ;
JSONObject json = new JSONObject();
json.put("record", getJsonRecord(tags)) ;
json.put("tagModelManager_tagModelColumnModels", getJsonColumnModel(tags)) ;
writeJson(response,json.toString());
}

相關(guān)文章

  • JS解惑之Object中的key是有序的么

    JS解惑之Object中的key是有序的么

    這篇文章主要介紹了JS解惑之Object中的key是有序的么,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2019-05-05
  • 微信小程序?qū)崿F(xiàn)計算器小功能

    微信小程序?qū)崿F(xiàn)計算器小功能

    這篇文章主要為大家詳細介紹了微信小程序?qū)崿F(xiàn)計算器小功能,文中示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2021-07-07
  • 微信小程序調(diào)用騰訊地圖API文檔JavaScript?SDK和WebService?API詳細解讀

    微信小程序調(diào)用騰訊地圖API文檔JavaScript?SDK和WebService?API詳細解讀

    本文介紹了如何使用騰訊位置服務(wù),包括申請開發(fā)者密鑰、獲取小程序APPID、下載地圖SDK、設(shè)置服務(wù)器域名白名單等步驟,詳細說明了如何在微信小程序中集成騰訊位置服務(wù),進行地圖展示和周邊搜索等功能的實現(xiàn),同時提醒注意API的調(diào)用次數(shù)和權(quán)限限制,需要的朋友可以參考下
    2024-09-09
  • JS實現(xiàn)隊列與堆棧的方法

    JS實現(xiàn)隊列與堆棧的方法

    這篇文章主要介紹了JS實現(xiàn)隊列與堆棧的方法,結(jié)合實例形式分析了JavaScript實現(xiàn)隊列與堆棧的原理與相關(guān)實現(xiàn)技巧,需要的朋友可以參考下
    2016-04-04
  • js日期插件dateHelp獲取本月、三個月、今年的日期

    js日期插件dateHelp獲取本月、三個月、今年的日期

    這篇文章主要為大家詳細介紹了js日期插件dateHelp獲取本月、三個月、今年的日期,感興趣的小伙伴們可以參考一下
    2016-03-03
  • JS實現(xiàn)將手機號中間的幾位數(shù)字變成****功能

    JS實現(xiàn)將手機號中間的幾位數(shù)字變成****功能

    這篇文章主要介紹了用js如何實現(xiàn)將手機號中間的幾位數(shù)字變成****?_,今天,我們要實現(xiàn)一個很常見并且簡單的功能如何將手機號中間的幾位數(shù)變成****,需要的朋友可以參考下
    2023-09-09
  • 微信小程序開發(fā)之表單驗證WxValidate使用

    微信小程序開發(fā)之表單驗證WxValidate使用

    本文主要介紹了微信小程序開發(fā)之表單驗證WxValidate使用,文中通過示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2021-10-10
  • JS實現(xiàn)加載時鎖定HTML頁面元素的方法

    JS實現(xiàn)加載時鎖定HTML頁面元素的方法

    這篇文章主要介紹了JS實現(xiàn)加載時鎖定HTML頁面元素的方法,涉及javascript針對頁面元素的遍歷與屬性操作相關(guān)實現(xiàn)技巧,需要的朋友可以參考下
    2017-06-06
  • JS中touchstart事件與click事件沖突的解決方法

    JS中touchstart事件與click事件沖突的解決方法

    這篇文章主要給大家介紹了關(guān)于JS中touchstart事件與click事件沖突的解決方法,文中通過示例代碼將解決的方法介紹的非常詳細,對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧。
    2018-03-03
  • 詳談表單重復(fù)提交的三種情況及解決方法

    詳談表單重復(fù)提交的三種情況及解決方法

    下面小編就為大家?guī)硪黄斦劚韱沃貜?fù)提交的三種情況及解決方法。小編覺得挺不錯的,現(xiàn)在就分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2017-08-08

最新評論

乌兰县| 安陆市| 望谟县| 土默特右旗| 土默特左旗| 水富县| 鞍山市| 英德市| 金寨县| 桃江县| 沐川县| 合水县| 彩票| 阿拉善左旗| 枞阳县| 泸溪县| 滨州市| 宜黄县| 漳浦县| 廉江市| 原阳县| 鹤山市| 富锦市| 深圳市| 安图县| 内黄县| 乐亭县| 怀安县| 临潭县| 株洲市| 垦利县| 安图县| 丽江市| 仙游县| 伊宁市| 即墨市| 临江市| 湾仔区| 从江县| 中牟县| 马龙县|