Overview of JSF 2.0

5,152 views

Published on

An Overview of JavaServer Faces 2.0 (JSF 2.0)

Published in: Technology
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
5,152
On SlideShare
0
From Embeds
0
Number of Embeds
49
Actions
Shares
0
Downloads
444
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide

Overview of JSF 2.0

  1. 1. JavaServer™ Faces 2.0 Overview • Roger Kitain • Enterprise Java Platforms >
  2. 2. JSF 2.0 – What We Heard • Top Goals 1)Page Declaration Language (PDL) 2)Make custom components much easier to develop 3)Ajax Support 4)Reduce the configuration burden
  3. 3. Page Declaration Language • Based on Facelets • Facelets: > first non-JSP PDL designed for JSF > Some differences from JSP: > Pages compiled to abstract structure - when executed builds JSF component view > Don't need TLD for tag attributes > Page templating
  4. 4. Easier component Development <html xmlns=quot;http://www.w3.org/1999/xhtmlquot; xmlns:h=quot;http://java.sun.com/jsf/htmlquot; xmlns:ez=quot;http://java.sun.com/jsf/composite/simpleoutquot;> ... <h1>Yellow Text Example</h1> <h:form id=quot;form1quot;> <ez:out value=quot;Test Valuequot;/> <p><h:commandButton value=quot;reloadquot;/></p> </h:form> </html>
  5. 5. Easier component Development <html xmlns=quot;http://www.w3.org/1999/xhtmlquot; xmlns:h=quot;http://java.sun.com/jsf/htmlquot; xmlns:composite=quot;http://java.sun.com/jsf/compositequot;> ... <composite:interface name=quot;outquot; displayName=quot;Very Basic Output Componentquot; preferred=quot;truequot;...> <composite:attribute name=quot;valuequot; required=quot;falsequot;/> </composite:interface> <composite:implementation> <h:outputText value=quot;#{compositeComponent.attrs.value}quot; style=quot;background-color: yellowquot;/> </composite:implementation> </body> </html>
  6. 6. Ajax Support • Resource Delivery Mechanism • Partial View Processing • Partial View Rendering ↑ In JSF 2.0 Spec • Ajaxification Capability • Ajax Enabled Components ↓ In Component Library R
  7. 7. Ajax Support Partial View Processing Ajax Request execute:4,5 Apply Request Process Restore View Values Validations 1 2 1 Render Invoke Update Model 1 Response Application Values 2 3 4 5 Execute Portion
  8. 8. Ajax Support Partial View Processing Ajax Request render:4,5 Apply Request Process Restore View Values Validations 1 2 1 Render Invoke Update Model 1 Response Application Values 2 3 4 5 Render Portion
  9. 9. Ajax Support • JavaScript namespace registered with OpenAjax • JavaScript API for performing Ajax interations with JSF > collecting/encoding view state > sending requests > processing Ajax response and Dom updates
  10. 10. Ajax Support Ajaxification Capability • A way to give ajax capability to existing JSF components without writing any JavaScript • Specification will define core tag <h:commandButton value=”submit”> <f:ajaxRequest render=”myOutput” /> </h:commandButton> ... <h:outputText id=”myOutput” />
  11. 11. Reduce Configuration Burden Annotation Support • An alternative to XML configuration • @FacesComponent, @FacesConverter, @ManagedBean • “Scope” Annotations: > @RequestScope, @SessionScope, @ApplicationScope
  12. 12. Summary • Collected feedback from community and EG members • Defined top goals for specification • Diverse set of EG members

×