Title
Date
Author
Comments
July 21st, 2011
radu

I have written a small helper function to make delayed sequential function execution easier.
We have the following case: we need to execute an array of functions. The second one has to execute after the first one finishes, the third after the second and so one. The scenario gets a bit more complicated when wee need [...]

March 25th, 2011
radu

Lately I had to do more work with ExtJS x-templates, and really found them very flexible. One feature I find useful is the support for formatting functions. So you can have a template which outputs different things for plural and singular forms:

new Ext.XTemplate(‘{0:plural(“record”,”records”)} deleted’).apply([4])
// -> 4 records deleted

This is nice. Yet the formatting functions are [...]

November 26th, 2010
radu

Recently I got borred with the for loops and I added the “times” function on the prototype of Number. As a result, I can easily iterate over arrays or I can simply call a function how many times I want like this:

(5).times(function(index /* zero based */){
[...]

July 14th, 2010
radu

Automation testing of UI is essential in any big project, but it is difficult to achieve this for user interfaces built with ExtJS. Selenium records user actions, by clicks on elements, and memorizes the ids of the selected elements. Yet since ExtJS auto-generates ids which are not guaranteed to stay the same, you cannot rely [...]

May 31st, 2010
radu

Well, if you are programming in JavaScript for a while, you are familiar with the arguments ‘array’ which gives you access to function arguments by index, without the need of argument names. And if you are programming JavaScript for a bit longer while, you will know that arguments is not even a normal array. It [...]

February 24th, 2010
radu

You should make use of the scope config option in components
.

in Ajax calls
var MyPanel = Ext.extend(Ext.Panel, {
doSave: function(){
Ext.Ajax.request({
url: ‘your_url’,
params: ….
success: function(response){
response = Ext.decode(response.responseText);
this.onSuccess(response)
},
scope: this //the scope in which the success callback [...]

February 18th, 2010
radu

Tips on JavaScript and ExtJS: using the ExtJS ref config option on panels and other components.