Richfaces Reference

884
RichFaces Developer Guide RichFaces framework with a huge library of rich components and skinnability support

Transcript of Richfaces Reference

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 the RichFaces ................................................................................ 5 3.2. Simple JSF application with RichFaces ................................................................ 5 3.2.1. Adding RichFaces libraries into the project ................................................ 5 3.2.2. Registering RichFaces in web.xml ............................................................. 6 3.2.3. Managed bean ......................................................................................... 8 3.2.4. Registering bean in faces-cofig.xml ........................................................... 8 3.2.5. RichFaces Greeter index.jsp ..................................................................... 9 3.3. Integration of RichFaces into Maven Project ....................................................... 10 3.4. Relevant Resources Links ................................................................................. 16 4. Settings for different environments ........................................................................... 17 4.1. Web Application Descriptor Parameters .............................................................. 4.2. Sun JSF RI ...................................................................................................... 4.3. Apache MyFaces .............................................................................................. 4.4. Facelets Support ............................................................................................... 4.5. JBoss Seam Support ........................................................................................ 4.6. Portlet Support .................................................................................................. 4.7. Sybase EAServer .............................................................................................. 4.8. Oracle AS/OC4J ............................................................................................... 5. Basic concepts of the RichFaces Framework ............................................................ 5.1. Introduction ....................................................................................................... 5.2. RichFaces Architecture Overview ....................................................................... 5.3. RichFaces Integral Parts ................................................................................... 5.4. Limitations and Rules ........................................................................................ 5.5. Ajax Request Optimization ................................................................................ 5.5.1. Re-Rendering ......................................................................................... 5.5.2. Queue and Traffic Flood Protection ......................................................... 5.5.3. Queue Principles .................................................................................... 5.5.4. Data Processing Options ........................................................................ 5.5.5. Action and Navigation ............................................................................ 5.5.6. JavaScript Interactions ............................................................................ 5.5.7. Iteration components Ajax attributes ........................................................ 5.5.8. Other useful attributes ............................................................................ 5.6. How To... ......................................................................................................... 5.6.1. Send an Ajax request ............................................................................. 5.6.2. Decide What to Send ............................................................................. 5.6.3. Decide What to Change ......................................................................... 5.6.4. Decide what to process .......................................................................... 17 20 21 21 22 25 25 26 27 27 28 31 32 32 32 35 36 41 42 42 44 44 45 45 46 46 46

iii

RichFaces Developer Guide

5.7. Filter Configuration ............................................................................................ 5.8. Scripts and Styles Load Strategy ....................................................................... 5.9. Request Errors and Session Expiration Handling ................................................ 5.9.1. Request Errors Handling ......................................................................... 5.9.2. Session Expired Handling ....................................................................... 5.10. Skinnability ..................................................................................................... 5.10.1. Why Skinnability ................................................................................... 5.10.2. Using Skinnability ................................................................................. 5.10.3. Example .............................................................................................. 5.10.4. Skin Parameters Tables in RichFaces ................................................... 5.10.5. Creating and Using Your Own Skin File ................................................. 5.10.6. Built-in Skinnability in RichFaces ........................................................... 5.10.7. Changing skin in runtime ...................................................................... 5.10.8. Standard Controls Skinning ................................................................... 5.10.9. Client-side Script for Extended Skinning Support .................................... 5.10.10. XCSS File Format .............................................................................. 5.10.11. Plug-n-Skin ........................................................................................ 5.11. State Manager API .......................................................................................... 5.12. Identifying User Roles ..................................................................................... 6. The RichFaces Components ...................................................................................... 6.1. < a4j:ajaxListener > ......................................................................................... 6.1.1. Description ............................................................................................. 6.1.2. Creating on a page ................................................................................ 6.1.3. Creating the Component Dynamically Using Java ..................................... 6.1.4. Key attributes and ways of usage ........................................................... 6.1.5. Relevant resources links ......................................................................... 6.2. < a4j:keepAlive > ............................................................................................. 6.2.1. Description ............................................................................................. 6.2.2. Using the tag on a Page ........................................................................ 6.2.3. Key attributes and ways of usage ........................................................... 6.2.4. Relevant resources links ......................................................................... 6.3. < a4j:outputPanel > ......................................................................................... 6.3.1. Description ............................................................................................. 6.3.2. Creating on a page ................................................................................ 6.3.3. Creating the Component Dynamically Using Java ..................................... 6.3.4. Key attributes and ways of usage ........................................................... 6.3.5. Relevant resources links ......................................................................... 6.4. < a4j:repeat > .................................................................................................. 6.4.1. Description ............................................................................................. 6.4.2. Creating on a page ................................................................................ 6.4.3. Creating the Component Dynamically Using Java ..................................... 6.4.4. Key attributes and ways of usage ........................................................... 6.4.5. Relevant resources links ......................................................................... 6.5. < a4j:log > ......................................................................................................

47 49 51 51 51 52 52 53 53 55 56 57 58 60 69 71 72 79 83 85 85 85 85 85 86 87 87 87 87 88 88 89 89 91 91 91 93 94 94 95 95 95 96 96

iv

6.5.1. Description ............................................................................................. 96 6.5.2. Creating the Component with a Page Tag ............................................... 98 6.5.3. Creating the Component Dynamically Using Java ..................................... 98 6.5.4. Key attributes and ways of usage ........................................................... 98 6.5.5. Relevant resources links ......................................................................... 99 6.6. < a4j:include > ................................................................................................ 99 6.6.1. Description ............................................................................................. 99 6.6.2. Creating on a page .............................................................................. 101 6.6.3. Creating the Component Dynamically Using Java ................................... 101 6.6.4. Relevant resources links ....................................................................... 102 6.7. < a4j:region > ................................................................................................ 102 6.7.1. Description ........................................................................................... 102 6.7.2. Creating on a page .............................................................................. 103 6.7.3. Creating the Component Dynamically Using Java ................................... 103 6.7.4. Key attributes and ways of usage .......................................................... 103 6.7.5. Relevant resources links ....................................................................... 106 6.8. < a4j:status > ................................................................................................ 106 6.8.1. Description ........................................................................................... 6.8.2. Creating on a page .............................................................................. 6.8.3. Creating the Component Dynamically Using Java ................................... 6.8.4. Facets ................................................................................................. 6.8.5. Key attributes and ways of usage .......................................................... 6.8.6. Relevant resources links ....................................................................... 6.9. < a4j:queue > ................................................................................................ 6.9.1. Description ........................................................................................... 6.9.2. Creating on a page .............................................................................. 6.9.3. Creating the Component Dynamically Using Java ................................... 6.9.4. Key attributes and ways of usage .......................................................... 6.9.5. JavaScript API ..................................................................................... 6.9.6. Relevant resources links ....................................................................... 6.10. < a4j:jsFunction > ........................................................................................ 6.10.1. Description ......................................................................................... 6.10.2. Creating on a page ............................................................................. 6.10.3. Creating the Component Dynamically Using Java ................................. 6.10.4. Key attributes and ways of usage ........................................................ 6.10.5. Relevant resources links ..................................................................... 6.11. < a4j:portlet > .............................................................................................. 6.11.1. Description ......................................................................................... 6.11.2. Creating the Component with a Page Tag ............................................ 6.11.3. Creating the Component Dynamically Using Java ................................. 6.11.4. Key attributes and ways of usage ........................................................ 6.11.5. Relevant resources links ..................................................................... 6.12. < a4j:commandLink > ................................................................................... 6.12.1. Description ......................................................................................... 106 108 108 109 109 110 110 110 112 112 112 115 115 115 115 118 119 119 120 120 120 120 121 121 121 121 121

v

RichFaces Developer Guide

6.12.2. Creating on a page ............................................................................. 6.12.3. Creating the Component Dynamically Using Java ................................. 6.12.4. Key attributes and ways of usage ........................................................ 6.12.5. Relevant resources links ..................................................................... 6.13. < a4j:mediaOutput > .................................................................................... 6.13.1. Description ......................................................................................... 6.13.2. Creating on a page ............................................................................. 6.13.3. Creating the Component Dynamically Using Java ................................. 6.13.4. Key attributes and ways of usage ........................................................ 6.13.5. Relevant resources links ..................................................................... 6.14. < a4j:loadStyle > .......................................................................................... 6.14.1. Description ......................................................................................... 6.14.2. Creating on a page ............................................................................. 6.14.3. Creating the Component Dynamically Using Java ................................. 6.14.4. Key attributes and ways of usage ........................................................ 6.14.5. Relevant resources links ..................................................................... 6.15. < a4j:form > ................................................................................................. 6.15.1. Description ......................................................................................... 6.15.2. Creating on a page ............................................................................. 6.15.3. Creating the Component Dynamically Using Java ................................. 6.15.4. Key attributes and ways of usage ........................................................ 6.15.5. Relevant resources links ..................................................................... 6.16. < a4j:htmlCommandLink > ............................................................................ 6.16.1. Description ......................................................................................... 6.16.2. Creating the Component with a Page Tag ............................................ 6.16.3. Creating the Component Dynamically Using Java ................................. 6.16.4. Key attributes and ways of usage ........................................................ 6.16.5. Relevant resources links ..................................................................... 6.17. < a4j:loadScript > ......................................................................................... 6.17.1. Description ......................................................................................... 6.17.2. Creating on a page ............................................................................. 6.17.3. Creating the Component Dynamically Using Java ................................. 6.17.4. Key attributes and ways of usage ........................................................ 6.17.5. Relevant resources links ..................................................................... 6.18. < a4j:poll > .................................................................................................. 6.18.1. Description ......................................................................................... 6.18.2. Creating on a page ............................................................................. 6.18.3. Creating the Component Dynamically Using Java ................................. 6.18.4. Key attributes and ways of usage ........................................................ 6.18.5. Relevant resources links ..................................................................... 6.19. < a4j:loadBundle > ....................................................................................... 6.19.1. Description ......................................................................................... 6.19.2. Creating on a page ............................................................................. 6.19.3. Creating the Component Dynamically Using Java .................................

126 126 127 127 128 128 132 132 133 134 134 134 135 135 135 135 135 135 139 139 139 140 140 140 143 144 144 144 145 145 145 145 146 146 146 146 148 149 149 150 151 151 151 152

vi

6.19.4. Key attributes and ways of usage ........................................................ 6.19.5. Relevant resources links ..................................................................... 6.20. < a4j:commandButton > ............................................................................... 6.20.1. Description ......................................................................................... 6.20.2. Creating on a page ............................................................................. 6.20.3. Creating the Component Dynamically Using Java ................................. 6.20.4. Key attributes and ways of usage ........................................................ 6.20.5. Relevant resources links ..................................................................... 6.21. < a4j:page > ................................................................................................ 6.21.1. Description ......................................................................................... 6.21.2. Creating on a page ............................................................................. 6.21.3. Creating the Component Dynamically Using Java ................................. 6.21.4. Facets ................................................................................................ 6.21.5. Key attributes and ways of usage ........................................................ 6.21.6. Relevant resources links ..................................................................... 6.22. < a4j:support > ............................................................................................ 6.22.1. Description ......................................................................................... 6.22.2. Creating on a page ............................................................................. 6.22.3. Creating the Component Dynamically Using Java ................................. 6.22.4. Key attributes and ways of usage ........................................................ 6.22.5. Relevant resources links ..................................................................... 6.23. < a4j:actionparam > ..................................................................................... 6.23.1. Description ......................................................................................... 6.23.2. Creating on a page ............................................................................. 6.23.3. Creating the Component Dynamically Using Java ................................. 6.23.4. Key attributes and ways of usage ........................................................ 6.23.5. Relevant resources links ..................................................................... 6.24. < a4j:push > ................................................................................................ 6.24.1. Description ......................................................................................... 6.24.2. Creating on a page ............................................................................. 6.24.3. Creating the Component Dynamically Using Java ................................. 6.24.4. Key attributes and ways of usage ........................................................ 6.24.5. Relevant resources links ..................................................................... 6.25. < rich:ajaxValidator > ................................................................................... 6.25.1. Description ......................................................................................... 6.25.2. Key Features ...................................................................................... 6.25.3. Creating the Component with a Page Tag ............................................ 6.25.4. Creating the Component Dynamically Using Java ................................. 6.25.5. Details of Usage ................................................................................. 6.25.6. Relevant Resources Links ................................................................... 6.26. < rich:graphValidator > ................................................................................. 6.26.1. Description ......................................................................................... 6.26.2. Key Features ...................................................................................... 6.26.3. Creating the Component with a Page Tag ............................................

152 152 152 152 157 157 157 159 159 159 160 160 161 161 162 162 162 165 165 165 168 168 168 169 170 170 170 171 171 173 173 174 175 175 175 176 178 178 178 181 181 181 181 182

vii

RichFaces Developer Guide

6.26.4. Creating the Component Dynamically Using Java ................................. 6.26.5. Relevant Resources Links ................................................................... 6.27. < rich:beanValidator > .................................................................................. 6.27.1. Description ......................................................................................... 6.27.2. Key Features ...................................................................................... 6.27.3. Creating the Component with a Page Tag ............................................ 6.27.4. Creating the Component Dynamically Using Java ................................. 6.27.5. Details of Usage ................................................................................. 6.27.6. Relevant Resources Links ................................................................... 6.28. < rich:calendar > .......................................................................................... 6.28.1. Description ......................................................................................... 6.28.2. Key Features ...................................................................................... 6.28.3. Creating the Component with a Page Tag ............................................ 6.28.4. Creating the Component Dynamically Using Java ................................. 6.28.5. Details of Usage ................................................................................. 6.28.6. JavaScript API .................................................................................... 6.28.7. Facets .............................................................................................. 6.28.8. Look-and-Feel Customization .............................................................. 6.28.9. Skin Parameters Redefinition .............................................................. 6.28.10. Definition of Custom Style Classes .................................................... 6.28.11. Relevant Resources Links ................................................................. 6.29. < rich:colorPicker > ...................................................................................... 6.29.1. Description ......................................................................................... 6.29.2. Key Features ...................................................................................... 6.29.3. Creating the Component with a Page Tag ............................................ 6.29.4. Creating the Component Dynamically Using Java ................................. 6.29.5. Details of Usage ................................................................................. 6.29.6. Look-and-Feel Customization .............................................................. 6.29.7. Skin Parameters Redefinition .............................................................. 6.29.8. Definition of Custom Style Classes ...................................................... 6.29.9. Relevant Resources Links ................................................................... 6.30. < rich:comboBox > ....................................................................................... 6.30.1. Description ......................................................................................... 6.30.2. Key Features ...................................................................................... 6.30.3. Creating the Component with a Page Tag ............................................ 6.30.4. Creating the Component Dynamically Using Java ................................. 6.30.5. Details of Usage ................................................................................. 6.30.6. JavaScript API .................................................................................... 6.30.7. Look-and-Feel Customization .............................................................. 6.30.8. Skin Parameters Redefinition .............................................................. 6.30.9. Definition of Custom Style Classes ...................................................... 6.30.10. Relevant Resources Links ................................................................. 6.31. < rich:componentControl > ............................................................................ 6.31.1. Description .........................................................................................

182 184 184 184 184 185 185 185 188 188 188 188 196 196 196 206 207 207 207 211 218 218 218 219 221 221 222 224 224 225 227 227 227 228 231 232 232 235 235 236 238 241 241 241

viii

6.31.2. Key Features ...................................................................................... 6.31.3. Creating the Component with a Page Tag ............................................ 6.31.4. Creating the Component Dynamically Using Java ................................. 6.31.5. Details of Usage ................................................................................. 6.31.6. Look-and-Feel Customization .............................................................. 6.31.7. Relevant Resources Links ................................................................... 6.32. < rich:contextMenu > .................................................................................... 6.32.1. Description ......................................................................................... 6.32.2. Key Features ...................................................................................... 6.32.3. Creating the Component with a Page Tag ............................................ 6.32.4. Creating the Component Dynamically Using Java ................................. 6.32.5. Details of Usage ................................................................................. 6.32.6. JavaScript API .................................................................................... 6.32.7. Look-and-Feel Customization .............................................................. 6.32.8. Skin Parameters Redefinition .............................................................. 6.32.9. Definition of Custom Style Classes ...................................................... 6.32.10. Relevant Resources Links ................................................................. 6.33. < rich:dataFilterSlider > ................................................................................ 6.33.1. Description ......................................................................................... 6.33.2. Key Features ...................................................................................... 6.33.3. Creating the Component with a Page Tag ............................................ 6.33.4. Creating the Component Dynamically Using Java ................................. 6.33.5. Details of Usage ................................................................................. 6.33.6. Look-and-Feel Customization .............................................................. 6.33.7. Relevant Resources Links ................................................................... 6.34. < rich:datascroller > ..................................................................................... 6.34.1. Description ......................................................................................... 6.34.2. Key Features ...................................................................................... 6.34.3. Creating the Component with a Page Tag ............................................ 6.34.4. Creating the Component Dynamically Using Java ................................. 6.34.5. Details of Usage ................................................................................. 6.34.6. Facets ................................................................................................ 6.34.7. Look-and-Feel Customization .............................................................. 6.34.8. Skin Parameters Redefinition .............................................................. 6.34.9. Definition of Custom Style Classes ...................................................... 6.34.10. Relevant Resources Links ................................................................. 6.35. < rich:columns > .......................................................................................... 6.35.1. Description ......................................................................................... 6.35.2. Key Features ...................................................................................... 6.35.3. Creating the Component with a Page Tag ............................................ 6.35.4. Creating the Component Dynamically Using Java ................................. 6.35.5. Details of Usage ................................................................................. 6.35.6. Facets ................................................................................................ 6.35.7. Look-and-Feel Customization ..............................................................

242 243 243 244 246 246 246 246 247 249 249 249 254 254 254 255 257 257 257 257 262 262 263 264 264 264 264 264 269 270 270 274 275 275 276 278 278 278 279 281 282 282 287 287

ix

RichFaces Developer Guide

6.35.8. Skin Parameters Redefinition .............................................................. 6.35.9. Definition of Custom Style Classes ...................................................... 6.35.10. Relevant Resources Links ................................................................. 6.36. < rich:dataTable > ........................................................................................ 6.36.1. Description ......................................................................................... 6.36.2. Key Features ...................................................................................... 6.36.3. Creating the Component with a Page Tag ............................................ 6.36.4. Creating the Component Dynamically from Java ................................... 6.36.5. Details of Usage ................................................................................. 6.36.6. Facets ................................................................................................ 6.36.7. Look-and-Feel Customization .............................................................. 6.36.8. Skin Parameters Redefinition .............................................................. 6.36.9. Definition of Custom Style Classes ...................................................... 6.36.10. Relevant Resources Links ................................................................. 6.37. < rich:subTable > ......................................................................................... 6.37.1. Description ......................................................................................... 6.37.2. Key Features ...................................................................................... 6.37.3. Creating the Component with a Page Tag ............................................ 6.37.4. Creating the Component Dynamically Using Java ................................. 6.37.5. Details of Usage ................................................................................. 6.37.6. Facets ................................................................................................ 6.37.7. Look-and-Feel Customization .............................................................. 6.37.8. Skin Parameters Redefinition .............................................................. 6.37.9. Definition of Custom Style Classes ...................................................... 6.38. < rich:dataList > ........................................................................................... 6.38.1. Description ......................................................................................... 6.38.2. Key Features ...................................................................................... 6.38.3. Creating the Component with a Page Tag ............................................ 6.38.4. Creating the Component Dynamically Using Java ................................. 6.38.5. Details of Usage ................................................................................. 6.38.6. Look-and-Feel Customization .............................................................. 6.38.7. Definition of Custom Style Classes ...................................................... 6.38.8. Relevant Resources Links ................................................................... 6.39. < rich:dataOrderedList > ............................................................................... 6.39.1. Description ......................................................................................... 6.39.2. Key Features ...................................................................................... 6.39.3. Creating the Component with a Page Tag ............................................ 6.39.4. Creating the Component Dynamically Using Java ................................. 6.39.5. Details of Usage ................................................................................. 6.39.6. Look-and-Feel Customization .............................................................. 6.39.7. Definition of Custom Style Classes ...................................................... 6.39.8. Relevant Resources Links ................................................................... 6.40. < rich:dataDefinitionList > ............................................................................. 6.40.1. Description .........................................................................................

287 288 289 289 289 290 295 295 296 298 298 298 299 302 303 303 303 306 306 307 307 308 308 308 311 311 311 313 313 314 315 316 318 318 318 318 320 320 321 322 322 325 325 325

x

6.40.2. Key Features ...................................................................................... 6.40.3. Creating the Component with a Page Tag ............................................ 6.40.4. Creating the Component Dynamically Using Java ................................. 6.40.5. Details of Usage ................................................................................. 6.40.6. Look-and-Feel Customization .............................................................. 6.40.7. Definition of Custom Style Classes ...................................................... 6.40.8. Relevant Resources Links ................................................................... 6.41. < rich:columnGroup > ................................................................................... 6.41.1. Description ......................................................................................... 6.41.2. Key Features ...................................................................................... 6.41.3. Creating the Component with a Page Tag ............................................ 6.41.4. Creating the Component Dynamically Using Java ................................. 6.41.5. Details of Usage ................................................................................. 6.41.6. Look-and-Feel Customization .............................................................. 6.41.7. Skin Parameters Redefinition .............................................................. 6.41.8. Definition of Custom Style Classes ...................................................... 6.41.9. Relevant Resources Links ................................................................... 6.42. < rich:column > ............................................................................................ 6.42.1. Description ......................................................................................... 6.42.2. Key Features ...................................................................................... 6.42.3. Creating the Component with a Page Tag ............................................ 6.42.4. Creating the Component Dynamically Using Java ................................. 6.42.5. Details of Usage ................................................................................. 6.42.6. Sorting and Filtering ........................................................................... 6.42.7. Facets ................................................................................................ 6.42.8. Look-and-Feel Customization .............................................................. 6.42.9. Skin Parameters Redefinition .............................................................. 6.42.10. Definition of Custom Style Classes .................................................... 6.42.11. Relevant Resources Links ................................................................. 6.43. < rich:dataGrid > .......................................................................................... 6.43.1. Description ......................................................................................... 6.43.2. Key Features ...................................................................................... 6.43.3. Creating the Component with a Page Tag ............................................ 6.43.4. Creating the Component Dynamically Using Java ................................. 6.43.5. Details of Usage ................................................................................. 6.43.6. Facets ................................................................................................ 6.43.7. Look-and-Feel Customization .............................................................. 6.43.8. Skin Parameters Redefinition .............................................................. 6.43.9. Definition of Custom Style Classes ...................................................... 6.43.10. Relevant Resources Links ................................................................. 6.44. < rich:editor > .............................................................................................. 6.44.1. Description ......................................................................................... 6.44.2. Key Features ...................................................................................... 6.44.3. Creating the Component with a Page Tag ............................................

326 328 328 328 330 330 332 333 333 333 335 335 335 338 338 338 340 340 340 341 343 344 344 347 353 353 354 354 355 355 355 356 360 361 361 363 363 363 363 365 365 365 366 368

xi

RichFaces Developer Guide

6.44.4. Creating the Component Dynamically Using Java ................................. 6.44.5. Details of Usage ................................................................................. 6.44.6. Look-and-Feel Customization .............................................................. 6.44.7. Skin Parameters Redefinition .............................................................. 6.44.8. Definition of Custom Style Selectors .................................................... 6.44.9. Relevant Resources Links ................................................................... 6.45. < rich:dropSupport > .................................................................................... 6.45.1. Description ......................................................................................... 6.45.2. Key Features ...................................................................................... 6.45.3. Creating the Component with a Page Tag ............................................ 6.45.4. Creating the Component Dynamically Using Java ................................. 6.45.5. Details of Usage ................................................................................. 6.45.6. Look-and-Feel Customization .............................................................. 6.45.7. Relevant Resources Links ................................................................... 6.46. < rich:dndParam > ....................................................................................... 6.46.1. Description ......................................................................................... 6.46.2. Creating the Component with a Page Tag ............................................ 6.46.3. Creating the Component Dynamically Using Java ................................. 6.46.4. Details of Usage ................................................................................. 6.46.5. Look-and-Feel Customization .............................................................. 6.46.6. Relevan Resources Links .................................................................... 6.47. < rich:dragIndicator > ................................................................................... 6.47.1. Description ......................................................................................... 6.47.2. Key Features ...................................................................................... 6.47.3. Creating the Component with a Page Tag ............................................ 6.47.4. Creating the Component Dynamically Using Java ................................. 6.47.5. Details of Usage ................................................................................. 6.47.6. Look-and-Feel Customization .............................................................. 6.47.7. Relevant Resources Links ................................................................... 6.48. < rich:dragSupport > .................................................................................... 6.48.1. Description ......................................................................................... 6.48.2. Key Features ...................................................................................... 6.48.3. Creating the Component with a Page Tag ............................................ 6.48.4. Creating the Component Dynamically Using Java ................................. 6.48.5. Details of Usage ................................................................................. 6.48.6. Look-and-Feel Customization .............................................................. 6.48.7. Relevant Resources Links ................................................................... 6.49. < rich:dropListener > .................................................................................... 6.49.1. Description ......................................................................................... 6.49.2. Key Features ...................................................................................... 6.49.3. Creating the Component with a Page Tag ............................................ 6.49.4. Creating the Component Dynamically Using Java ................................. 6.49.5. Details of Usage ................................................................................. 6.49.6. Look-and-Feel Customization ..............................................................

369 369 374 375 378 380 380 380 381 384 385 385 389 389 390 390 390 391 391 392 392 392 392 393 393 394 394 396 396 397 397 397 400 400 401 403 403 403 403 403 403 404 404 405

xii

6.50. < rich:dragListener > .................................................................................... 6.50.1. Description ......................................................................................... 6.50.2. Key Features ...................................................................................... 6.50.3. Creating the Component with a Page Tag ............................................ 6.50.4. Creating the Component Dynamically Using Java ................................. 6.50.5. Details of Usage ................................................................................. 6.50.6. Look-and-Feel Customization .............................................................. 6.51. < rich:dropDownMenu > ............................................................................... 6.51.1. Description ......................................................................................... 6.51.2. Key Features ...................................................................................... 6.51.3. Creating the Component with a Page Tag ............................................ 6.51.4. Creating the Component Dynamically Using Java ................................. 6.51.5. Details of Usage ................................................................................. 6.51.6. Facets ................................................................................................ 6.51.7. Look-and-Feel Customization .............................................................. 6.51.8. Skin Parameters Redefinition .............................................................. 6.51.9. Definition of Custom Style Classes ...................................................... 6.51.10. Relevant Resources Links ................................................................. 6.52. < rich:extendedDataTable > .......................................................................... 6.52.1. Description ......................................................................................... 6.52.2. Key Features ...................................................................................... 6.52.3. Creating the Component with a Page Tag ............................................ 6.52.4. Creating the Component Dynamically from Java ................................... 6.52.5. Details of Usage ................................................................................. 6.52.6. Facets ................................................................................................ 6.52.7. Look-and-Feel Customization .............................................................. 6.52.8. Skin Parameters Redefinition .............................................................. 6.52.9. Definition of Custom Style Classes ...................................................... 6.52.10. Relevant resources links ................................................................... 6.53. < rich:menuGroup > ..................................................................................... 6.53.1. Description ......................................................................................... 6.53.2. Key Features ...................................................................................... 6.53.3. Creating the Component with a Page Tag ............................................ 6.53.4. Creating the Component Dynamically Using Java ................................. 6.53.5. Details of Usage ................................................................................. 6.53.6. Facets ................................................................................................ 6.53.7. Look-and-Feel Customization .............................................................. 6.53.8. Skin Parameters Redefinition .............................................................. 6.53.9. Definition of Custom Style Classes ...................................................... 6.53.10. Relevant Resources Links ................................................................. 6.54. < rich:menuItem > ........................................................................................ 6.54.1. Description ......................................................................................... 6.54.2. Key Features ...................................................................................... 6.54.3. Creating the Component with a Page Tag ............................................

405 405 405 406 406 406 407 407 407 408 410 410 411 414 414 415 415 418 418 418 418 424 424 424 429 429 429 430 431 431 431 432 433 434 434 436 436 436 436 439 439 439 439 443

xiii

RichFaces Developer Guide

6.54.4. Creating the Component Dynamically Using Java ................................. 6.54.5. Details of Usage ................................................................................. 6.54.6. Facets ................................................................................................ 6.54.7. Look-and-Feel Customization .............................................................. 6.54.8. Skin Parameters Redefinition .............................................................. 6.54.9. Definition of Custom Style Classes ..................................................... 6.54.10. Relevant Resources Links ................................................................. 6.55. < rich:menuSeparator > ................................................................................ 6.55.1. Description ......................................................................................... 6.55.2. Creating the Component with a Page Tag ............................................ 6.55.3. Creating the Component Dynamically Using Java ................................. 6.55.4. Look-and-Feel Customization .............................................................. 6.55.5. Skin Parameters Redefinition .............................................................. 6.55.6. Definition of Custom Style Classes ...................................................... 6.55.7. Relevant Resources Links ................................................................... 6.56. < rich:effect > .............................................................................................. 6.56.1. Description ......................................................................................... 6.56.2. Key Features ...................................................................................... 6.56.3. Creating the Component with a Page Tag ............................................ 6.56.4. Creating the Component Dynamically Using Java ................................. 6.56.5. Details of Usage ................................................................................. 6.56.6. Look-and-Feel Customization .............................................................. 6.56.7. Relevant Resources Links ................................................................... 6.57. < rich:fileUpload > ........................................................................................ 6.57.1. Description ......................................................................................... 6.57.2. Key Features ...................................................................................... 6.57.3. Creating the Component with a Page Tag ............................................ 6.57.4. Creating the Component Dynamically Using Java ................................. 6.57.5. Details of Usage ................................................................................. 6.57.6. JavaScript API .................................................................................... 6.57.7. Facets ................................................................................................ 6.57.8. Look-and-Feel Customization .............................................................. 6.57.9. Skin Parameters Redefinition .............................................................. 6.57.10. Definition of Custom Style Classes .................................................... 6.57.11. Relevant Resources Links ................................................................. 6.58. < rich:gmap > .............................................................................................. 6.58.1. Description ......................................................................................... 6.58.2. Key Features ...................................................................................... 6.58.3. Creating the Component with a Page Tag ............................................ 6.58.4. Creating the Component Dynamically Using Java ................................. 6.58.5. Details of Usage ................................................................................. 6.58.6. Look-and-Feel Customization .............................................................. 6.58.7. Definition of Custom Style Classes ...................................................... 6.58.8. Relevant Resources Links ...................................................................

443 444 445 445 446 446 449 449 449 450 450 450 451 451 452 452 452 452 453 453 454 456 456 456 456 456 461 461 462 469 472 472 473 474 477 477 477 478 480 481 481 484 484 487

xiv

6.59. < rich:virtualEarth > ...................................................................................... 6.59.1. Description ......................................................................................... 6.59.2. Key Features ...................................................................................... 6.59.3. Creating the Component with a Page Tag ............................................ 6.59.4. Creating the Component Dynamically Using Java ................................. 6.59.5. Details of Usage ................................................................................. 6.59.6. Look-and-Feel Customization .............................................................. 6.59.7. Definition of Custom Style Classes ...................................................... 6.59.8. Relevant Resources Links ................................................................... 6.60. < rich:hotKey > ............................................................................................ 6.60.1. Description ......................................................................................... 6.60.2. Key Features ...................................................................................... 6.60.3. Creating the Component with a Page Tag ............................................ 6.60.4. Creating the Component Dynamically Using Java ................................. 6.60.5. Details of Usage ................................................................................. 6.60.6. JavaScript API .................................................................................... 6.60.7. Look-and-Feel Customization .............................................................. 6.60.8. Relevant Resources Links ................................................................... 6.61. < rich:inplaceInput > ..................................................................................... 6.61.1. Description ......................................................................................... 6.61.2. Key Features ...................................................................................... 6.61.3. Creating the Component with a Page Tag ............................................ 6.61.4. Creating the Component Dynamically Using Java ................................. 6.61.5. Details of Usage ................................................................................. 6.61.6. JavaScript API .................................................................................... 6.61.7. Facets ................................................................................................ 6.61.8. Look-and-Feel Customization .............................................................. 6.61.9. Skin Parameters Redefinition .............................................................. 6.61.10. Definition of Custom Style Classes .................................................... 6.61.11. Relevant Resources Links ................................................................. 6.62. < rich:inplaceSelect > ................................................................................... 6.62.1. Description ......................................................................................... 6.62.2. Key Features ...................................................................................... 6.62.3. Creating the Component with a Page Tag ............................................ 6.62.4. Creating the Component Dynamically Using Java ................................. 6.62.5. Details of Usage ................................................................................. 6.62.6. JavaScript API .................................................................................... 6.62.7. Facets ................................................................................................ 6.62.8. Look-and-Feel Customization .............................................................. 6.62.9. Skin Parameters Redefinition .............................................................. 6.62.10. Definition of Custom Style Classes .................................................... 6.62.11. Relevant Resources Links ................................................................. 6.63. < rich:inputNumberSlider > ........................................................................... 6.63.1. Description .........................................................................................

487 487 487 489 489 489 491 491 491 492 492 492 493 493 493 495 495 496 496 496 496 500 500 501 505 505 505 506 506 509 509 509 510 514 514 515 520 520 520 520 521 524 524 524

xv

RichFaces Developer Guide

6.63.2. Key Features ...................................................................................... 6.63.3. Creating the Component with a Page Tag ............................................ 6.63.4. Creating the Component Dynamically Using Java ................................. 6.63.5. Details of Usage ................................................................................. 6.63.6. Look-and-Feel Customization .............................................................. 6.63.7. Skin Parameters Redefinition .............................................................. 6.63.8. Definition of Custom Style Classes ...................................................... 6.63.9. Relevant Resources Links ................................................................... 6.64. < rich:inputNumberSpinner > ........................................................................ 6.64.1. Description ......................................................................................... 6.64.2. Key Features ...................................................................................... 6.64.3. Creating the Component with a Page Tag ............................................ 6.64.4. Creating the Component Dynamically Using Java ................................. 6.64.5. Details of Usage ................................................................................. 6.64.6. Look-and-Feel Customization .............................................................. 6.64.7. Skin Parameters Redefinition .............................................................. 6.64.8. Definition of Custom Style Classes ...................................................... 6.64.9. Relevant Resources Links ................................................................... 6.65. < rich:insert > .............................................................................................. 6.65.1. Description ......................................................................................... 6.65.2. Key Features ...................................................................................... 6.65.3. Creating the Component with a Page Tag ............................................ 6.65.4. Creating the Component Dynamically Using Java ................................. 6.65.5. Details of Usage ................................................................................. 6.65.6. Look-and-Feel Customization .............................................................. 6.65.7. Relevant Resources Links ................................................................... 6.66. < rich:jQuery > ............................................................................................. 6.66.1. Description ......................................................................................... 6.66.2. Key Features ...................................................................................... 6.66.3. Creating the Component with a Page Tag ............................................ 6.66.4. Creating the Component Dynamically Using Java ................................. 6.66.5. Details of Usage ................................................................................. 6.66.6. Look-and-Feel Customization .............................................................. 6.66.7. Relevant Resources Links ................................................................... 6.67. < rich:page > ............................................................................................... 6.67.1. Description ......................................................................................... 6.67.2. Key Features ...................................................................................... 6.67.3. Creating the Component with a Page Tag ............................................ 6.67.4. Creating the Component Dynamically Using Java ................................. 6.67.5. Details of Usage ................................................................................. 6.67.6. Facets ................................................................................................ 6.67.7. Skin Parameters for the "simple" theme ............................................... 6.67.8. Component CSS Selectors .................................................................. 6.67.9. Relevant Resources Links ...................................................................

525 530 530 530 532 532 533 535 535 535 536 539 540 540 541 541 542 544 544 544 544 545 545 545 546 546 546 546 546 547 548 548 552 552 552 552 552 553 554 554 556 556 558 558

xvi

6.68. < rich:layout > .............................................................................................. 6.68.1. Description ......................................................................................... 6.68.2. Key Features ...................................................................................... 6.68.3. Creating the Component with a Page Tag ............................................ 6.68.4. Creating the Component Dynamically Using Java ................................. 6.68.5. Details of Usage ................................................................................. 6.68.6. Relevant Resources Links ................................................................... 6.69. < rich:layoutPanel > ..................................................................................... 6.69.1. Description ......................................................................................... 6.69.2. Key Features ...................................................................................... 6.69.3. Creating the Component with a Page Tag ............................................ 6.69.4. Creating the Component Dynamically Using Java ................................. 6.69.5. Details of Usage ................................................................................. 6.69.6. Relevant Resources Links ................................................................... 6.70. < rich:listShuttle > ........................................................................................ 6.70.1. Description ......................................................................................... 6.70.2. Key Features ...................................................................................... 6.70.3. Creating the Component with a Page Tag ............................................ 6.70.4. Creating the Component Dynamically Using Java ................................. 6.70.5. Details of Usage ................................................................................. 6.70.6. JavaScript API .................................................................................... 6.70.7. Facets ................................................................................................ 6.70.8. Look-and-Feel Customization .............................................................. 6.70.9. Skin Parameters Redefinition .............................................................. 6.70.10. Definition of Custom Style Classes .................................................... 6.70.11. Relevant Resources Links ................................................................. 6.71. < rich:message > ......................................................................................... 6.71.1. Description ......................................................................................... 6.71.2. Key Features ...................................................................................... 6.71.3. Creating the Component with a Page Tag ............................................ 6.71.4. Creating the Component Dynamically Using Java ................................. 6.71.5. Details of Usage ................................................................................. 6.71.6. Facets ................................................................................................ 6.71.7. Look-and-Feel Customization .............................................................. 6.71.8. Definition of Custom Style Classes ...................................................... 6.71.9. Relevant Resources Links ................................................................... 6.72. < rich:messages > ....................................................................................... 6.72.1. Description ......................................................................................... 6.72.2. Key Features ...................................................................................... 6.72.3. Creating the Component with a Page Tag ............................................ 6.72.4. Creating the Component Dynamically Using Java ................................. 6.72.5. Details of Usage ................................................................................. 6.72.6. Look-and-Feel Customization .............................................................. 6.72.7. Definition of Custom Style Classes ......................................................

558 558 558 559 559 560 560 561 561 561 561 562 562 563 563 563 563 568 568 568 573 574 574 574 577 581 581 581 581 583 584 584 585 585 585 588 588 588 588 591 591 591 592 592

xvii

RichFaces Developer Guide

6.72.8. Relevant Resources Links ................................................................... 6.73. < rich:modalPanel > ..................................................................................... 6.73.1. Description ......................................................................................... 6.73.2. Key Features ...................................................................................... 6.73.3. Creating the Component with a Page Tag ............................................ 6.73.4. Creating the Component Dynamically Using Java ................................. 6.73.5. Details of Usage ................................................................................. 6.73.6. JavaScript API .................................................................................... 6.73.7. Facets ................................................................................................ 6.73.8. Look-and-Feel Customization .............................................................. 6.73.9. Skin Parameters Redefinition .............................................................. 6.73.10. Definition of Custom Style Classes .................................................... 6.73.11. Relevant Resources Links ................................................................. 6.74. < rich:orderingList > ..................................................................................... 6.74.1. Description ......................................................................................... 6.74.2. Key Features ...................................................................................... 6.74.3. Creating the Component with a Page Tag ............................................ 6.74.4. Creating the Component Dynamically Using Java ................................. 6.74.5. Details of Usage ................................................................................. 6.74.6. JavaScript API .................................................................................... 6.74.7. Facets ................................................................................................ 6.74.8. Look-and-Feel Customization .............................................................. 6.74.9. Skin Parameters Redefinition .............................................................. 6.74.10. Definition of Custom Style Classes .................................................... 6.74.11. Relevant Resources Links ................................................................. 6.75. < rich:paint2D > ........................................................................................... 6.75.1. Description ......................................................................................... 6.75.2. Key Features ...................................................................................... 6.75.3. Creating the Component with a Page Tag ............................................ 6.75.4. Creating the Component Dynamically Using Java ................................. 6.75.5. Details of Usage ................................................................................. 6.75.6. Look-and-Feel Customization .............................................................. 6.75.7. Relevant Resources Links ................................................................... 6.76. < rich:panel > .............................................................................................. 6.76.1. Description ......................................................................................... 6.76.2. Key Features ...................................................................................... 6.76.3. Creating the Component with a Page Tag ............................................ 6.76.4. Creating the Component Dynamically Using Java ................................. 6.76.5. Details of Usage ................................................................................. 6.76.6. Facets ................................................................................................ 6.76.7. Look-and-Feel Customization .............................................................. 6.76.8. Skin Parameters Redefinition .............................................................. 6.76.9. Definition of Custom Style Classes ...................................................... 6.76.10. Relevant Resources Links .................................................................

595 595 595 595 598 599 599 604 604 604 605 606 609 609 609 610 613 613 613 617 617 618 618 621 625 625 625 625 627 628 628 629 629 630 630 630 631 632 632 634 634 634 635 637

xviii

6.77. < rich:panelBar > ......................................................................................... 6.77.1. Description ......................................................................................... 6.77.2. Key Features ...................................................................................... 6.77.3. Creating the Component with a Page Tag ............................................ 6.77.4. Creating the Component Dynamically Using Java ................................. 6.77.5. Details of Usage ................................................................................. 6.77.6. Look-and-Feel Customization .............................................................. 6.77.7. Skin Parameters Redefinition .............................................................. 6.77.8. Definition of Custom Style Classes ...................................................... 6.77.9. Relevant Resources Links ................................................................... 6.78. < rich:panelBarItem > ................................................................................... 6.78.1. Description ......................................................................................... 6.78.2. Key Features ...................................................................................... 6.78.3. Creating the Component with a Page Tag ............................................ 6.78.4. Creating the Component Dynamically Using Java ................................. 6.78.5. Details of Usage ................................................................................. 6.78.6. Facets ................................................................................................ 6.78.7. Look-and-Feel Customization .............................................................. 6.78.8. Skin Parameters Redefinition .............................................................. 6.78.9. Definition of Custom Style Classes ...................................................... 6.79. < rich:panelMenu > ...................................................................................... 6.79.1. Description ......................................................................................... 6.79.2. Key Features ...................................................................................... 6.79.3. Creating the Component with a Page Tag ............................................ 6.79.4. Creating the Component Dynamically Using Java ................................. 6.79.5. Details of Usage ................................................................................. 6.79.6. JavaScript API .................................................................................... 6.79.7. Look-and-Feel Customization .............................................................. 6.79.8. Definition of Custom Style Classes ...................................................... 6.79.9. Relevant Resources Links ................................................................... 6.80. < rich:panelMenuGroup > ............................................................................. 6.80.1. Description ......................................................................................... 6.80.2. Key Features ...................................................................................... 6.80.3. Creating the Component with a Page Tag ............................................ 6.80.4. Creating the Component Dynamically Using Java ................................. 6.80.5. Details of Usage ................................................................................. 6.80.6. JavaScript API .................................................................................... 6.80.7. Look-and-Feel Customization .............................................................. 6.80.8. Skin Parameters Redefinition .............................................................. 6.80.9. Definition of Custom Style Classes ...................................................... 6.80.10. Relevant resources links ................................................................... 6.81. < rich:panelMenuItem > ................................................................................ 6.81.1. Description ......................................................................................... 6.81.2. Key Features ......................................................................................

637 637 637 639 639 639 640 640 640 642 642 642 643 644 644 644 645 645 645 646 648 648 649 655 655 655 658 658 658 660 660 660 660 666 667 667 669 669 669 670 673 673 673 673

xix

RichFaces Developer Guide

6.81.3. Creating the Component with a Page Tag ............................................ 6.81.4. Creating the Component Dynamically Using Java ................................. 6.81.5. Details of Usage ................................................................................. 6.81.6. Look-and-Feel Customization .............................................................. 6.81.7. Skin Parameters Redefinition .............................................................. 6.81.8. Definition of Custom Style Classes ...................................................... 6.81.9. Relevant resources links ..................................................................... 6.82. < rich:pickList > ........................................................................................... 6.82.1. Description ......................................................................................... 6.82.2. Key Features ...................................................................................... 6.82.3. Creating the Component with a Page Tag ............................................ 6.82.4. Creating the Component Dynamically Using Java ................................. 6.82.5. Details of Usage ................................................................................. 6.82.6. Facets ................................................................................................ 6.82.7. Look-and-Feel Customization .............................................................. 6.82.8. Skin Parameters Redefinition .............................................................. 6.82.9. Definition of Custom Style Classes ...................................................... 6.82.10. Relevant Resources Links ................................................................. 6.83. < rich:progressBar > ..................................................................................... 6.83.1. Description ......................................................................................... 6.83.2. Key Features ...................................................................................... 6.83.3. Creating the Component with a Page Tag ............................................ 6.83.4. Creating the Component Dynamically Using Java ................................. 6.83.5. Details of Usage ................................................................................. 6.83.6. JavaScript API .................................................................................... 6.83.7. Facets ................................................................................................ 6.83.8. Look-and-Feel Customization .............................................................. 6.83.9. Skin Parameters Redefinition .............................................................. 6.83.10. Definition of Custom Style Classes .................................................... 6.83.11. Relevant Resources Links ................................................................. 6.84. < rich:scrollableDataTable > ......................................................................... 6.84.1. Description ......................................................................................... 6.84.2. Key Features ...................................................................................... 6.84.3. Creating the Component with a Page Tag ............................................ 6.84.4. Creating the Component Dynamically Using Java ................................. 6.84.5. Details of Usage ................................................................................. 6.84.6. JavaScript API .................................................................................... 6.84.7. Facets ................................................................................................ 6.84.8. Look-and-Feel Customization .............................................................. 6.84.9. Skin Parameters Redefinition .............................................................. 6.84.10. Definition of Custom Style Classes .................................................... 6.84.11. Relevant Resources Links ................................................................. 6.85. < rich:separator > ........................................................................................ 6.85.1. Description .........................................................................................

677 678 678 680 680 681 684 684 684 684 688 689 689 691 692 692 695 698 698 698 698 702 702 702 706 706 707 707 708 710 711 711 711 715 716 716 720 720 720 720 721 726 726 726

xx

6.85.2. Key Features ...................................................................................... 6.85.3. Creating the Component with a Page Tag ............................................ 6.85.4. Creating the Component Dynamically Using Java ................................. 6.85.5. Details of Usage ................................................................................. 6.85.6. Look-and-Feel Customization .............................................................. 6.85.7. Definition of Custom Style Classes ...................................................... 6.85.8. Relevant Resources Links ................................................................... 6.86. < rich:simpleTogglePanel > ........................................................................... 6.86.1. Description ......................................................................................... 6.86.2. Key Features ...................................................................................... 6.86.3. Creating the Component with a Page Tag ............................................ 6.86.4. Creating the Component Dynamically Using Java ................................. 6.86.5. Details of Usage ................................................................................. 6.86.6. Facets ................................................................................................ 6.86.7. Look-and-Feel Customization .............................................................. 6.86.8. Skin Parameters Redefinition .............................................................. 6.86.9. Definition of Custom Style Classes ...................................................... 6.86.10. Relevant Resources Links ................................................................. 6.87. < rich:spacer > ............................................................................................ 6.87.1. Description ......................................................................................... 6.87.2. Key Features ...................................................................................... 6.87.3. Creating the Component with a Page Tag ............................................ 6.87.4. Creating the Component Dynamically Using Java ................................. 6.87.5. Details of Usage ................................................................................. 6.87.6. Look-and-Feel Customization .............................................................. 6.87.7. Relevant Resources Links ................................................................... 6.88. < rich:suggestionbox > ................................................................................. 6.88.1. Description ......................................................................................... 6.88.2. Key Features ...................................................................................... 6.88.3. Creating the Component with a Page Tag ............................................ 6.88.4. Creating the Component Dynamically Using Java ................................. 6.88.5. Details of Usage ................................................................................. 6.88.6. JavaScript API .................................................................................... 6.88.7. Facets ................................................................................................ 6.88.8. Look-and-Feel Customization .............................................................. 6.88.9. Skin Parameters Redefinition .............................................................. 6.88.10. Definition of Custom Style Classes .................................................... 6.88.11. Relevant Resources Links ................................................................. 6.89. < rich:tabPanel > ...