Let the user select an item in a modal dialog

After having used the shiny new YUI3 library for a project, it’s about time to share my YUI3 experiences with you.
For the project I built an item selector: A modal dialog is openend and the user has to select an item. After selection the dialog is closed and the selected item is passed to a callback function.

Here you can find the full source for the item selector. An example to use the selector can be as simple as this:

Just click on the following button, to start the example. Enjoy and let me know your comments.

Add a delete button in each row of an ExtJS data grid

For usability reasons it is usually a good idea to add a delete button to each row of a data grid. If the user clicks on such a button, the whole row that contained the button will be deleted.

The data grid of ExtJS does not contain such a feature by default, but it could be implemented by adding a special column to the column model. Using this extension, it could be easily done like this:

Note that the itemDeleter instance must be added to the ColumnModel and set as selModel to work properly.

Display an info text in a HTML input field if its focus is lost

Now that with Ext Core a light-weight version (just 25kB) of ExtJS has been released, I thought it’s time to build a nice example with it.

The result is something very useful that you can see in actually a lot of web sites: Display a info text inside of a input text field if it is empty and does not have the focus.

Here’s how it looks like:


To add this behaviour to a input field you just have to call this single line:

As always you can find the code for this component in a library called ‘extensive‘. Feel free to support the project by participating.