If you can't read please download the document
Upload
dominion
View
1.249
Download
1
Embed Size (px)
Citation preview
2. An example before we dive in... 3. Zooming in a bit... 4. Let's examine the source code Notice anything missing? 5. Agenda
6. How are Themes typically used? 7. How do Themes actually work? 8. Going beyond the typical to...
9. Enhance application performance 10. Maintain device-targeted user interfaces 11. Streamline team development 12. What is a Theme?
13. XML file with a root element of theme 14. Can be global to a server or local to an NSF
Defines runtime page modification
15. Component attribute manipulation 16. Pre-installed themes
17. notes 18. oneui
19. oneuiv2_gold 20. oneuiv2_green 21. oneuiv2_metal 22. oneuiv2_red 23. Pre-installed themes
24. Add your own server-wide themes by adding them to the same folder 25. This allows all applications on the same server to use or extend a common custom theme 26. The simplest possible example
27. For a theme to be useful, it must contribute:
28. Properties to be applied to matching controls Themes can also extend another Theme: 29. Example of a descendant Theme 30. Selecting a Theme 31. Agenda
32. How are Themes typically used? 33. How do Themes actually work? 34. Going beyond the typical to...
35. Enhance application performance 36. Maintain device-targeted user interfaces 37. Streamline team development 38. How are Themes typically used?
39. Corporate design standards (acme.css) 40. Application-specific resources (myApp.css) Enforced addition of component attributes
41. styleClass (e.g. xspTableCell) 42. Examples of resource inclusion 43. Examples of resource inclusion 44. Examples of resource inclusion 45. Examples of component modification 46. Agenda
47. How are Themes typically used? 48. How do Themes actually work? 49. Going beyond the typical to...
50. Enhance application performance 51. Maintain device-targeted user interfaces 52. Streamline team development 53. How do Themes actually work?
54. Applied during the JSF render phase 55. Resources injected into the component tree 56. Components matched by default or custom ID 57. Each XPage component instance is a bean
58. Every attribute has a setter method 59. Theoretical example Equivalent to: view.setStyleClass(view.getStyleClass() + xspView tundra); 60. This works for any property...
61. var 62. rows 63. partialRefresh 64. ...value Almost any propertythat is not read-only can be set via a Theme. 65. Agenda
66. How are Themes typically used? 67. How do Themes actually work? 68. Going beyond the typical to...
69. Enhance application performance 70. Maintain device-targeted user interfaces 71. Streamline team development 72. Apply default control properties 73. Apply default control properties 74. Apply custom control properties 75. Apply custom control properties 76. BONUS SLIDE! Managed bean... 77. BONUS SLIDE! Managed bean... 78. Revisiting the end result 79. Revisiting the end result 80. Keep your Themes clean
81. Requires a minimum of 4 lines for each 82. Themes support an abbreviated syntax 83. This syntax allows one additional feature:
84. Keep your Themes clean 85. Agenda
86. How are Themes typically used? 87. How do Themes actually work? 88. Going beyond the typical to...
89. Enhance application performance 90. Maintain device-targeted user interfaces 91. Streamline team development 92. Automatic performance boost
93. Themes are applied during the final phase 94. By default all applied component properties simply ignore the model 95. Themes are also cached 96. Add all these up, and it means the more you define in a theme, the less work the server has to perform to render the page 97. Limitations
98. Page load bindings ( ${} ) like component id Server-side SSJS libraries included via a Theme are available in the afterPageLoad event but not the beforePageLoad 99. Passthru HTML components can not be modified via Themes 100. Agenda
101. How are Themes typically used? 102. How do Themes actually work? 103. Going beyond the typical to...
104. Enhance application performance 105. Maintain device-targeted user interfaces 106. Streamline team development 107. Various approaches for mobile
Set rendererType property of key components to invoke an entirely different render kit
108. Agenda
109. How are Themes typically used? 110. How do Themes actually work? 111. Going beyond the typical to...
112. Enhance application performance 113. Maintain device-targeted user interfaces 114. Streamline team development 115. Streamline team development
116. Mid-level developers maintain Themes, defining how components utilize native and custom API's 117. Novices stick to drag and drop: add a component to the page, specify the appropriate themeId... done. 118. Easy to document for novices
119. Component type (computed field, image, link) 120. Theme Id A novice can choose from the defined components, speeding up the process and reducing duplication of effort 121. The End
122. Avez-vous des questions? 123. Haben Sie Fragen? 124. ...any questions? Disclaimer: if any of the above phrases are complete nonsense, blame Google Translate.