elle ne peut être appelée qu’une seule fois pour un conteneur donné
si le conteneur (premier argument) est null, c’est la zone de travail principale qui est coupée
Exemple à tester/adapter suivant votre cas d’usage :
function mySplit(param) {
var view = $ui.view,
app = $ui.getAjax();
// Minify the menu to get more space
if (!($('#menu').hasClass("minified")))
view.menu.menuMin();
// Split main screen in 2 parts
var div = $('#split-my-content');
if (!div.length) { // not exists
div = $('<div id="split-my-content"/>');
view.split(null, 'left', { // or right / top / bottom
content: div,
width: '800px', // or "30%"
resizable: true, // middle bar support drag/drop
collapsible: true // add chevrons to maximize/minimize parts
});
}
// Sample to fill the left part with an external object
$ui.loadURL(div.empty(), "/ui/ext/MyExternalObject?myparam=" + param);
// Or with a crosstable
$ui.displayCrosstab(div.empty(), "MyObject", "MyPivotTable", {
ztree: true, // get data in a tree
ztable: true, // show the table
zcaption: false, // hide the table caption
zstotal: true, // show table sub-totals
zstcolor: "#9999FF", // sub-totals color
zcontrol: false // hide option controls
// add also zgraph, zwidth, zheight... to display a chart
}, function() {
// Do something here when the crosstab is loaded
});
}