100% found this document useful (4 votes)
551 views798 pages

RichFaces Developer Guide SEO

RichFaces is an open source JavaServer Faces framework that provides Ajax functionality and a library of rich web components. The RichFaces Developer Guide provides documentation on installing and getting started with RichFaces, configuration for different environments, basic concepts and architecture of the framework, and details on the available RichFaces components. It explains how to optimize Ajax requests, handle errors and session expiration, leverage skinnability, and use the state management API.

Uploaded by

hassounbs
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (4 votes)
551 views798 pages

RichFaces Developer Guide SEO

RichFaces is an open source JavaServer Faces framework that provides Ajax functionality and a library of rich web components. The RichFaces Developer Guide provides documentation on installing and getting started with RichFaces, configuration for different environments, basic concepts and architecture of the framework, and details on the available RichFaces components. It explains how to optimize Ajax requests, handle errors and session expiration, leverage skinnability, and use the state management API.

Uploaded by

hassounbs
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 798

RichFaces Developer Guide

RichFaces framework
with a huge library of
rich components and
skinnability support
1. Introduction ................................................................................................................. 1
2. Technical Requirements .............................................................................................. 3
2.1. Supported Java Versions .................................................................................... 3
2.2. Supported JavaServer Faces Implementations and Frameworks ............................ 3
2.3. Supported Servers .............................................................................................. 3
2.4. Supported Browsers ............................................................................................ 4
3. Getting Started with RichFaces ................................................................................... 5
3.1. Downloading RichFaces 3.2.1 ............................................................................. 5
3.2. Installation .......................................................................................................... 5
3.3. Simple Ajax Echo Project ................................................................................... 6
3.3.1. JSP Page ................................................................................................ 6
3.3.2. Data Bean ............................................................................................... 7
3.3.3. faces-config.xml ....................................................................................... 7
3.3.4. Web.xml .................................................................................................. 8
3.3.5. Deployment ............................................................................................. 9
4. Settings for different environments ........................................................................... 11
4.1. Web Application Descriptor Parameters .............................................................. 11
4.2. Sun JSF RI ...................................................................................................... 14
4.3. Apache MyFaces .............................................................................................. 15
4.4. Facelets Support ............................................................................................... 15
4.5. JBoss Seam Support ........................................................................................ 16
4.6. Portlet Support .................................................................................................. 19
4.7. Sybase EAServer .............................................................................................. 19
4.8. Oracle AS/OC4J ............................................................................................... 20
5. Basic concepts of the RichFaces Framework ............................................................ 21
5.1. Introduction ....................................................................................................... 21
5.2. RichFaces Architecture Overview ....................................................................... 22
5.3. Limitations and Rules ........................................................................................ 25
5.4. Ajax Request Optimization ................................................................................ 26
5.4.1. Re-Rendering ......................................................................................... 26
5.4.2. Queue and Traffic Flood Protection ......................................................... 28
5.4.3. Data Processing Options ........................................................................ 29
5.4.4. Action and Navigation ............................................................................ 30
5.4.5. JavaScript Interactions ............................................................................ 31
5.4.6. Iteration components Ajax attributes ........................................................ 32
5.4.7. Other useful attributes ............................................................................ 33
5.5. How To... ......................................................................................................... 34
5.5.1. Send an Ajax request ............................................................................. 34
5.5.2. Decide What to Send ............................................................................. 34
5.5.3. Decide What to Change ......................................................................... 34
5.5.4. Decide what to process .......................................................................... 35
5.6. Filter Configuration ............................................................................................ 36
5.7. Scripts and Styles Load Strategy ....................................................................... 38
5.8. Request Errors and Session Expiration Handling ................................................ 39

iii
RichFaces Developer Guide

5.8.1. Request Errors Handling ......................................................................... 40


5.8.2. Session Expired Handling ....................................................................... 40
5.9. Skinnability ....................................................................................................... 41
5.9.1. Why Skinnability ..................................................................................... 41
5.9.2. Using Skinnability ................................................................................... 41
5.9.3. Example ................................................................................................ 42
5.9.4. Skin Parameters Tables in RichFaces ..................................................... 43
5.9.5. Creating and Using Your Own Skin File ................................................... 45
5.9.6. Built-in skinnability in RichFaces ............................................................. 45
5.9.7. Standard controls skinning ...................................................................... 47
5.9.8. Client-side script for extended skinning support ........................................ 56
5.9.9. XCSS file format .................................................................................... 57
5.9.10. Plug-n-Skin .......................................................................................... 58
5.10. State Manager API .......................................................................................... 65
6. The RichFaces Components ...................................................................................... 71
6.1. < a4j:ajaxListener > ......................................................................................... 71
6.1.1. Description ............................................................................................. 71
6.1.2. Creating on a page ................................................................................ 71
6.1.3. Creating the Component Dynamically Using Java ..................................... 71
6.1.4. Key attributes and ways of usage ........................................................... 72
6.1.5. Relevant resources links ......................................................................... 73
6.2. < a4j:keepAlive > ............................................................................................. 73
6.2.1. Description ............................................................................................. 73
6.2.2. Using the tag on a Page ........................................................................ 73
6.2.3. Key attributes and ways of usage ........................................................... 74
6.2.4. Relevant resources links ......................................................................... 74
6.3. < a4j:actionparam > ......................................................................................... 74
6.3.1. Description ............................................................................................. 74
6.3.2. Creating on a page ................................................................................ 75
6.3.3. Creating the Component Dynamically Using Java ..................................... 76
6.3.4. Key attributes and ways of usage ........................................................... 76
6.3.5. Relevant resources links ......................................................................... 76
6.4. < a4j:commandButton > ................................................................................... 77
6.4.1. Description ............................................................................................. 77
6.4.2. Creating on a page ................................................................................ 81
6.4.3. Creating the Component Dynamically Using Java ..................................... 81
6.4.4. Key attributes and ways of usage ........................................................... 81
6.4.5. Relevant resources links ......................................................................... 83
6.5. < a4j:commandLink > ...................................................................................... 83
6.5.1. Description ............................................................................................. 83
6.5.2. Creating on a page ................................................................................ 87
6.5.3. Creating the Component Dynamically Using Java ..................................... 88
6.5.4. Key attributes and ways of usage ........................................................... 88
6.5.5. Relevant resources links ......................................................................... 89

iv
6.6. < a4j:form > .................................................................................................... 89
6.6.1. Description ............................................................................................. 89
6.6.2. Creating on a page ................................................................................ 92
6.6.3. Creating the Component Dynamically Using Java ..................................... 92
6.6.4. Key attributes and ways of usage ........................................................... 92
6.6.5. Relevant resources links ......................................................................... 93
6.7. < a4j:htmlCommandLink > ................................................................................ 93
6.7.1. Description ............................................................................................. 93
6.7.2. Creating the Component with a Page Tag ............................................... 97
6.7.3. Creating the Component Dynamically Using Java ..................................... 97
6.7.4. Key attributes and ways of usage ........................................................... 97
6.7.5. Relevant resources links ......................................................................... 98
6.8. < a4j:jsFunction > ............................................................................................ 98
6.8.1. Description ............................................................................................. 98
6.8.2. Creating on a page .............................................................................. 100
6.8.3. Creating the Component Dynamically Using Java ................................... 101
6.8.4. Key attributes and ways of usage .......................................................... 101
6.8.5. Relevant resources links ....................................................................... 102
6.9. < a4j:include > ............................................................................................... 102
6.9.1. Description ........................................................................................... 102
6.9.2. Creating on a page .............................................................................. 103
6.9.3. Creating the Component Dynamically Using Java ................................... 104
6.9.4. Relevant resources links ....................................................................... 105
6.10. < a4j:loadBundle > ....................................................................................... 105
6.10.1. Description ......................................................................................... 105
6.10.2. Creating on a page ............................................................................. 105
6.10.3. Creating the Component Dynamically Using Java ................................. 106
6.10.4. Key attributes and ways of usage ........................................................ 106
6.10.5. Relevant resources links ..................................................................... 106
6.11. < a4j:loadScript > ......................................................................................... 106
6.11.1. Description ......................................................................................... 106
6.11.2. Creating on a page ............................................................................. 107
6.11.3. Creating the Component Dynamically Using Java ................................. 107
6.11.4. Key attributes and ways of usage ........................................................ 107
6.11.5. Relevant resources links ..................................................................... 108
6.12. < a4j:loadStyle > .......................................................................................... 108
6.12.1. Description ......................................................................................... 108
6.12.2. Creating on a page ............................................................................. 108
6.12.3. Creating the Component Dynamically Using Java ................................. 109
6.12.4. Key attributes and ways of usage ........................................................ 109
6.12.5. Relevant resources links ..................................................................... 109
6.13. < a4j:log > ................................................................................................... 109
6.13.1. Description ......................................................................................... 109
6.13.2. Creating the Component with a Page Tag ............................................ 111

v
RichFaces Developer Guide

6.13.3. Creating the Component Dynamically Using Java ................................. 111


6.13.4. Key attributes and ways of usage ........................................................ 111
6.13.5. Relevant resources links ..................................................................... 112
6.14. < a4j:mediaOutput > .................................................................................... 112
6.14.1. Description ......................................................................................... 112
6.14.2. Creating on a page ............................................................................. 117
6.14.3. Creating the Component Dynamically Using Java ................................. 117
6.14.4. Key attributes and ways of usage ........................................................ 117
6.14.5. Relevant resources links ..................................................................... 118
6.15. < a4j:outputPanel > ...................................................................................... 118
6.15.1. Description ......................................................................................... 118
6.15.2. Creating on a page ............................................................................. 120
6.15.3. Creating the Component Dynamically Using Java ................................. 121
6.15.4. Key attributes and ways of usage ........................................................ 121
6.15.5. Relevant resources links ..................................................................... 123
6.16. < a4j:page > ................................................................................................ 123
6.16.1. Description ......................................................................................... 123
6.16.2. Creating on a page ............................................................................. 125
6.16.3. Creating the Component Dynamically Using Java ................................. 125
6.16.4. Key attributes and ways of usage ........................................................ 125
6.16.5. Relevant resources links ..................................................................... 126
6.17. < a4j:poll > .................................................................................................. 126
6.17.1. Description ......................................................................................... 126
6.17.2. Creating on a page ............................................................................. 129
6.17.3. Creating the Component Dynamically Using Java ................................. 129
6.17.4. Key attributes and ways of usage ........................................................ 129
6.17.5. Relevant resources links ..................................................................... 130
6.18. < a4j:portlet > .............................................................................................. 131
6.18.1. Description ......................................................................................... 131
6.18.2. Creating the Component with a Page Tag ............................................ 131
6.18.3. Creating the Component Dynamically Using Java ................................. 131
6.18.4. Key attributes and ways of usage ........................................................ 132
6.18.5. Relevant resources links ..................................................................... 132
6.19. < a4j:push > ................................................................................................ 132
6.19.1. Description ......................................................................................... 132
6.19.2. Creating on a page ............................................................................. 135
6.19.3. Creating the Component Dynamically Using Java ................................. 135
6.19.4. Key attributes and ways of usage ........................................................ 135
6.19.5. Relevant resources links ..................................................................... 136
6.20. < a4j:region > .............................................................................................. 137
6.20.1. Description ......................................................................................... 137
6.20.2. Creating on a page ............................................................................. 138
6.20.3. Creating the Component Dynamically Using Java ................................. 138
6.20.4. Key attributes and ways of usage ........................................................ 138

vi
6.20.5. Relevant resources links ..................................................................... 141
6.21. < a4j:repeat > .............................................................................................. 141
6.21.1. Description ......................................................................................... 141
6.21.2. Creating on a page ............................................................................. 142
6.21.3. Creating the Component Dynamically Using Java ................................. 142
6.21.4. Key attributes and ways of usage ........................................................ 142
6.21.5. Relevant resources links ..................................................................... 143
6.22. < a4j:status > .............................................................................................. 144
6.22.1. Description ......................................................................................... 144
6.22.2. Creating on a page ............................................................................. 145
6.22.3. Creating the Component Dynamically Using Java ................................. 146
6.22.4. Key attributes and ways of usage ........................................................ 146
6.22.5. Relevant resources links ..................................................................... 147
6.23. < a4j:support > ............................................................................................ 148
6.23.1. Description ......................................................................................... 148
6.23.2. Creating on a page ............................................................................. 150
6.23.3. Creating the Component Dynamically Using Java ................................. 150
6.23.4. Key attributes and ways of usage ........................................................ 151
6.23.5. Relevant resources links ..................................................................... 154
6.24. < rich:ajaxValidator > ................................................................................... 154
6.24.1. Description ......................................................................................... 154
6.24.2. Key Features ...................................................................................... 154
6.24.3. Creating the Component with a Page Tag ............................................ 156
6.24.4. Creating the Component Dynamically Using Java ................................. 156
6.24.5. Details of Usage ................................................................................. 157
6.24.6. Relevant Resources Links ................................................................... 159
6.25. < rich:graphValidator > ................................................................................. 159
6.25.1. Description ......................................................................................... 159
6.25.2. Key Features ...................................................................................... 159
6.25.3. Creating the Component with a Page Tag ............................................ 160
6.25.4. Creating the Component Dynamically Using Java ................................. 160
6.25.5. Relevant Resources Links ................................................................... 162
6.26. < rich:beanValidator > .................................................................................. 162
6.26.1. Description ......................................................................................... 162
6.26.2. Key Features ...................................................................................... 163
6.26.3. Creating the Component with a Page Tag ............................................ 163
6.26.4. Creating the Component Dynamically Using Java ................................. 163
6.26.5. Details of Usage ................................................................................. 164
6.26.6. Relevant Resources Links ................................................................... 166
6.27. < rich:calendar > .......................................................................................... 166
6.27.1. Description ......................................................................................... 166
6.27.2. Key Features ...................................................................................... 166
6.27.3. Creating the Component with a Page Tag ............................................ 173
6.27.4. Creating the Component Dynamically Using Java ................................. 173

vii
RichFaces Developer Guide

6.27.5. Details of Usage ................................................................................. 174


6.27.6. JavaScript API .................................................................................... 183
6.27.7. Look-and-Feel Customization .............................................................. 184
6.27.8. Skin Parameters Redefinition .............................................................. 184
6.27.9. Definition of Custom Style Classes ...................................................... 188
6.27.10. Relevant Resources Links ................................................................. 194
6.28. < rich:comboBox > ....................................................................................... 194
6.28.1. Description ......................................................................................... 194
6.28.2. Key Features ...................................................................................... 195
6.28.3. Creating the Component with a Page Tag ............................................ 198
6.28.4. Creating the Component Dynamically Using Java ................................. 199
6.28.5. Details of Usage ................................................................................. 199
6.28.6. JavaScript API .................................................................................... 202
6.28.7. Look-and-Feel Customization .............................................................. 202
6.28.8. Skin Parameters Redefinition .............................................................. 202
6.28.9. Definition of Custom Style Classes ...................................................... 204
6.28.10. Relevant Resources Links ................................................................. 208
6.29. < rich:componentControl > ............................................................................ 208
6.29.1. Description ......................................................................................... 208
6.29.2. Key Features ...................................................................................... 208
6.29.3. Creating the Component with a Page Tag ............................................ 210
6.29.4. Creating the Component Dynamically Using Java ................................. 210
6.29.5. Details of Usage ................................................................................. 210
6.29.6. Look-and-Feel Customization .............................................................. 213
6.29.7. Relevant Resources Links ................................................................... 213
6.30. < rich:contextMenu > .................................................................................... 213
6.30.1. Description ......................................................................................... 213
6.30.2. Key Features ...................................................................................... 213
6.30.3. Creating the Component with a Page Tag ............................................ 216
6.30.4. Creating the Component Dynamically Using Java ................................. 216
6.30.5. Details of Usage ................................................................................. 216
6.30.6. JavaScript API .................................................................................... 221
6.30.7. Look-and-Feel Customization .............................................................. 221
6.30.8. Skin Parameters Redefinition .............................................................. 221
6.30.9. Definition of Custom Style Classes ...................................................... 222
6.30.10. Relevant Resources Links ................................................................. 224
6.31. < rich:dataFilterSlider > ................................................................................ 224
6.31.1. Description ......................................................................................... 224
6.31.2. Key Features ...................................................................................... 224
6.31.3. Creating the Component with a Page Tag ............................................ 229
6.31.4. Creating the Component Dynamically Using Java ................................. 229
6.31.5. Details of Usage ................................................................................. 229
6.31.6. Look-and-Feel Customization .............................................................. 230
6.31.7. Relevant Resources Links ................................................................... 231

viii
6.32. < rich:datascroller > ..................................................................................... 231
6.32.1. Description ......................................................................................... 231
6.32.2. Key Features ...................................................................................... 231
6.32.3. Creating the Component with a Page Tag ............................................ 236
6.32.4. Creating the Component Dynamically Using Java ................................. 236
6.32.5. Details of Usage ................................................................................. 236
6.32.6. Look-and-Feel Customization .............................................................. 240
6.32.7. Skin Parameters Redefinition .............................................................. 241
6.32.8. Definition of Custom Style Classes ...................................................... 241
6.32.9. Relevant Resources Links ................................................................... 243
6.33. < rich:columns > .......................................................................................... 244
6.33.1. Description ......................................................................................... 244
6.33.2. Key Features ...................................................................................... 244
6.33.3. Creating the Component with a Page Tag ............................................ 246
6.33.4. Creating the Component Dynamically Using Java ................................. 247
6.33.5. Details of Usage ................................................................................. 247
6.33.6. Look-and-Feel Customization .............................................................. 251
6.33.7. Skin Parameters Redefinition .............................................................. 251
6.33.8. Definition of Custom Style Classes ...................................................... 251
6.33.9. Relevant Resources Links ................................................................... 253
6.34. < rich:columnGroup > ................................................................................... 253
6.34.1. Description ......................................................................................... 253
6.34.2. Key Features ...................................................................................... 254
6.34.3. Creating the Component with a Page Tag ............................................ 255
6.34.4. Creating the Component Dynamically Using Java ................................. 256
6.34.5. Details of Usage ................................................................................. 256
6.34.6. Look-and-Feel Customization .............................................................. 259
6.34.7. Skin Parameters Redefinition .............................................................. 259
6.34.8. Definition of Custom Style Classes ...................................................... 259
6.34.9. Relevant Resources Links ................................................................... 261
6.35. < rich:column > ............................................................................................ 261
6.35.1. Description ......................................................................................... 261
6.35.2. Key Features ...................................................................................... 262
6.35.3. Creating the Component with a Page Tag ............................................ 264
6.35.4. Creating the Component Dynamically Using Java ................................. 264
6.35.5. Details of Usage ................................................................................. 265
6.35.6. Sorting and Filtering ........................................................................... 268
6.35.7. Look-and-Feel Customization .............................................................. 274
6.35.8. Skin Parameters Redefinition .............................................................. 274
6.35.9. Definition of Custom Style Classes ...................................................... 275
6.35.10. Relevant Resources Links ................................................................. 276
6.36. < rich:dataGrid > .......................................................................................... 276
6.36.1. Description ......................................................................................... 276
6.36.2. Key Features ...................................................................................... 277

ix
RichFaces Developer Guide

6.36.3. Creating the Component with a Page Tag ............................................ 281


6.36.4. Creating the Component Dynamically Using Java ................................. 282
6.36.5. Details of Usage ................................................................................. 282
6.36.6. Look-and-Feel Customization .............................................................. 284
6.36.7. Skin Parameters Redefinition .............................................................. 284
6.36.8. Definition of Custom Style Classes ...................................................... 284
6.36.9. Relevant Resources Links ................................................................... 286
6.37. < rich:dataList > ........................................................................................... 286
6.37.1. Description ......................................................................................... 286
6.37.2. Key Features ...................................................................................... 287
6.37.3. Creating the Component with a Page Tag ............................................ 288
6.37.4. Creating the Component Dynamically Using Java ................................. 289
6.37.5. Details of Usage ................................................................................. 289
6.37.6. Look-and-Feel Customization .............................................................. 291
6.37.7. Definition of Custom Style Classes ...................................................... 291
6.37.8. Relevant Resources Links ................................................................... 293
6.38. < rich:dataOrderedList > ............................................................................... 293
6.38.1. Description ......................................................................................... 293
6.38.2. Key Features ...................................................................................... 294
6.38.3. Creating the Component with a Page Tag ............................................ 295
6.38.4. Creating the Component Dynamically Using Java ................................. 296
6.38.5. Details of Usage ................................................................................. 296
6.38.6. Look-and-Feel Customization .............................................................. 297
6.38.7. Definition of Custom Style Classes ...................................................... 298
6.38.8. Relevant Resources Links ................................................................... 300
6.39. < rich:dataDefinitionList > ............................................................................. 300
6.39.1. Description ......................................................................................... 300
6.39.2. Key Features ...................................................................................... 301
6.39.3. Creating the Component with a Page Tag ............................................ 303
6.39.4. Creating the Component Dynamically Using Java ................................. 303
6.39.5. Details of Usage ................................................................................. 303
6.39.6. Look-and-Feel Customization .............................................................. 305
6.39.7. Definition of Custom Style Classes ...................................................... 305
6.39.8. Relevant Resources Links ................................................................... 307
6.40. < rich:dataTable > ........................................................................................ 307
6.40.1. Description ......................................................................................... 307
6.40.2. Key Features ...................................................................................... 308
6.40.3. Creating the Component with a Page Tag ............................................ 313
6.40.4. Creating the Component Dynamically from Java ................................... 313
6.40.5. Details of Usage ................................................................................. 313
6.40.6. Look-and-Feel Customization .............................................................. 315
6.40.7. Skin Parameters Redefinition .............................................................. 316
6.40.8. Definition of Custom Style Classes ...................................................... 316
6.40.9. Relevant Resources Links ................................................................... 319

x
6.41. < rich:subTable > ......................................................................................... 320
6.41.1. Description ......................................................................................... 320
6.41.2. Key Features ...................................................................................... 320
6.41.3. Creating the Component with a Page Tag ............................................ 324
6.41.4. Creating the Component Dynamically Using Java ................................. 324
6.41.5. Details of Usage ................................................................................. 324
6.41.6. Look-and-Feel Customization .............................................................. 325
6.41.7. Skin Parameters Redefinition .............................................................. 325
6.41.8. Definition of Custom Style Classes ...................................................... 325
6.42. < rich:dndParam > ....................................................................................... 329
6.42.1. Description ......................................................................................... 329
6.42.2. Creating the Component with a Page Tag ............................................ 330
6.42.3. Creating the Component Dynamically Using Java ................................. 330
6.42.4. Details of Usage ................................................................................. 330
6.42.5. Look-and-Feel Customization .............................................................. 332
6.42.6. Relevan Resources Links .................................................................... 332
6.43. < rich:dragIndicator > ................................................................................... 332
6.43.1. Description ......................................................................................... 332
6.43.2. Key Features ...................................................................................... 332
6.43.3. Creating the Component with a Page Tag ............................................ 333
6.43.4. Creating the Component Dynamically Using Java ................................. 333
6.43.5. Details of Usage ................................................................................. 334
6.43.6. Look-and-Feel Customization .............................................................. 336
6.43.7. Relevant Resources Links ................................................................... 336
6.44. < rich:dragSupport > .................................................................................... 336
6.44.1. Description ......................................................................................... 336
6.44.2. Key Features ...................................................................................... 337
6.44.3. Creating the Component with a Page Tag ............................................ 340
6.44.4. Creating the Component Dynamically Using Java ................................. 340
6.44.5. Details of Usage ................................................................................. 341
6.44.6. Look-and-Feel Customization .............................................................. 343
6.44.7. Relevant Resources Links ................................................................... 343
6.45. < rich:dropSupport > .................................................................................... 343
6.45.1. Description ......................................................................................... 343
6.45.2. Key Features ...................................................................................... 343
6.45.3. Creating the Component with a Page Tag ............................................ 347
6.45.4. Creating the Component Dynamically Using Java ................................. 347
6.45.5. Details of Usage ................................................................................. 347
6.45.6. Look-and-Feel Customization .............................................................. 350
6.45.7. Relevant Resources Links ................................................................... 350
6.46. < rich:dragListener > .................................................................................... 350
6.46.1. Description ......................................................................................... 350
6.46.2. Key Features ...................................................................................... 350
6.46.3. Creating the Component with a Page Tag ............................................ 351

xi
RichFaces Developer Guide

6.46.4. Creating the Component Dynamically Using Java ................................. 351


6.46.5. Details of Usage ................................................................................. 351
6.46.6. Look-and-Feel Customization .............................................................. 352
6.47. < rich:dropListener > .................................................................................... 352
6.47.1. Description ......................................................................................... 352
6.47.2. Key Features ...................................................................................... 352
6.47.3. Creating the Component with a Page Tag ............................................ 353
6.47.4. Creating the Component Dynamically Using Java ................................. 353
6.47.5. Details of Usage ................................................................................. 354
6.47.6. Look-and-Feel Customization .............................................................. 354
6.48. < rich:dropDownMenu > ............................................................................... 355
6.48.1. Description ......................................................................................... 355
6.48.2. Key Features ...................................................................................... 355
6.48.3. Creating the Component with a Page Tag ............................................ 357
6.48.4. Creating the Component Dynamically Using Java ................................. 358
6.48.5. Details of Usage ................................................................................. 358
6.48.6. Look-and-Feel Customization .............................................................. 361
6.48.7. Skin Parameters Redefinition .............................................................. 361
6.48.8. Definition of Custom Style Classes ...................................................... 362
6.48.9. Relevant Resources Links ................................................................... 365
6.49. < rich:extendedDataTable > .......................................................................... 365
6.49.1. Description ......................................................................................... 365
6.49.2. Key Features ...................................................................................... 365
6.49.3. Creating the Component with a Page Tag ............................................ 370
6.49.4. Creating the Component Dynamically from Java ................................... 370
6.49.5. Details of Usage ................................................................................. 371
6.49.6. Look-and-Feel Customization .............................................................. 375
6.49.7. Skin Parameters Redefinition .............................................................. 375
6.49.8. Definition of Custom Style Classes ...................................................... 376
6.50. < rich:menuGroup > ..................................................................................... 377
6.50.1. Description ......................................................................................... 377
6.50.2. Key Features ...................................................................................... 377
6.50.3. Creating the Component with a Page Tag ............................................ 379
6.50.4. Creating the Component Dynamically Using Java ................................. 379
6.50.5. Details of Usage ................................................................................. 380
6.50.6. Look-and-Feel Customization .............................................................. 381
6.50.7. Skin Parameters Redefinition .............................................................. 381
6.50.8. Definition of Custom Style Classes ...................................................... 382
6.50.9. Relevant Resources Links ................................................................... 384
6.51. < rich:menuItem > ........................................................................................ 384
6.51.1. Description ......................................................................................... 384
6.51.2. Key Features ...................................................................................... 384
6.51.3. Creating the Component with a Page Tag ............................................ 388
6.51.4. Creating the Component Dynamically Using Java ................................. 388

xii
6.51.5. Details of Usage ................................................................................. 388
6.51.6. Look-and-Feel Customization .............................................................. 390
6.51.7. Skin Parameters Redefinition .............................................................. 390
6.51.8. Definition of Custom Style Classes ..................................................... 391
6.51.9. Relevant Resources Links ................................................................... 393
6.52. < rich:menuSeparator > ................................................................................ 393
6.52.1. Description ......................................................................................... 393
6.52.2. Creating the Component with a Page Tag ............................................ 394
6.52.3. Creating the Component Dynamically Using Java ................................. 394
6.52.4. Look-and-Feel Customization .............................................................. 394
6.52.5. Skin Parameters Redefinition .............................................................. 395
6.52.6. Definition of Custom Style Classes ...................................................... 395
6.52.7. Relevant Resources Links ................................................................... 396
6.53. < rich:effect > .............................................................................................. 396
6.53.1. Description ......................................................................................... 396
6.53.2. Key Features ...................................................................................... 396
6.53.3. Creating the Component with a Page Tag ............................................ 397
6.53.4. Creating the Component Dynamically Using Java ................................. 397
6.53.5. Details of Usage ................................................................................. 398
6.53.6. Look-and-Feel Customization .............................................................. 400
6.53.7. Relevant Resources Links ................................................................... 400
6.54. < rich:fileUpload > ........................................................................................ 400
6.54.1. Description ......................................................................................... 400
6.54.2. Key Features ...................................................................................... 400
6.54.3. Creating the Component with a Page Tag ............................................ 405
6.54.4. Creating the Component Dynamically Using Java ................................. 405
6.54.5. Details of Usage ................................................................................. 405
6.54.6. JavaScript API .................................................................................... 413
6.54.7. Look-and-Feel Customization .............................................................. 416
6.54.8. Skin Parameters Redefinition .............................................................. 416
6.54.9. Definition of Custom Style Classes ...................................................... 417
6.54.10. Relevant Resources Links ................................................................. 421
6.55. < rich:gmap > .............................................................................................. 421
6.55.1. Description ......................................................................................... 421
6.55.2. Key Features ...................................................................................... 421
6.55.3. Creating the Component with a Page Tag ............................................ 424
6.55.4. Creating the Component Dynamically Using Java ................................. 424
6.55.5. Details of Usage ................................................................................. 424
6.55.6. Look-and-Feel Customization .............................................................. 427
6.55.7. Definition of Custom Style Classes ...................................................... 427
6.55.8. Relevant Resources Links ................................................................... 429
6.56. < rich:virtualEarth > ...................................................................................... 430
6.56.1. Description ......................................................................................... 430
6.56.2. Key Features ...................................................................................... 430

xiii
RichFaces Developer Guide

6.56.3. Creating the Component with a Page Tag ............................................ 432


6.56.4. Creating the Component Dynamically Using Java ................................. 432
6.56.5. Details of Usage ................................................................................. 432
6.56.6. Look-and-Feel Customization .............................................................. 434
6.56.7. Definition of Custom Style Classes ...................................................... 434
6.56.8. Relevant Resources Links ................................................................... 434
6.57. < rich:hotKey > ............................................................................................ 434
6.57.1. Description ......................................................................................... 434
6.57.2. Key Features ...................................................................................... 434
6.57.3. Creating the Component with a Page Tag ............................................ 436
6.57.4. Creating the Component Dynamically Using Java ................................. 436
6.57.5. Details of Usage ................................................................................. 436
6.57.6. JavaScript API .................................................................................... 438
6.57.7. Look-and-Feel Customization .............................................................. 438
6.57.8. Relevant Resources Links ................................................................... 438
6.58. < rich:inplaceInput > ..................................................................................... 438
6.58.1. Description ......................................................................................... 438
6.58.2. Key Features ...................................................................................... 439
6.58.3. Creating the Component with a Page Tag ............................................ 442
6.58.4. Creating the Component Dynamically Using Java ................................. 443
6.58.5. Details of Usage ................................................................................. 443
6.58.6. JavaScript API .................................................................................... 447
6.58.7. Look-and-Feel Customization .............................................................. 448
6.58.8. Skin Parameters Redefinition .............................................................. 448
6.58.9. Definition of Custom Style Classes ...................................................... 448
6.58.10. Relevant Resources Links ................................................................. 451
6.59. < rich:inplaceSelect > ................................................................................... 451
6.59.1. Description ......................................................................................... 451
6.59.2. Key Features ...................................................................................... 452
6.59.3. Creating the Component with a Page Tag ............................................ 456
6.59.4. Creating the Component Dynamically Using Java ................................. 456
6.59.5. Details of Usage ................................................................................. 456
6.59.6. JavaScript API .................................................................................... 461
6.59.7. Look-and-Feel Customization .............................................................. 461
6.59.8. Skin Parameters Redefinition .............................................................. 462
6.59.9. Definition of Custom Style Classes ...................................................... 462
6.59.10. Relevant Resources Links ................................................................. 465
6.60. < rich:inputNumberSlider > ........................................................................... 465
6.60.1. Description ......................................................................................... 465
6.60.2. Key Features ...................................................................................... 465
6.60.3. Creating the Component with a Page Tag ............................................ 470
6.60.4. Creating the Component Dynamically Using Java ................................. 470
6.60.5. Details of Usage ................................................................................. 470
6.60.6. Look-and-Feel Customization .............................................................. 471

xiv
6.60.7. Skin Parameters Redefinition .............................................................. 472
6.60.8. Definition of Custom Style Classes ...................................................... 472
6.60.9. Relevant Resources Links ................................................................... 474
6.61. < rich:inputNumberSpinner > ........................................................................ 474
6.61.1. Description ......................................................................................... 474
6.61.2. Key Features ...................................................................................... 475
6.61.3. Creating the Component with a Page Tag ............................................ 478
6.61.4. Creating the Component Dynamically Using Java ................................. 479
6.61.5. Details of Usage ................................................................................. 479
6.61.6. Look-and-Feel Customization .............................................................. 480
6.61.7. Skin Parameters Redefinition .............................................................. 480
6.61.8. Definition of Custom Style Classes ...................................................... 481
6.61.9. Relevant Resources Links ................................................................... 482
6.62. < rich:insert > .............................................................................................. 483
6.62.1. Description ......................................................................................... 483
6.62.2. Key Features ...................................................................................... 483
6.62.3. Creating the Component with a Page Tag ............................................ 484
6.62.4. Creating the Component Dynamically Using Java ................................. 484
6.62.5. Details of Usage ................................................................................. 484
6.62.6. Look-and-Feel Customization .............................................................. 485
6.62.7. Relevant Resources Links ................................................................... 485
6.63. < rich:jQuery > ............................................................................................. 485
6.63.1. Description ......................................................................................... 485
6.63.2. Key Features ...................................................................................... 485
6.63.3. Creating the Component with a Page Tag ............................................ 486
6.63.4. Creating the Component Dynamically Using Java ................................. 487
6.63.5. Details of Usage ................................................................................. 487
6.63.6. Look-and-Feel Customization .............................................................. 491
6.63.7. Relevant Resources Links ................................................................... 491
6.64. < rich:listShuttle > ........................................................................................ 491
6.64.1. Description ......................................................................................... 491
6.64.2. Key Features ...................................................................................... 491
6.64.3. Creating the Component with a Page Tag ............................................ 495
6.64.4. Creating the Component Dynamically Using Java ................................. 495
6.64.5. Details of Usage ................................................................................. 495
6.64.6. JavaScript API .................................................................................... 500
6.64.7. Look-and-Feel Customization .............................................................. 500
6.64.8. Skin Parameters Redefinition .............................................................. 501
6.64.9. Definition of Custom Style Classes ...................................................... 503
6.64.10. Relevant Resources Links ................................................................. 507
6.65. < rich:message > ......................................................................................... 507
6.65.1. Description ......................................................................................... 507
6.65.2. Key Features ...................................................................................... 507
6.65.3. Creating the Component with a Page Tag ............................................ 510

xv
RichFaces Developer Guide

6.65.4. Creating the Component Dynamically Using Java ................................. 510


6.65.5. Details of Usage ................................................................................. 510
6.65.6. Look-and-Feel Customization .............................................................. 511
6.65.7. Definition of Custom Style Classes ...................................................... 511
6.65.8. Relevant Resources Links ................................................................... 514
6.66. < rich:messages > ....................................................................................... 514
6.66.1. Description ......................................................................................... 514
6.66.2. Key Features ...................................................................................... 514
6.66.3. Creating the Component with a Page Tag ............................................ 517
6.66.4. Creating the Component Dynamically Using Java ................................. 517
6.66.5. Details of Usage ................................................................................. 517
6.66.6. Look-and-Feel Customization .............................................................. 518
6.66.7. Definition of Custom Style Classes ...................................................... 519
6.66.8. Relevant Resources Links ................................................................... 521
6.67. < rich:modalPanel > ..................................................................................... 521
6.67.1. Description ......................................................................................... 521
6.67.2. Key Features ...................................................................................... 522
6.67.3. Creating the Component with a Page Tag ............................................ 525
6.67.4. Creating the Component Dynamically Using Java ................................. 525
6.67.5. Details of Usage ................................................................................. 525
6.67.6. JavaScript API .................................................................................... 530
6.67.7. Look-and-Feel Customization .............................................................. 530
6.67.8. Skin Parameters Redefinition .............................................................. 531
6.67.9. Definition of Custom Style Classes ...................................................... 532
6.67.10. Relevant Resources Links ................................................................. 534
6.68. < rich:orderingList > ..................................................................................... 535
6.68.1. Description ......................................................................................... 535
6.68.2. Key Features ...................................................................................... 535
6.68.3. Creating the Component with a Page Tag ............................................ 538
6.68.4. Creating the Component Dynamically Using Java ................................. 538
6.68.5. Details of Usage ................................................................................. 539
6.68.6. JavaScript API .................................................................................... 542
6.68.7. Look-and-Feel Customization .............................................................. 543
6.68.8. Skin Parameters Redefinition .............................................................. 543
6.68.9. Definition of Custom Style Classes ...................................................... 546
6.68.10. Relevant Resources Links ................................................................. 549
6.69. < rich:paint2D > ........................................................................................... 549
6.69.1. Description ......................................................................................... 549
6.69.2. Key Features ...................................................................................... 550
6.69.3. Creating the Component with a Page Tag ............................................ 552
6.69.4. Creating the Component Dynamically Using Java ................................. 552
6.69.5. Details of Usage ................................................................................. 552
6.69.6. Look-and-Feel Customization .............................................................. 554
6.69.7. Relevant Resources Links ................................................................... 554

xvi
6.70. < rich:panel > .............................................................................................. 554
6.70.1. Description ......................................................................................... 554
6.70.2. Key Features ...................................................................................... 554
6.70.3. Creating the Component with a Page Tag ............................................ 555
6.70.4. Creating the Component Dynamically Using Java ................................. 556
6.70.5. Details of Usage ................................................................................. 556
6.70.6. Look-and-Feel Customization .............................................................. 558
6.70.7. Skin Parameters Redefinition .............................................................. 558
6.70.8. Definition of Custom Style Classes ...................................................... 559
6.70.9. Relevant Resources Links ................................................................... 561
6.71. < rich:panelBar > ......................................................................................... 561
6.71.1. Description ......................................................................................... 561
6.71.2. Key Features ...................................................................................... 561
6.71.3. Creating the Component with a Page Tag ............................................ 563
6.71.4. Creating the Component Dynamically Using Java ................................. 564
6.71.5. Details of Usage ................................................................................. 564
6.71.6. Look-and-Feel Customization .............................................................. 564
6.71.7. Skin Parameters Redefinition .............................................................. 564
6.71.8. Definition of Custom Style Classes ...................................................... 565
6.71.9. Relevant Resources Links ................................................................... 567
6.72. < rich:panelBarItem > ................................................................................... 567
6.72.1. Description ......................................................................................... 567
6.72.2. Key Features ...................................................................................... 567
6.72.3. Creating the Component with a Page Tag ............................................ 568
6.72.4. Creating the Component Dynamically Using Java ................................. 569
6.72.5. Details of Usage ................................................................................. 569
6.72.6. Look-and-Feel Customization .............................................................. 570
6.72.7. Skin Parameters Redefinition .............................................................. 570
6.72.8. Definition of Custom Style Classes ...................................................... 570
6.73. < rich:panelMenu > ...................................................................................... 573
6.73.1. Description ......................................................................................... 573
6.73.2. Key Features ...................................................................................... 573
6.73.3. Creating the Component with a Page Tag ............................................ 579
6.73.4. Creating the Component Dynamically Using Java ................................. 579
6.73.5. Details of Usage ................................................................................. 580
6.73.6. JavaScript API .................................................................................... 582
6.73.7. Look-and-Feel Customization .............................................................. 583
6.73.8. Definition of Custom Style Classes ...................................................... 583
6.73.9. Relevant Resources Links ................................................................... 585
6.74. < rich:panelMenuGroup > ............................................................................. 585
6.74.1. Description ......................................................................................... 585
6.74.2. Key Features ...................................................................................... 585
6.74.3. Creating the Component with a Page Tag ............................................ 591
6.74.4. Creating the Component Dynamically Using Java ................................. 591

xvii
RichFaces Developer Guide

6.74.5. Details of Usage ................................................................................. 592


6.74.6. JavaScript API .................................................................................... 594
6.74.7. Look-and-Feel Customization .............................................................. 594
6.74.8. Skin Parameters Redefinition .............................................................. 594
6.74.9. Definition of Custom Style Classes ...................................................... 595
6.74.10. Relevant resources links ................................................................... 597
6.75. < rich:panelMenuItem > ................................................................................ 598
6.75.1. Description ......................................................................................... 598
6.75.2. Key Features ...................................................................................... 598
6.75.3. Creating the Component with a Page Tag ............................................ 602
6.75.4. Creating the Component Dynamically Using Java ................................. 602
6.75.5. Details of Usage ................................................................................. 602
6.75.6. Look-and-Feel Customization .............................................................. 604
6.75.7. Skin Parameters Redefinition .............................................................. 605
6.75.8. Definition of Custom Style Classes ...................................................... 605
6.75.9. Relevant resources links ..................................................................... 608
6.76. < rich:pickList > ........................................................................................... 608
6.76.1. Description ......................................................................................... 608
6.76.2. Key Features ...................................................................................... 608
6.76.3. Creating the Component with a Page Tag ............................................ 611
6.76.4. Creating the Component Dynamically Using Java ................................. 611
6.76.5. Details of Usage ................................................................................. 612
6.76.6. Look-and-Feel Customization .............................................................. 614
6.76.7. Skin Parameters Redefinition .............................................................. 614
6.76.8. Definition of Custom Style Classes ...................................................... 616
6.76.9. Relevant Resources Links ................................................................... 620
6.77. < rich:progressBar > ..................................................................................... 620
6.77.1. Description ......................................................................................... 620
6.77.2. Key Features ...................................................................................... 620
6.77.3. Creating the Component with a Page Tag ............................................ 624
6.77.4. Creating the Component Dynamically Using Java ................................. 624
6.77.5. Details of Usage ................................................................................. 624
6.77.6. JavaScript API .................................................................................... 628
6.77.7. Look-and-Feel Customization .............................................................. 628
6.77.8. Skin Parameters Redefinition .............................................................. 628
6.77.9. Definition of Custom Style Classes ...................................................... 629
6.77.10. Relevant Resources Links ................................................................. 631
6.78. < rich:scrollableDataTable > ......................................................................... 631
6.78.1. Description ......................................................................................... 631
6.78.2. Key Features ...................................................................................... 632
6.78.3. Creating the Component with a Page Tag ............................................ 636
6.78.4. Creating the Component Dynamically Using Java ................................. 636
6.78.5. Details of Usage ................................................................................. 637
6.78.6. JavaScript API .................................................................................... 640

xviii
6.78.7. Look-and-Feel Customization .............................................................. 640
6.78.8. Skin Parameters Redefinition .............................................................. 641
6.78.9. Definition of Custom Style Classes ...................................................... 642
6.78.10. Relevant Resources Links ................................................................. 646
6.79. < rich:separator > ........................................................................................ 646
6.79.1. Description ......................................................................................... 646
6.79.2. Key Features ...................................................................................... 646
6.79.3. Creating the Component with a Page Tag ............................................ 647
6.79.4. Creating the Component Dynamically Using Java ................................. 648
6.79.5. Details of Usage ................................................................................. 648
6.79.6. Look-and-Feel Customization .............................................................. 649
6.79.7. Definition of Custom Style Classes ...................................................... 649
6.79.8. Relevant Resources Links ................................................................... 650
6.80. < rich:simpleTogglePanel > ........................................................................... 650
6.80.1. Description ......................................................................................... 650
6.80.2. Key Features ...................................................................................... 651
6.80.3. Creating the Component with a Page Tag ............................................ 654
6.80.4. Creating the Component Dynamically Using Java ................................. 655
6.80.5. Details of Usage ................................................................................. 655
6.80.6. Look-and-Feel Customization .............................................................. 656
6.80.7. Skin Parameters Redefinition .............................................................. 656
6.80.8. Definition of Custom Style Classes ...................................................... 657
6.80.9. Relevant Resources Links ................................................................... 659
6.81. < rich:spacer > ............................................................................................ 659
6.81.1. Description ......................................................................................... 659
6.81.2. Key Features ...................................................................................... 660
6.81.3. Creating the Component with a Page Tag ............................................ 661
6.81.4. Creating the Component Dynamically Using Java ................................. 661
6.81.5. Details of Usage ................................................................................. 662
6.81.6. Look-and-Feel Customization .............................................................. 662
6.81.7. Relevant Resources Links ................................................................... 662
6.82. < rich:suggestionbox > ................................................................................. 662
6.82.1. Description ......................................................................................... 662
6.82.2. Key Features ...................................................................................... 663
6.82.3. Creating the Component with a Page Tag ............................................ 669
6.82.4. Creating the Component Dynamically Using Java ................................. 670
6.82.5. Details of Usage ................................................................................. 670
6.82.6. JavaScript API .................................................................................... 673
6.82.7. Look-and-Feel Customization .............................................................. 674
6.82.8. Skin Parameters Redefinition .............................................................. 674
6.82.9. Definition of Custom Style Classes ...................................................... 675
6.82.10. Relevant Resources Links ................................................................. 677
6.83. < rich:tabPanel > ......................................................................................... 677
6.83.1. Description ......................................................................................... 677

xix
RichFaces Developer Guide

6.83.2. Key Features ...................................................................................... 677


6.83.3. Creating the Component with a Page Tag ............................................ 680
6.83.4. Creating the Component Dynamically Using Java ................................. 681
6.83.5. Details of Usage ................................................................................. 681
6.83.6. Look-and-Feel Customization .............................................................. 683
6.83.7. Skin Parameters Redefinition .............................................................. 683
6.83.8. Definition of Custom Style Classes ...................................................... 684
6.83.9. Relevant Resources Links ................................................................... 687
6.84. < rich:tab > .................................................................................................. 687
6.84.1. Description ......................................................................................... 687
6.84.2. Key Features ...................................................................................... 687
6.84.3. Creating the Component with a Page Tag ............................................ 691
6.84.4. Creating the Component Dynamically Using Java ................................. 692
6.84.5. Details of Usage ................................................................................. 692
6.84.6. Look-and-Feel Customization .............................................................. 695
6.84.7. Skin Parameters Redefinition .............................................................. 695
6.84.8. Definition of Custom Style Classes ...................................................... 696
6.85. < rich:togglePanel > ..................................................................................... 699
6.85.1. Description ......................................................................................... 699
6.85.2. Key Features ...................................................................................... 700
6.85.3. Creating the Component with a Page Tag ............................................ 702
6.85.4. Creating the Component Dynamically Using Java ................................. 703
6.85.5. Details of Usage ................................................................................. 703
6.85.6. Look-and-Feel Customization .............................................................. 704
6.85.7. Definition of Custom Style Classes ...................................................... 704
6.85.8. Relevant Resources Links ................................................................... 706
6.86. < rich:toggleControl > ................................................................................... 706
6.86.1. Description ......................................................................................... 706
6.86.2. Key Features ...................................................................................... 707
6.86.3. Creating the Component with a Page Tag ............................................ 711
6.86.4. Creating the Component Dynamically Using Java ................................. 711
6.86.5. Details of Usage ................................................................................. 711
6.86.6. Look-and-Feel Customization .............................................................. 712
6.86.7. Definition of Custom Style Classes ...................................................... 712
6.87. < rich:toolBar > ............................................................................................ 714
6.87.1. Description ......................................................................................... 714
6.87.2. Key Features ...................................................................................... 714
6.87.3. Creating the Component with a Page Tag ............................................ 716
6.87.4. Creating the Component Dynamically Using Java ................................. 716
6.87.5. Details of Usage ................................................................................. 717
6.87.6. Look-and-Feel Customization .............................................................. 718
6.87.7. Skin Parameters Redefinition .............................................................. 718
6.87.8. Definition of Custom Style Classes ...................................................... 719
6.87.9. Relevant Resources Links ................................................................... 720

xx
6.88. < rich:toolBarGroup > ................................................................................... 720
6.88.1. Description ......................................................................................... 720
6.88.2. Key Features ...................................................................................... 720
6.88.3. ......................................................................................................... 722
6.88.4. Creating the Component with a Page Tag ............................................ 722
6.88.5. Creating the Component Dynamically Using Java ................................. 723
6.88.6. Details of Usage ................................................................................. 723
6.88.7. Look-and-Feel Customization .............................................................. 724
6.88.8. Definition of Custom Style Classes ...................................................... 724
6.88.9. Relevant resources links ..................................................................... 725
6.89. < rich:toolTip > ............................................................................................ 725
6.89.1. Description ......................................................................................... 725
6.89.2. Key Features ...................................................................................... 725
6.89.3. Creating the Component with a Page Tag ............................................ 728
6.89.4. Creating the Component Dynamically Using Java ................................. 729
6.89.5. Details of Usage ................................................................................. 729
6.89.6. JavaScript API .................................................................................... 732
6.89.7. Look-and-Feel Customization .............................................................. 732
6.89.8. Skin Parameters Redefinition .............................................................. 732
6.89.9. Definition of Custom Style Classes ...................................................... 733
6.89.10. Relevant Resources Links ................................................................. 734
6.90. < rich:tree > ................................................................................................. 734
6.90.1. Description ......................................................................................... 734
6.90.2. Key Features ...................................................................................... 735
6.90.3. Creating the Component with a Page Tag ............................................ 741
6.90.4. Creating the Component Dynamically Using Java ................................. 741
6.90.5. Details of Usage ................................................................................. 742
6.90.6. Built-In Drag and Drop ........................................................................ 746
6.90.7. Events handling .................................................................................. 748
6.90.8. Look-and-Feel Customization .............................................................. 749
6.90.9. Skin Parameters Redefinition: ............................................................. 749
6.90.10. Definition of Custom Style Classes .................................................... 749
6.90.11. Relevant Resources Links ................................................................. 751
6.91. < rich:treeNode > ......................................................................................... 751
6.91.1. Description ......................................................................................... 751
6.91.2. Key Features ...................................................................................... 752
6.91.3. Creating the Component with a Page Tag ............................................ 756
6.91.4. Creating the Component Dynamically Using Java ................................. 756
6.91.5. Details of Usage ................................................................................. 757
6.91.6. Built-in Drag and Drop ........................................................................ 758
6.91.7. Events Handling ................................................................................. 758
6.91.8. Look-and-Feel Customization .............................................................. 758
6.91.9. Skin Parameters Redefinition .............................................................. 759
6.91.10. Definition of Custom Style Classes .................................................... 759

xxi
RichFaces Developer Guide

6.91.11. Relevant Resources Links ................................................................. 761


6.92. < rich:changeExpandListener > ..................................................................... 761
6.92.1. Description ......................................................................................... 761
6.92.2. Key Features ...................................................................................... 761
6.92.3. Creating the Component with a Page Tag ............................................ 762
6.92.4. Creating the Component Dynamically Using Java ................................. 762
6.92.5. Details of Usage ................................................................................. 762
6.92.6. Look-and-Feel Customization .............................................................. 763
6.93. < rich:nodeSelectListener > .......................................................................... 763
6.93.1. Description ......................................................................................... 763
6.93.2. Key Features ...................................................................................... 763
6.93.3. Creating the Component with a Page Tag ............................................ 764
6.93.4. Creating the Component Dynamically Using Java ................................. 764
6.93.5. Details of Usage ................................................................................. 764
6.93.6. Look-and-Feel Customization .............................................................. 765
6.94. < rich:recursiveTreeNodesAdaptor > .............................................................. 765
6.94.1. Description ......................................................................................... 765
6.94.2. Key Features ...................................................................................... 766
6.94.3. Creating the Component with a Page Tag ............................................ 766
6.94.4. Creating the Component Dynamically Using Java ................................. 767
6.94.5. Details of Usage ................................................................................. 767
6.94.6. Relevant resources links ..................................................................... 768
6.95. < rich:treeNodesAdaptor > ............................................................................ 768
6.95.1. Description ......................................................................................... 768
6.95.2. Key Features ...................................................................................... 769
6.95.3. Creating the Component with a Page Tag ............................................ 770
6.95.4. Creating the Component Dynamically Using Java ................................. 770
6.95.5. Details of Usage ................................................................................. 770
6.95.6. Relevant Resources Links ................................................................... 771
7. IDE Support ............................................................................................................. 773
8. Links to information resources ................................................................................ 775

xxii
Chapter 1.

Introduction
RichFaces is an open source framework that adds Ajax capability into existing JSF applications
without resorting to JavaScript.

RichFaces leverages JavaServer Faces framework including lifecycle, validation, conversion


facilities and management of static and dynamic resources. RichFaces components with built-
in Ajax support and a highly customizable look-and-feel can be easily incorporated into JSF
applications.

RichFaces allows to:

• Intensify the whole set of JSF benefits while working with Ajax. RichFaces is fully integrated into
the JSF lifecycle. While other frameworks only give you access to the managed bean facility,
RichFaces advantages the action and value change listeners, as well as invokes server-side
validators and converters during the Ajax request-response cycle.

• Add Ajax capability to the existing JSF applications. Framework provides two components
libraries (Core Ajax and UI). The Core library sets Ajax functionality into existing pages, so
there is no need to write any JavaScript code or to replace existing components with new Ajax
ones. RichFaces enables page-wide Ajax support instead of the traditional component-wide
support and it gives the opportunity to define the event on the page. An event invokes an Ajax
request and areas of the page which become synchronized with the JSF Component Tree after
changing the data on the server by Ajax request in accordance with events fired on the client.

• Create quickly complex View basing on out of the box components. RichFaces UI library
contains components for adding rich user interface features to JSF applications. It extends
the RichFaces framework to include a large (and growing) set of powerful rich Ajax-enabled
components that come with extensive skins support. In addition, RichFaces components are
designed to be used seamlessly with other 3d-party component libraries on the same page, so
you have more options for developing your applications.

• Write your own custom rich components with built-in Ajax support. We're always working on
improvement of Component Development Kit (CDK) that was used for RichFaces UI library
creation. The CDK includes a code-generation facility and a templating facility using a JSP-
like syntax. These capabilities help to avoid a routine process of a component creation.
The component factory works like a well-oiled machine allowing the creation of first-class
rich components with built-in Ajax functionality even more easily than the creation of simpler
components by means of the traditional coding approach.

• Package resources with application Java classes. In addition to its core, Ajax functionality of
RichFaces provides an advanced support for the different resources management: pictures,
JavaScript code, and CSS stylesheets. The resource framework makes possible to pack easily
these resources into Jar files along with the code of your custom components.

1
Chapter 1. Introduction

• Easily generate binary resources on-the-fly. Resource framework can generate images,
sounds, Excel spreadsheets etc.. on-the-fly so that it becomes for example possible to create
images using the familiar approach of the "Java Graphics2D" library.

• Create a modern rich user interface look-and-feel with skins-based technology. RichFaces
provides a skinnability feature that allows easily define and manage different color schemes
and other parameters of the UI with the help of named skin parameters. Hence, it is possible
to access the skin parameters from JSP code and the Java code (e.g. to adjust generated on-
the-fly images based on the text parts of the UI). RichFaces comes with a number of predefined
skins to get you started, but you can also easily create your own custom skins.

• Test and create the components, actions, listeners, and pages at the same time. An automated
testing facility is in our roadmap for the near future. This facility will generate test cases for your
component as soon as you develop it. The testing framework will not just test the components,
but also any other server-side or client-side functionality including JavaScript code. What is
more, it will do all of this without deploying the test application into the Servlet container.

RichFaces UI components come ready to use out-of-the-box, so developers save their time and
immediately gain the advantage of the mentioned above features in Web applications creation.
As a result, usage experience can be faster and easily obtained.

2
Chapter 2.

Technical Requirements
RichFaces was developed with an open architecture to be compatible with the widest possible
variety of environments.

This is what you need to start working with RichFaces 3.2.1:

• Java

• JavaServer Faces

• Java application server or servlet container

• Browser (on client side)

• RichFaces framework

2.1. Supported Java Versions

• JDK 1.5 and higher

2.2. Supported JavaServer Faces Implementations and


Frameworks

• Sun JSF-RI - 1.2

• MyFaces 1.2

• Facelets 1.1.1 - 1.2

• Seam 1.2. - 2.0

2.3. Supported Servers

• Apache Tomcat 5.5 - 6.0

• BEA WebLogic 9.1 - 10.0

• Resin 3.1

• Jetty 6.1.x

• Sun Application Server 9 (J2EE 1.5)

• Glassfish (J2EE 5)

3
Chapter 2. Technical Requirements

• JBoss 4.2.x - 5

2.4. Supported Browsers

• Internet Explorer 6.0 - 7.0

• Firefox 1.5 - 2.0

• Opera 8.5 - 9.2

• Safari 2.0-3.1

Note:

Safari 3.0 Beta is not supported.

This list is composed basing on reports received from our users. We assume the list can be
incomplete and absence of your environment in the list doesn't mean incompatibility.

We appreciate your feedback on platforms and browsers that aren't in the list but are compatible
with RichFaces. It helps us to keep the list up-to-date.

4
Chapter 3.

Getting Started with RichFaces


3.1. Downloading RichFaces 3.2.1
The latest release of RichFaces is available for download at:

http://labs.jboss.com/jbossrichfaces/downloads
in the RichFaces project area under JBoss.

3.2. Installation

• Unzip "richfaces-ui-3.2.1.GA-bin.zip" file to the chosen folder.

• Copy "richfaces-api-3.2.1.jar", "richfaces-impl-3.2.1.jar","richfaces-ui-


3.2.1.jar"files into the "WEB-INF/lib" folder of your application.

• Add the following content into the "WEB-INF/web.xml" file of your application:

...
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>richfaces</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>

• Add the following lines for each JSP page of your application.

<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>


<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

For XHTML pages:

5
Chapter 3. Getting Started wi...

<xmlns:a4j="http://richfaces.org/a4j">
<xmlns:rich="http://richfaces.org/rich">

3.3. Simple Ajax Echo Project


In our JSF project you need only one JSP page that has a form with a couple of child tags:
<h:inputText> and <h:outputText> .

This simple application let you input some text into the <h:inputText> , send data to the server,
and see the server response as a value of <h:outputText> .

3.3.1. JSP Page


Here is the necessary page (echo.jsp):

<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>


<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<html>
<head>
<title>repeater </title>
</head>
<body>
<f:view>
<h:form>
<rich:panel header="Simple Echo">
<h:inputText size="50" value="#{bean.text}" >
<a4j:support event="onkeyup" reRender="rep"/>
</h:inputText>
<h:outputText value="#{bean.text}" id="rep"/>
</rich:panel>
</h:form>
</f:view>
</body>
</html>

Only two tags distinguish this page from a "regular" JSF one. There are <rich:panel> and
<a4j:support> .

The <rich:panel> allows to place the page elements in rectangle panel that can be skinned.

6
Data Bean

The <a4j:support> with corresponding attributes (as it was shown in the previous example) adds
an Ajax support to the parent <h:inputText> tag. This support is bound to "onkeyup" JavaScript
event, so that each time when this event is fired on the parent tag, our application sends an Ajax
request to the server. It means that the text field pointed to our managed bean property contains
up-to-date value of our input.

The value of "reRender" attribute of the <a4j:support> tag defines which part(s) of our page is
(are) to be updated. In this case, the only part of the page to update is the <h:outputText> tag
because its ID value matches to the value of "reRender" attribute. As you see, it's not difficult to
update multiple elements on the page, only list their IDs as the value of "reRender" .

3.3.2. Data Bean

In order to build this application, you should create a managed bean:

package demo;

public class Bean {


private String text;
public Bean() {
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
}

3.3.3. faces-config.xml

Next, it's necessary to register your bean inside of the faces-config.xml file:

<?xml version="1.0" encoding="UTF-8"?>


<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config
1.1//EN"
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
<managed-bean>
<managed-bean-name>bean</managed-bean-name>
<managed-bean-class>demo.Bean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>

7
Chapter 3. Getting Started wi...

<property-name>text</property-name>
<value/>
</managed-property>
</managed-bean>
</faces-config>

Note:

Nothing that relates directly to RichFaces is required in the configuration file.

3.3.4. Web.xml

It is also necessary to add jar files (see installation chapter) and modify the "web.xml" file:

<?xml version="1.0"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-
app_2_4.xsd">
<display-name>a4jEchoText</display-name>
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>richfaces</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>

8
Deployment

</listener>

<!-- Faces Servlet -->


<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<!-- Faces Servlet Mapping -->


<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
</web-app>

Now your application should work.

3.3.5. Deployment
Finally, you should be able to place this application on your Web server.To start your project, point
your browser at http://localhost:8080/a4jEchoText/echo.jsf

9
10
Chapter 4.

Settings for different environments


RichFaces comes with support for all tags (components) included in the JavaServer Faces
specification. To add RichFaces capabilities to the existing JSF project you should just put the
RichFaces libraries into the lib folder of the project and add filter mapping. The behavior of the
existing project doesn't change just because of RichFaces.

4.1. Web Application Descriptor Parameters


RichFaces doesn't require any parameters to be defined in your web.xml. But the RichFaces
parameters listed below may help with development and may increase the flexibility of RichFaces
usage.

Table 4.1. Initialization Parameters

Name Default Description


org.richfaces.SKIN DEFAULT Is a name of a skin
used in an application.
It can be a literal
string with a skin
name, or the EL
expression (#{...}) pointed
to a String property
(skin name) or a
property of a
org.richfaces.framework.skin
type. Skin in last case, this
instance is used as a current
skin
org.richfaces.LoadScriptStrategyDEFAULT Defines how the RichFaces
script files are loaded to
application. Possible values
are: ALL, DEFAULT, NONE.
For more information see
"Scripts and Styles Load
Strategy".
org.richfaces.LoadStyleStrategyDEFAULT Defines how the RichFaces
style files are loaded to
application. Possible values
are: ALL, DEFAULT, NONE.
For more information see
"Scripts and Styles Load
Strategy".

11
Chapter 4. Settings for diffe...

Name Default Description


org.ajax4jsf.LOGFILE none Is an URL to an application or
a container log file (if possible).
If this parameter is set, content
from the given URL is shown
on a Debug error page in the
iframe window
org.ajax4jsf.VIEW_HANDLERS none Is a comma-separated list
of custom ViewHandler
instances for inserting
in chain. Handlers are
inserted BEFORE RichFaces
viewhandlers in the given
order. For example, in facelets
application this parameter
must contain
com.sun.facelets.FaceletViewHandler,
instead of declaration in faces-
config.xml
org.ajax4jsf.CONTROL_COMPONENTS
none Is a comma-separated list of
names for a component as
a special control case, such
as messages bundle loader,
alias bean components, etc.
Is a type of component got
by a reflection from the static
field COMPONENT_TYPE .
For components with such
types encode methods always
are called in rendering
Ajax responses, even if a
component isn't in an updated
part
org.ajax4jsf.ENCRYPT_RESOURCE_DATA
false For generated resources, such
as encrypt generation data,
it's encoded in the resource
URL. For example, URL for
an image generated from
the mediaOutput component
contains a name of a
generation method, since for
a hacker attack, it is possible
to create a request for any

12
Web Application Descriptor Parameters

Name Default Description


JSF baked beans or other
attributes. To prevent such
attacks, set this parameter to
"true" in critical applications
(works with JRE > 1.4 )
org.ajax4jsf.ENCRYPT_PASSWORD
random Is a password for encryption of
resources data. If isn't set, a
random password is used
org.ajax4jsf.COMPRESS_SCRIPT
true It doesn't allow framework
to reformat JavaScript files
(makes it impossible to debug)
org.ajax4jsf.RESOURCE_URI_PREFIX
a4j Defines prefix which is added
to all URIs of generated
resources. This prefix
designed to handle RichFaces
generated resources requests
org.ajax4jsf.GLOBAL_RESOURCE_URI_PREFIX
a4j/g Defines prefix which is added
to URIs of global resources.
This prefix designed to
handle RichFaces generated
resources requests
org.ajax4jsf.SESSION_RESOURCE_URI_PREFIX
a4j/s Defines prefix which is
used for session tracking
for generated resources.
This prefix designed to
handle RichFaces generated
resources requests
org.ajax4jsf.DEFAULT_EXPIRE86400 Defines in seconds how long
streamed back to browser
resources can be cached
org.ajax4jsf.SERIALIZE_SERVER_STATE
false If enabled the component
state (not the tree)
will be serialized before
being stored in the
session. This may be
desirable for applications
that may have issues
with view state being
sensitive to model changes.
Instead of this parameter
can use

13
Chapter 4. Settings for diffe...

Name Default Description


com.sun.faces.serializeServerState
and
org.apache.myfaces.SERIALIZE_STATE_IN_SESS
parameters for corresponding
environments.

Note:

org.richfaces.SKIN is used in the same way as org.ajax4jsf.SKIN

Table 4.2. org.ajax4jsf.Filter Initialization Parameters

Name Default Description


log4j-init-file - Is a path (relative to web
application context) to the
log4j.xml configuration file, it
can be used to setup per-
application custom logging
enable-cache true Enable caching of framework-
generated resources
(JavaScript, CSS, images,
etc.). For debug purposes
development custom
JavaScript or Style prevents
to use old cached data in a
browser
forceparser true Force parsing by a filter
HTML syntax checker on
any JSF page. If "false", only
Ajax responses are parsed to
syntax check and conversion
to well-formed XML. Setting to
"false" improves performance,
but can provide visual effects
on Ajax updates

4.2. Sun JSF RI


RichFaces works with implementation of JSF (JSF 1.2) and with most JSF component libraries
without any additional settings. For more information look at:

java.sun.com [http://java.sun.com/javaee/javaserverfaces/]

14
Apache MyFaces

Additional information how to get ViewExpiredExceptions when using RichFaces with JSF 1.2
you can find here [http://wiki.jboss.org/auth/wiki//RichFacesCookbook/ViewExpiredException].

4.3. Apache MyFaces


RichFaces works with Apache MyFaces 1.2 version including specific libraries like TOMAHAWK
Sandbox and Trinidad (the previous ADF Faces). However, there are some considerations to take
into account for configuring applications to work with MyFaces and RichFaces.

There are some problems with different filters defined in the web.xml file clashing. To avoid these
problems, the RichFaces filter must be the first one among other filters in the web.xml configuration
file.

For more information look at: http://myfaces.apache.org [http://myfaces.apache.org]

There's one more problem while using MyFaces + Seam . If you use this combination you should
use <a4j:page> inside <f:view> (right after it in your code) wrapping another content inside
your pages because of some problems in realization of <f:view> in myFaces.

The problem is to be overcome in the nearest future.

4.4. Facelets Support


A high-level support for Facelets is one of our main support features. When working with
RichFaces, there is no difference what release of Facelets is used.

You should also take into account that some JSF frameworks such as Facelets use their
own ViewHandler and need to have it first in the chain of ViewHandlers and the RichFaces
AjaxViewHandler is not an exception. At first RichFaces installs its ViewHandler in any case, so in
case of two frameworks, for example RichFaces + Facelets, no changes in settings are required.
Although, when more then one framework (except RichFaces) is used, it's possible to use the
VIEW_HANDLERS parameter defining these frameworks view handlers according to its usage order
in it. For example, the declaration:

Example:

<context-param>
<param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
<param-value>com.sun.facelets.FaceletViewHandler</param-value>
</context-param>

says that Facelets will officially be the first, however AjaxViewHandler will be a little ahead
temporarily to do some small, but very important job.

15
Chapter 4. Settings for diffe...

Note:

In this case you don't have to define FaceletViewHandler in the WEB-INF/faces-


config.xml.

4.5. JBoss Seam Support


RichFaces now works out-of-the-box with JBoss Seam and Facelets running inside JBoss AS
4.0.4 and higher. There is no more shared JAR files needed. You just have to package the
RichFaces library with your application.

Your web.xml for Seam 1.2 must be like this:

<?xml version="1.0" ?>


<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-
app_2_4.xsd"
version="2.4">

<!-- richfaces -->

<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>

<filter-mapping>
<filter-name>richfaces</filter-name>
<url-pattern>*.seam</url-pattern>
</filter-mapping>

<context-param>
<param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
<param-value>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</param-value>
</context-param>

<!-- Seam -->

<listener>
<listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
</listener>

16
JBoss Seam Support

<servlet>
<servlet-name>Seam Resource Servlet</servlet-name>
<servlet-class>org.jboss.seam.servlet.ResourceServlet</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>Seam Resource Servlet</servlet-name>
<url-pattern>/seam/resource/*</url-pattern>
</servlet-mapping>

<filter>
<filter-name>Seam Filter</filter-name>
<filter-class>org.jboss.seam.web.SeamFilter</filter-class>
</filter>

<filter-mapping>
<filter-name>Seam Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<!-- MyFaces -->

<listener>
<listener-class>org.apache.myfaces.webapp.StartupSer