A reference guide to the components of the Component ...

Component Reference

A reference guide to the components of the RichFaces 4 framework

by Brian Leathem (Red Hat), Lukas Fryc (Red Hat), and Sean Rogers (Red Hat)

1. Introduction ................................................................................................................. 1 1.1. Libraries ............................................................................................................. 1

2. Common Ajax attributes .............................................................................................. 3 2.1. Data processing .................................................................................................. 3 2.1.1. execute ................................................................................................... 3 2.1.2. bypassUpdates ........................................................................................ 4 2.2. Rendering .......................................................................................................... 4 2.2.1. render ..................................................................................................... 4 2.2.2. ajaxRendered .......................................................................................... 5 2.2.3. limitRender .............................................................................................. 5 2.3. Queuing and traffic control .................................................................................. 6 2.3.1. requestDelay ............................................................................................ 6 2.3.2. ignoreDupResponses ............................................................................... 6 2.4. Events and JavaScript interactions ...................................................................... 6 2.4.1. onbeforesubmit ........................................................................................ 6 2.4.2. onbegin ................................................................................................... 6 2.4.3. onbeforedomupdate ................................................................................. 7 2.4.4. oncomplete .............................................................................................. 7 2.4.5. onerror .................................................................................................... 7 2.4.6. Registering event callbacks with jQuery ..................................................... 7

I. Ajax control components ................................................................................................. 9 3. Actions ............................................................................................................... 11 3.1. ................................................................................................. 11 3.1.1. Basic usage ................................................................................... 11 3.1.2. Reference data .............................................................................. 11 3.2. ............................................................................................. 11 3.2.1. Basic usage ................................................................................... 12 3.2.2. Interoperability ................................................................................ 12 3.2.3. Passing client-side parameters ........................................................ 13 3.2.4. Reference data .............................................................................. 13 3.3. .................................................................................. 14 3.4. ............................................................................... 14 3.4.1. Basic usage ................................................................................... 14 3.4.2. Reference data .............................................................................. 14 3.5. .................................................................................. 15 3.5.1. Basic usage ................................................................................... 15 3.5.2. Reference data .............................................................................. 15 3.6. ........................................................................................ 15 3.6.1. Basic usage ................................................................................... 15 3.6.2. Parameters and JavaScript ............................................................. 16 3.6.3. Reference data .............................................................................. 17 3.7. .................................................................................................. 17 3.7.1. Timing options ............................................................................... 17 3.7.2. Reference data .............................................................................. 17

iii

Component Reference

3.8. ................................................................................................ 17 3.8.1. Setting up Push ............................................................................. 18 3.8.2. Server-side Push methods .............................................................. 19 3.8.3. Client-side Push methods ............................................................... 20 3.8.4. Push Topics ................................................................................... 20 3.8.5. Handling a push message .............................................................. 20 3.8.6. Handling a push subscription .......................................................... 21 3.8.7. Using TopicsContext to publish message ......................................... 22 3.8.8. Integrating Push with CDI events .................................................... 22 3.8.9. Push and JMS integration ............................................................... 22 3.8.10. Reference data ............................................................................ 25

4. Resources .......................................................................................................... 27 4.1. .................................................................................... 27 4.1.1. Basic usage ................................................................................... 27 4.1.2. Handling content ............................................................................ 27 4.1.3. Reference data .............................................................................. 29

5. Containers ......................................................................................................... 31 5.1. ..................................................................................... 31 5.1.1. Aiding complex Ajax rendering ........................................................ 31 5.1.2. Panel appearance .......................................................................... 31 5.1.3. Reference data .............................................................................. 31 5.2. .............................................................................................. 31 5.2.1. Reference data .............................................................................. 32

6. Validation ........................................................................................................... 33 6.1. client-side validation .......................................................... 34 6.1.1. Basic usage ................................................................................... 34 6.1.2. Messages from client-side validators ............................................... 34 6.1.3. Validation triggers .......................................................................... 35 6.1.4. Ajax fall-backs ................................................................................ 36 6.1.5. Reference data .............................................................................. 36 6.2. object validation ....................................................... 36 6.2.1. Basic usage ................................................................................... 37 6.2.2. Reference data .............................................................................. 38

7. Processing management ................................................................................... 39 7.1. .............................................................................................. 39 7.1.1. Basic usage ................................................................................... 39 7.1.2. Delaying requests .......................................................................... 39 7.1.3. Duplicate responses ....................................................................... 39 7.1.4. Queue scopes ................................................................................ 39 7.1.5. client-side events ........................................................ 40 7.1.6. Reference data .............................................................................. 40 7.1.7. ......................................................................... 40 7.2. .................................................................................................. 42 7.2.1. Basic usage ................................................................................... 42

iv

7.2.2. Log monitoring ............................................................................... 42 7.2.3. Reference data .............................................................................. 43 7.2.4. Style classes and skin parameters .................................................. 44 7.3. .............................................................................................. 45 7.3.1. Customizing the text ....................................................................... 45 7.3.2. Specifying a region ......................................................................... 46 7.3.3. JavaScript API ............................................................................... 47 7.3.4. Reference data .............................................................................. 47 II. User interface components ........................................................................................... 49 8. Rich inputs ........................................................................................................ 51 8.1. .................................................................................. 51 8.1.1. Basic usage ................................................................................... 51 8.1.2. Submission modes ......................................................................... 52 8.1.3. Interactivity options ......................................................................... 52 8.1.4. Customizing the filter in client and lazyClient modes ......................... 53 8.1.5. JavaScript API ............................................................................... 53 8.1.6. Reference data .............................................................................. 54 8.1.7. Style classes and skin parameters .................................................. 54 8.2. ......................................................................................... 55 8.2.1. Basic usage ................................................................................... 56 8.2.2. Behavior and appearance ............................................................... 56 8.2.3. Time of day ................................................................................... 57 8.2.4. Localization and formatting ............................................................. 57 8.2.5. Using a data model ........................................................................ 58 8.2.6. Client-side customization ................................................................ 58 8.2.7. JavaScript API ............................................................................... 59 8.2.8. Reference data .............................................................................. 60 8.2.9. Style classes and skin parameters .................................................. 60 8.3. .............................................................................................. 66 8.3.1. Basic usage ................................................................................... 66 8.3.2. Styling ........................................................................................... 67 8.3.3. Editor skins .................................................................................... 67 8.3.4. Advanced configuration .................................................................. 69 8.3.5. Toolbar customization ..................................................................... 69 8.3.6. Internationalization and localization .................................................. 70 8.3.7. Client-side event handlers ............................................................... 70 8.3.8. JavaScript API ............................................................................... 71 8.3.9. Reference data .............................................................................. 72 8.3.10. Style classes and skin parameters ................................................. 72 8.4. ....................................................................................... 73 8.4.1. Basic usage ................................................................................... 73 8.4.2. Upload settings .............................................................................. 73 8.4.3. Sanitizing file upload input .............................................................. 74 8.4.4. Interactivity options ......................................................................... 74

v

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download