latest additions to pnAjax

i have added some stuff ....

Grid Widget
The grid will help to show and edit tabular data. Its programmed by Uwe Pries in finest pure javascript code.

Finalize Handler
The finalize handler can be used to execute n pieces of Javascript callbacks on the end of the Request. Nice feature to fill your data in the grid widget.

function foo() {
var pn_ajax = init_ajax();
pn_ajax.add_pnmodapifunc('pnAjax', 'user', 'test', {}, function(ret){
data.push(ret);
});
pn_ajax.add_pnmodapifunc('pnAjax', 'user', 'test', {}, function(ret){
data.push(ret);
});

var cb_fin = function() {
var cols = {
PLZ: { label: "PLZ", size: 5, maxlength: 5 },
NAME: { label: "Name", size: 30 },
LAND: { label: "Land", size: 30 }
};

grid.build(
document,
"grid",
cols,
data
);

grid.attach_to(document.getElementById("dg"));
}
pn_ajax.add_on_finalize(cb_fin);
pn_ajax.execute();
}

All the naming conventions may change while development .. but this one shows in which direction the whole thing will go.
 Permalink

Comments

No new comments allowed (anymore) on this post.