If you can't read please download the document
Upload
roger-kitain
View
4.616
Download
3
Embed Size (px)
Citation preview
2. Hi Level Categories of Features Foundational NewFeatures Large NewFeatures 3. System Events
4. JSF Lifecycle events 5. Listeners registered at 3 scopes:
6. View: UIViewRoot.subscribeToEvent() 7. Application: Application.subscribeToEvent() Publish using:
Declarative component event listener registration: 8. Resources
9. Loaded from Classpath or filesystem 10. Library / i18n / Versioning Support 11. Java API:
12. Target Attribute: head, body, form Markup:
13. Resources 14. View Traversal
15. Useful for component(s) processing 16. VisitContext
17. createVisitContext() UIComponent.visitTree()
Usages: Ajax ; State Saving 18. Partial State Saving
19. Performance issues(session bloat) JSF 2.0: Partial State Saving
20. Per view state size up to 4 x smaller 21. Default for JSF 2.0 components (written with Facelets) 22. PartialStateHolder
StateHelper
23. No need for saveState/restoreState 24. GET Request Support View Parameters
25. Mappings specified with component:
26. is EditableValueHolder
27. GET Request Support
28. Uses JSF navigation system for determining destination
Integrate with view parameters:
29. JSF 2.0 Component Model Why Do We Need It?
30. Renderer 31. Tag class 32. Tld 33. faces-config.xml 34. ...... 35. JSF 2.0 Component Model
Facelets is the foundation
36. XHTML and tags 37. Eliminates translation/compilation 38. Templating 39. Composite Components 40. JSF 2.0 Component Model
41. Enhanced to work with JSF 2.0 component building
42. Namespaces created automagically no more taglibs Supports Composite Components 43. It's in the specification ! 44. Composite Components
45. True abstraction:
Using Page (XHTML) Component (XHTML) 46. Composite Components
47. Tag name is file name < my : outvalue=yes/> On disk: /resources/ comp / out .xhtml 48. Composite Components What's Inside The Black Box?
49. Everything page author needs to know to use component Implementation
50. Composite Components resources/ezcomp/LoginPanel.xhtml ...
.... 51. Composite Components resources/ezcomp/LoginPanel.xhtml ...
.... 52. Composite Components Using Page xmlns:ez=" http://java.sun.com/jsf/composite/ezcomp ">
53. Enhancing JSF 2.0 Components
54. Behaviors Work well with composite components 55. Enhancing JSF 2.0 Components Ajax
56. Useful for making JSF Ajax calls from JavaScript 57. Control component processing on the server and component rendering at the client 58. Enhancing JSF 2.0 Components Ajax: Declarative Solution :
Wrapping approach tag is placed around a group of components
59. Enhancing JSF 2.0 Components Ajax: Declarative Solution : Do exactly the same thing since action is the default event for commandButton components. JavaScript events supported too. 60. Enhancing JSF 2.0 Components Ajax: Declarative Solution : Regions Ajax applied to text1 and button1. Ajax not applied to panelGrid : no default event associated with it. 61. Enhancing JSF 2.0 Components Adding Ajax
62. Enhancing JSF 2.0 Components Adding Ajax
script.js: myscript.login=function login( componentId , event) { jsf.ajax.request (document.getElementById(subButton), event); 63. Enhancing JSF 2.0 Components Behaviors
64. Ajax is a behavior (AjaxBehavior) 65. Not just about Ajax
66. Enhancing JSF 2.0 Components Behaviors : Client Behavior(s)
67. Attached by event 68. Contributes script content for rendering
All Html standard components implement ClientBehaviorHolder interface 69. Enhancing JSF 2.0 Components Adding Behaviors
... be:tip is custom behavior 70. Other Enhancements
71. Conditional Navigation : more complex navigation rules Exceptions
72. Can be decorated EL : enhancements for component processing:
73. #{component.clientId}