-
-
Save garyjoy/77f2564fce487e472f3e to your computer and use it in GitHub Desktop.
Implement a Lazy-Loading Table in a Report (on IBM BPM v7.5)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createLazyGrid(containerId, tableStructure, dojoDataStore, queryFilter) { | |
var gridParameters = { | |
structure: tableStructure, | |
selectable: true, | |
store: dojoDataStore, | |
escapeHTMLInData: false, | |
autoRender: true, | |
autoWidth: true, | |
autoHeight: true, | |
rowsPerPage: 20, | |
query: queryFilter, | |
plugins:{ | |
indirectSelection: true, | |
pagination:{pageSizes:false, description:true, pageStepper:true, gotoButton:true, maxPageStep:4, position:"bottom", defaultPage:20} | |
} | |
}; | |
var lazyGrid = new dojox.grid.EnhancedGrid(gridParameters); | |
lazyGrid.placeAt(containerId); | |
lazyGrid.startup(); | |
return lazyGrid; | |
} | |
function drawMyTable() { | |
dojo.empty("myTableDiv"); | |
var tableStructure = [[ | |
{field: "column1", name: "Column 1",width:"100px"}, | |
{field: "column2" , name: "Column 2",width:"100px"}, | |
{field: "column3", name: "Column 3",width:"100px"} | |
]]; | |
var dojoDataStore = new bt.LazyLoadStore({lazyLoadFunction: lazyLoadMyData}); | |
paUnAllocatedGrid = createLazyGrid('myTableDiv', tableStructure, dojoDataStore, {column1:'*'}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment