Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Ext JS 4 Web Application Development Cookbook
Ext JS 4 Web Application Development Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Classes, Object-Oriented Principles and Structuring your Application
Introduction
Creating custom classes using the new Ext JS class system
How to do it...
How it works...
There's more...
See also
Using inheritance in your classes
How to do it...
How it works...
There's more...
See also
Adding mixins to your class
How to do it...
How it works...
There's more...
See also
Scoping your functions
What is Scope?
Scope and Ext JS
How to do it...
How it works...
There's more...
See also
Dynamically loading Ext JS classes
How to do it...
How it works...
There's more...
See also
Aliasing your components
How to do it...
How it works...
There's more...
See also
Accessing components with component query
Getting ready
How to do it...
How it works...
There's more...
Evaluating a component instance's type
Ext.container.AbstractContainer ComponentQuery methods
Using and creating the pseudo-selectors
See also
Extending Ext JS components
How to do it...
How it works...
There's more...
See also
Overriding Ext JS' functionality
How to do it...
How it works...
There's more...
Ext.Base.callParent
Ext.Base.borrow
Ext.Base.implement
See also
2. Manipulating the Dom, Handling Events, and Making AJAX Requests
Introduction
Selecting DOM elements
How to do it...
How it works...
There's more...
Ext.select
Ext.query
See also
Traversing the DOM
Getting ready
How to do it...
How it works...
There's more...
Direct parents and children
Multiple level traversal
See also
Manipulating DOM elements
Getting ready
How to do it...
How it works...
There's more...
Showing and hiding an element
Updating the contents of an element
See also
Creating new DOM elements
Getting ready
How to do it...
How it works...
There's more...
Inserting a new element before or after an existing element
Using templates to insert elements
See also
Handling events on elements and components
Getting ready
How to do it...
How it works...
There's more...
Defining multiple event handlers at once
Defining event handlers in config objects
See also
Delegating event handling of child elements
Getting ready
How to do it...
How it works...
There's more...
See also
Simple animation of elements
How to do it...
How it works...
See also
Custom animations
How to do it...
How it works...
There's more...
easing
iterations
beforeanimate and afteranimate events
keyframe event
See also
Parsing, formatting, and manipulating dates
How to do it...
How it works...
There's more...
See also
Loading data with AJAX
Getting ready
How to do it...
How it works...
There's more...
POST JSON or XML data
Disabling client-side caching of Ajax requests
Use Ext.data.JsonP for cross-domain
See also
Encoding and decoding JSON data
How to do it...
How it works...
There's more...
See also
3. Laying Out Your Components
Introduction
Using a FitLayout to expand components to fill their parent
How to do it...
How it works...
There's more...
See also
Creating flexible vertical layouts with VBoxes
How to do it...
How it works...
There's more...
align: String
pack: String
See also
Creating flexible horizontal layouts with HBoxes
How to do it...
How it works...
There's more...
align: String
pack: String
See also
Displaying content in columns
How to do it...
How it works...
See also
Collapsible layouts with accordions
How to do it...
How it works...
See also
Displaying stacked components with CardLayouts
How to do it...
How it works...
There's more...
See also
Anchor components to their parent's dimensions
How to do it...
How it works...
There's more...
See also
Creating fullscreen applications with the BorderLayout
How to do it...
How it works...
See also
Combining multiple layouts
How to do it...
How it works...
See also
4. UI Building Blocks — Trees, Panels, and Data Views
Introduction
Loading a tree's nodes from the server
Getting ready
How to do it...
How it works...
See also
Sorting tree nodes
How to do it...
How it works...
There's more...
Complex and custom sorting
Sorting by multiple fields
Sorting on demand
See also
Dragging-and-dropping nodes within a tree
How to do it...
How it works...
See also
Using a tree as a menu to load content into another panel
How to do it...
How it works...
See also
Docking items to panels' edges
How to do it...
How it works...
There's more...
Displaying a simple form in a window
How to do it...
How it works...
See also
Creating a tabbed layout with tooltips
How to do it...
How it works...
See also
Manipulating a tab panel's TabBar
How to do it...
Configure a tab with an icon
Dynamically switch icons
Set tabs' widths
Change the position of the tab bar
Show and hide tabs on the fly
How it works...
Executing inline JavaScript to in an XTemplate customize appearance
How to do it...
How it works...
There's more...
See also
Creating Ext.XTemplate member functions
How to do it...
How it works...
There's more...
Adding logic to Ext.XTemplates
Getting ready
How to do it...
How it works...
There's more...
Formatting dates within an Ext.XTemplate
How to do it...
How it works...
See also
Creating a DataView bound to a data store
How to do it...
How it works...
See also
Displaying a detailed window after clicking a DataView node
Getting ready
How to do it...
How it works...
There's more...
itemcontextmenu
itemdblclick
selectionchange
See also
5. Loading, Submitting, and Validating Forms
Introduction
Constructing a complex form layout
How to do it...
How it works...
See also
Populating your form with data
Getting ready
How to do it...
Populating individual fields
Populating the entire form
How it works...
There's more...
Populating a form from a Model instance
Populating a form directly from the server
See also
Submitting your form's data
Getting ready
How to do it...
How it works...
There's more...
Submitting a form from a Model instance
See Also
Validating form fields with VTypes
How to do it...
How it works...
There's more...
See also
Creating custom VTypes
How to do it...
How it works...
There's more...
See also
Uploading files to the server
Getting Ready
How to do it...
How it works...
There's more...
buttonOnly: Boolean
buttonText: String
buttonConfig: Object
See also
Handling exception and callbacks
Getting ready
How to do it...
How it works...
There's more...
Handling form population failures
An alternative to CLIENT_INVALID
See also
6. Using and Configuring Form Fields
Introduction
Displaying radio buttons in columns
How to do it...
How it works...
See Also
Populating CheckboxGroups
How to do it...
How it works...
There's more...
See also
Dynamically generate a CheckboxGroup from JSON
How to do it...
How it works...
There's more...
See also
Setting up available date ranges in Date fields
How to do it...
How it works...
There's more...
Disabling specific dates
Disabling specific days
Advanced Date Disabling with Regular Expressions
See Also
Loading and parsing Dates into a Date field
How to do it...
How it works...
There's more...
See also
Entering numbers with a Spinner field
How to do it...
How it works...
There's More...
See Also
Sliding values using a Slider field
How to do it...
How it works...
There's more...
Defining Multiple Thumbs
Reacting to a thumb being dragged
See Also
Loading server side data into a combobox
Getting ready
How to do it...
How it works...
See also
Autocompleting a combobox's value
How to do it...
How it works...
There's more...
Increasing autocomplete response time
Defining the minimum characters before autocompleting
Removing the combobox's trigger button
See Also
Rendering the results in a combobox
How to do it...
How it works...
See Also
Rich editing with an HTML field
How to do it...
How it works...
Creating repeatable form fields and fieldsets
How to do it...
How it works...
Combining form fields
Getting ready
How to do it...
How it works...
See also
7. Working with the Ext JS Data Package
Introduction
Modeling a data object
How to do it...
How it works...
There's more...
Setting the Model's uniquely identifying property
Parsing date fields correctly
Processing a field's data before loading
See also
Loading and saving a Model using proxies
Getting ready
How to do it...
How it works...
See also
Loading cross-domain data with a Store
How to do it...
How it works...
There's more...
See also
Associating Models and loading nested data
Getting ready
How to do it...
How it works...
There's more...
Ext.data.association.HasOne
See also
Applying validation rules to Models' fields
How to do it...
How it works...
There's more...
Other built-in validators
Creating a custom validator
Accessing error details
See also
Grouping a Store's data
Getting ready
How to do it...
How it works...
Extracting Records from XML
Field Mapping
There's more...
See also
Handling Store exceptions
Getting ready
How to do it...
How it works...
There's more...
Add a generic response handler to all AJAX proxies
Ext.data.proxy.Server's afterRequest method
See also
Saving and loading data with HTML5 Local Storage
How to do it...
How it works...
See also
8. Displaying and Editing Tabular Data
Introduction
Displaying simple tabular data
Getting ready
How to do it...
How it works...
See also
Editing grid data with a RowEditor
Getting ready
How to do it...
How it works...
There's more...
Editing grid data with a celleditor
See also
Adding a paging toolbar for large datasets
Getting ready
How to do it...
How it works...
See also
Dealing with large datasets with an infinite scrolling grid
Getting ready
How to do it...
How it works...
There's More...
See also
Dragging-and-dropping records between grids
Getting ready
How to do it...
How it works...
There's more...
Updating a row's data after dropping
Allowing rows to be reordered with drag-and-drop
See also
Creating a grouped grid
Getting ready
How to do it...
How it works...
There's more...
Making use of the grouping feature events and methods
See also
Custom rendering of grid cells with TemplateColumns
Getting ready
How to do it...
How it works...
There's more...
See also
Creating summary rows aggregating the grid's data
Getting ready
How to do it...
How it works...
There's more...
Summary data in a grouping grid
Displaying full-width row data with the RowBody feature
Getting ready
How to do it...
How it works...
There's more...
See also
Adding a context menu to grid rows
Getting ready
How to do it...
How it works...
There's more...
See also
Populating a form from a selected grid row
Getting ready
How to do it...
How it works...
See also
Adding buttons to grid rows with action columns
Getting ready
How to do it...
How it works...
There's more...
Change the icon dynamically
Prevent the column appearing in the hide/show column menu
See Also
9. Constructing Toolbars with Buttons and Menus
Introduction
Creating a split button
How to do it...
How it works...
There's more...
Removing the default action and always showing the menu
Using the Ext.button.Cycle component
Working with context menus
Getting ready
How to do it...
How it works...
See also
Adding a combobox to a toolbar to filter a grid
Getting ready
How to do it...
How it works...
There's more...
See also
Using the color picker in a menu
How to do it...
How it works...
There's more...
10. Drawing and Charting
Introduction
Drawing basic shapes
How to do it...
How it works...
There's more...
See also
Applying gradients to shapes
How to do it...
How it works...
See also
Drawing paths
How to do it...
How it works...
There's more...
See also
Transforming and interacting with shapes
How to do it...
How it works...
There's more...
Creating a bar chart with external data
Getting ready
How to do it...
How it works...
See also
Creating a pie chart with local data
How to do it...
How it works...
There's more...
Highlight each slice as users hover
Scaling the slices in line with their magnitude
Creating a line chart with updating data
Getting ready...
How to do it...
How it works...
See also
Customizing labels, colors, and axes
Getting ready
How to do it...
How it works...
There's more...
Creating a bespoke theme
See also
Attaching events to chart components
Getting ready
How to do it...
How it works...
See also
Creating a live updating chart bound to an editable grid
How to do it...
How it works...
See also
11. Theming your Application
Introduction
Compiling SASS with Compass
Getting ready
What is SASS?
What is Compass?
How to do it...
How it works...
See also
Introduction to SASS
Getting ready
How to do it...
How it works...
There's more...
See also
Using Ext JS' SASS variables
Getting ready
How to do it...
$base-color
$font-size and $font-family
Widgets
How it works...
See also
Using the UI config option
Getting ready
How to do it...
How it works...
See also
Creating your own theme mixins
Getting ready
How to do it...
How it works...
See also
Restyling a panel
Getting ready
How to do it...
How it works...
See also
Creating images for legacy browsers
Getting ready
How to do it...
How it works...
12. Advanced Ext JS for the Perfect App
Introduction
Advanced functionality with plugins
Getting ready
How to do it...
How it works...
See also
Architecting your applications with the MVC pattern
Getting ready
How to do it...
How it works...
See Also
Attaching user interactions to controller actions
Getting ready
How to do it...
How it works...
There's more...
See also
Creating a real-life application with the MVC pattern
Getting ready
How to do it...
How it works...
See also
Building your application with Sencha's SDK tools
Getting ready
How to do it...
How it works...
Getting started with Ext Direct
Getting ready
How to do it...
How it works...
See also
Loading and submitting forms with Ext Direct
Getting ready
How to do it...
How it works...
See also
Handling errors throughout your application
How to do it...
How it works...
See also
← Prev
Back
Next →
← Prev
Back
Next →