Posts Tagged ‘Ext JS’

I found this thread helpful for figuring out how to get selected row for an extendedDataTable. Now I start to really appreciate how elegant and simple Ext JS is on getting selected row for a datatable.

For the last couple days I ran into JavaScript errors with toolbars for Ext JS. One of the issues is clearly documented here. I just added hideMode:’offsets’ to the toolbar definition and the error went away. The other one, I had to add enableOverflow: false option to the toolbar to avoid hitting Object required error [...]

JavaScript trick

Posted: August 6, 2009 in Technology
Tags: , ,

This might be useful trick to upload and display an image.

mmusson’s code post in this thread works well for me.

createDelegate in ExtJS

Posted: May 26, 2009 in Technology
Tags: ,

createDelegate is an interesting way to pass a function object with a scope object. This is very useful for using callback functions. For more information, see this screencast.

This thread helped me to use Ext JS XTemplate with optional fields. The only thing I had to figure out was defining my own check exists function, this.exists().

Sort case insensitively

Posted: February 27, 2009 in Technology
Tags: ,

It’s interesting to find a minor difference on how Ext JS’ store handles case sorting. If you want to sort case sensitively, then remove the type property definition below, else add it in. Here is an example: {name: ‘field name’, type:’string’}, Thanks to this thread for the trick.

Be careful with the sandbox

Posted: February 2, 2009 in Technology
Tags: , , ,

This customization of Ext JS TreeLoader can create a negative side-effect on Safari and Chrome in a very narrow use case. The issue that I ran into happens when the folder node was empty and when you drop a leaf node into it. In the sandBox function shown in the above link, it would return [...]

I have a JSON response that has data in a nested object within a data entry. Mapping and reading the nested data is easy and straightforward. The interesting part is that the nested object is optional and therefore may not exist in the response sometimes. Unfortunately, JsonReader can’t handle this and would throw a silent [...]

Follow-up on TreePanel

Posted: January 14, 2009 in Technology
Tags: ,

In this post, I had the following questions: How do I set leaf node? How do I configure to change the initial “move” behavior of drag-and-drop into a “copy” action so the node in the source tree doesn’t disappear? Here are my own answers: To set leaf node, I just updated the sandbox function to [...]