Results 1 to 9 of 9

Thread: }?load?? {params: {start: 0, limit: 20}?????

  1. #1

    Post }?load?? {params: {start: 0, limit: 20}?????

    ??????????????????????????????
    load??limit?Toolbar?pageSize?20????????????

    load?????????????????????????????????
    ????????????????20???????????????
    ????????????????????????????????????????

    Ext.onReady(function() {
    // s.gif??
    Ext.BLANK_IMAGE_URL = "ext/resources/images/default/s.gif";
    // ???????????
    Ext.QuickTips.init();

    //Ext.data.JsonReader?????????
    var NotImportedFilesNameReader = new Ext.data.JsonReader({
    //???????????
    totalProperty: "totalCount",
    //????????
    root: "array",
    //?????????
    fields: [
    {name: "id", type: "int"},
    {name: "filesname", type: "string"}
    ]
    });

    //Ext.grid.CheckboxSelectionModel?????????
    var NotImportedFilesNameCheckbox = new Ext.grid.CheckboxSelectionModel();

    //Ext.grid.ColumnModel?????????
    var NotImportedFilesNameColumns = new Ext.grid.ColumnModel([
    //???????????
    NotImportedFilesNameCheckbox,

    //???????
    {id: "id", header: "??", width: 80, dataIndex: "id"},
    {id: "filesname", header: "?????", width: 100, dataIndex:
    "filesname"}
    ]);

    //Ext.data.Store?????????
    var NotImportedFilesNameDataStore = new Ext.data.Store({
    //??????URL???
    proxy: new Ext.data.HttpProxy({

    url: "./feature/notimportedfilesname.php", method: "POST"}),
    reader:
    NotImportedFilesNameReader
    });

    //Ext.PagingToolbar?????????
    var NotImportedFilesNameToolbar = new Ext.PagingToolbar({
    //1??????????
    pageSize: 20,

    //??????
    store: NotImportedFilesNameDataStore,
    //???????

    displayInfo: true,
    displayMsg: "{2} ??? {0} ??? {1} ????????????",
    emptyMsg: "??????????????",
    });

    //Ext.grid.GridPanel?????????
    var NotImportedFilesNameGrid = new Ext.grid.EditorGridPanel({
    //???????
    store: NotImportedFilesNameDataStore,
    //???????
    cm: NotImportedFilesNameColumns,

    //?????????
    sm:NotImportedFilesNameCheckbox,
    //?????????????
    animcollapse: true,
    //????????
    collapsed: false,
    //??????????
    collapsible: true,
    //?????????????????
    titleCollapse: true,
    //??????
    autoWidth: true,
    //width: 800,
    //???????
    //autoHeight: true,
    height: 500,
    //????
    title: "??????????",
    //ID
    renderTo: "grid-container",
    //???????????
    clicksToEdit: 2,
    //????????

    bbar: NotImportedFilesNameToolbar,
    //???
    buttons: [
    {text: "?????", handler: cancel},
    {text: "??",handler:update}
    ]
    });

    //?????????????????
    NotImportedFilesNameDataStore.load({params: {start: 0, limit: 20}});

    //????????
    function cancel() {
    NotImportedFilesNameDataStore.reload();
    }

    //?????
    function update() {
    Ext.MessageBox.show({
    title: "???????",
    msg: "?????????????",
    buttons: Ext.MessageBox.OK,
    icon: Ext.MessageBox.INFO
    });
    }
    });

  2. #2
    Sencha Premium Member amanoman's Avatar
    Join Date
    Oct 2007
    Location
    ??
    Posts
    49

    Default ??????????

    store?????grid???????load????????????????
    PHP Code:
       // ?????????????????
       
    NotImportedFilesNameDataStore.load({
          
    params : {
           
    start 0,
           
    limit 20
          
    }
         }); 
    ????????
    PHP Code:
       // ?????????????????
       
    NotImportedFilesNameGrid.getStore().load({
     
          
    params : {
           
    start 0,
           
    limit 20
          
    }
         }); 
    fudaozhenchu???????????????????????????


    ?????????????????????????????????????IE??????????)
    PHP Code:
       // Ext.PagingToolbar?????????
       
    var NotImportedFilesNameToolbar = new Ext.PagingToolbar({
          
    // 1??????????
          
    pageSize 20,
          
    // ??????
          
    store NotImportedFilesNameDataStore,
          
    // ???????
          
    displayInfo true,
          
    displayMsg "{2} ??? {0} ??? {1} ????????????",
          
    emptyMsg "??????????????"
          
    ,
       }); 

  3. #3

    Default ?????????

    ????????????????

    ?????????????????????????????????????
    ???????????????????????????????????

    ???????????Windows Vista???????????
    Attached Images Attached Images

  4. #4

    Default JSON???????

    JSON????????????
    {"totalCount": "3325","array": [{"id":1,"filesname":"19900101.csv"},????

    ??????totalCount?????????????
    ????

  5. #5
    Sencha Premium Member amanoman's Avatar
    Join Date
    Oct 2007
    Location
    ??
    Posts
    49

    Default

    ?????????????????start,limit???????????????????????????
    {"totalCount": "3325","array": [{"id":1,"filesname":"19900101.csv"},..]????totalCount??????????????????

  6. #6

    Default ??????

    ???????????
    ???????JSON???????????????????????????
    ??????????POST????????????????????????
    ?????????????

    array_slice????????????start?limit??????
    ?????????

    ??????????????????

  7. #7
    Sencha User
    Join Date
    Mar 2011
    Posts
    2

    Default Java????start?limit?????????????????????

    ???????ExtJS??????

    ????????????????
    ?????????????????PHP?????Java??????

    Java????start?limit?????????????????????

    SAStruts+JSONIC ??????????

    ???URL?
    [SAStruts][ExtJS][JSONIC] Full Ajax ? CRUD ????????
    http://d.hatena.ne.jp/TsutomuUchima/20080911/p1

    code????-SAStruts(Super Agile Struts)????
    http://code.nanigac.com/source/wiki/...82%87%E3%81%86

  8. #8

    Default

    Store?proxy??????DirectProxy?????????
    start?limit?????????ActionForm???????????

    ????????HTML??Submit??????????????????????????????

  9. #9
    Sencha User
    Join Date
    Mar 2011
    Posts
    2

    Default

    matsuoka??

    ????????????ActionForm????????????????
    ???????????????

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •