Posts

Showing posts from November, 2008

Ext JS - How to hack the JsonReader

I have a new job ( hooooray?! ) and I suggested Ext JS framework as web UI to focus more about Ajax, XML + XSLT data interactions rather than problems with CSS, events delegations, etc ... and I guess I am doing well, so well, that here I am with a simple tiny trick to hack an Ext.data.JsonReader instance, specially the root and the totalProperty params: // directly from Ext JS 2.2 API site // http://extjs.com/deploy/dev/docs/ new Ext.data.JsonReader({ totalProperty: "results", // The property which contains the total dataset size (optional) root: "rows", // The property which contains an Array of row objects id: "id" // The property within each row object that provides an ID for the record (optional) }) Especially for the paginator toolbar, the JsonReader is a must to surf a big amount of data without stressing too much both server and client sides. One nice feature, or one cleve...