Slide 1
Building RIAs with jQuery UI & jqGrid
no notes exist for this slide
Slide 2
Who am I?
ColdFusion developer since 2000
Senior Software Developer for Alagad, Inc.
Associate Director of the Model-Glue framework
Co-manager, Inland Empire CFUG
no notes exist for this slide
Slide 3
What we'll be covering
What is jQuery UI?
How to use jQuery UI
What is jqGrid?
How to use jqGrid
Using jQuery UI & jqGrid together to build applications
no notes exist for this slide
Slide 4
What we won't be covering
jQuery
If you do not have any knowledge of the core jQuery library, you may find this presentation difficult to follow
no notes exist for this slide
Slide 5
What is jQuery UI?
From the jQuery UI site:
"jQuery UI provides abstractions for low-level interaction and animation, advanced effects and high-level, themeable widgets, built on top of the jQuery JavaScript Library, that you can use to build highly interactive web applications."
no notes exist for this slide
Slide 6
OK, so what does that mean?
It's a collection of plugins for jQuery that encapsulate several different types of functionality
Interactions
Widgets
Effects
Utilities
Includes customizable theming support via the jQuery UI CSS framework & ThemeRoller
no notes exist for this slide
Slide 7
Interactions
Interactions allow for applying "behavior" to HTML elements
Draggable
Droppable
Resizable
Selectable
Sortable
no notes exist for this slide
Slide 8
Widgets
High-level user interface components
Accordion
Autocomplete
Button
Datepicker
Dialog
Progressbar
Slider
Tabs
no notes exist for this slide
Slide 9
Effects
Pre-built visual effects & enhanced animations
Additional Effects
Visibility Transitions
Color Transitions
Class Transitions
Advanced Easing
no notes exist for this slide
Slide 10
Utilities
Miscellaneous tools
Position
More in development/planning stages
Shadow
Modal
Image Preloading
no notes exist for this slide
Slide 11
Theming Support
jQuery UI CSS framework
Can be used for standalone styling without using JavaScript
ThemeRoller
Gallery
Customizing
ThemeRoller Firefox bookmarklet
no notes exist for this slide
Slide 12
How to implement jQuery UI
no notes exist for this slide
Slide 13
What is jqGrid?
From the jqGrid site:
"jqGrid is an Ajax-enabled JavaScript control that provides solutions for representing and manipulating tabular data on the web."
A ThemeRoller-ready jQuery plugin that creates dynamic, highly-customizable grid widgets
no notes exist for this slide
Slide 14
no notes exist for this slide
Slide 15
jqGrid Features
Sorting
Paging
Searching & Filtering
Form Search
Toolbar Search
Editing
Inline Editing
Cell Editing
Form Editing
no notes exist for this slide
Slide 16
Data Formats
Supports several types of input data
JSON (and JSONP)
XML
Local (JavaScript array)
HTML (via the tableToGrid() function)
Completely customizable xmlReader & jsonReader
Client-side sorting is supported
Paging & searching require server-side data
no notes exist for this slide
Slide 17
JSON Data Structure
{
page: "xxx",
records: "yyy",
total: "zzz",
rows: [
{ id: "1", cell: ["cell11", "cell12", "cell13"] },
{ id: "2", cell: ["cell21", "cell22", "cell23"] },
...
]
}
no notes exist for this slide
Slide 18
jqGrid Options
Far too many options to list here
Essential options for a functioning grid:
url
datatype (not required, but defaults to 'xml')
colNames (can use the label colModel option instead)
colModel
pager (navigation layer will not appear if not defined)
caption (caption layer will not appear if not defined)
no notes exist for this slide
Slide 19
colModel Options
Once again, too many to list them all
Some options that will often be used:
name (this is the only required option)
width (defaults to 150px)
align
formatter
index
sortable
no notes exist for this slide
Slide 20
Events & Methods
Rich event API
gridComplete
onCellSelect
onSelectRow
Methods & Functions
getCell
getRowData
setGridParam
trigger('reloadGrid')
no notes exist for this slide
Slide 21
no notes exist for this slide
Slide 22
Putting it all together: an example master/detail application
no notes exist for this slide
Slide 23
Resources
jQuery:
http://www.jquery.com
jQuery UI:
http://www.jqueryui.com
jqGrid wiki:
http://www.trirand.com/jqgridwiki
jqGrid demos:
http://trirand.com/blog/jqgrid/jqgrid.html
no notes exist for this slide
Slide 24
Questions?
Contact me:
Email: eparker@alagad.com or ezra@cfgrok.com
GTalk: ezra@cfgrok.com
Blog: http://www.cfgrok.com
Twitter: @alagadinc
no notes exist for this slide