O'Reilly logo

Ext JS 4 Web Application Development Cookbook by Stuart Ashworth, Andrew Duncan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding logic to Ext.XTemplates

When presenting data, it is important to be able to include logic to allow different markup to be created depending on the data given to it.

Ext JS' Ext.XTemplate provides that functionality in an easy to use way, which we shall explore in this recipe.

We will show this functionality by adding an additional column to our bug table from our previous two recipes, to display the owner of the bug. If that owner is the same as the current user (which we will define as a member property) then we will display Me otherwise we will display the owner's name.

Getting ready

We will base this recipe heavily on the examples created in the previous two recipes. So make sure you have a look at them and remind yourself what we did!

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required