3. The following is intended to outline our general
product direction. It is intended for information
purposes only, and may not be incorporated into any
contract. It is not a commitment to deliver any
material, code, or functionality, and should not be
relied upon in making purchasing decisions.
The development, release, and timing of any
features or functionality described for Oracle’s
products remains at the sole discretion of Oracle.
3
12. Composite Components
• Enable True Abstraction
– Create a true, reusable, component from an
arbitrary region of a page
– Built by composing other components
• “Using” and “Defining” page
• Full support for using attached objects in the
using page
– Action methods
– Validators, etc
12
20. Partial State Saving
• Inspired by Trinidad state saving
• Save only the state that's changed since creation
of the component tree
• Per-view state size up to 4X smaller
• Default for pages written with Facelets
• All standard components implement this feature
– Default for composite components
20
24. System Events
• Inspired by Solaris Dtrace, Linux strace, etc.
• Publish/Subscribe event bus for things that
happen during the JSF Lifecycle
• Adds to event listening abilities
– FacesEvent/FacesListener
– PhaseEvent/PhaseListener
– SystemEvent/SystemEventListener
24
28. Resources
• Standard way to serve image, JavaScripts,
CSS, …
– No need for separate Servlet or Filter
– Logically related to components, treat them that way
• @ResourceDependency or
@ResourceDependencies on custom
components
• Built in support for CSS, Image, JavaScript
resources
• /resources or /META-INF/resources
28
29. Resource EL – Sample Code
• #{resource['<resource>']}
• #{resource['<library>:<resource>']}
• Examples of use
– <a href="#{resource['header.jpg']}" />
– <h:graphicImage
value="#{resource['corp:header.jpg']}" />
29
31. Behaviors
• A Behavior is an interface and invents a new
type of “attached object” which takes part in
decode/encode of a component
• 3 new behaviors – ClientBehavior,
ClientBehaviorHolder, AjaxBehavior
<h:commandLink
onclick="return confirm('Really???')"/>
<h:commandLink>
<foo:confirm message="Really???"/>
</h:commandLink>
31
32. Optional “faces-config.xml”
• <managed-bean> → @ManagedBean or @Named
– Validator, Renderer, Listener, ...
• Default navigation rules – match a view on the
disk
– Conditional navigation
@Named(“simplebean”)
public class SimpleBean {
. . .
}
<h:commandButton action="show" value="submit"/>
32
33. Lot more features ...
• Annotations
• Navigation
• Exceptions
• Validation
• EL
• Scopes
• Project Stage
33
34. Annotations
• @ManagedBean
• @*Scoped (Session, Request, etc)
• @ManagedProperty
• @FacesComponent
• @FacesConverter
• etc.
• With implicit Navigation, may eliminate need
for faces-config.xml in many cases
34
36. EL (Expression Langauge)
• #{component}, #{cc} (composite
component): get the “currently” processed
component / composite component
• #{component.clientId}
• #{component.messageList}
36
37. Validation
• Integration with JSR 303: Bean Validation
– @NotEmpty String name;
– default validator: javax.faces.Bean –
automatically applied to all input fields
• Default-validator: hook up a validator for all
instances of EditableValueHolder
• <f:validateBean>,
<f:validateRequired>,
<f:validateRegexp>
37
38. Project Stage
• Inspired by Rails
• Development
– Better error reporting, debugging
• Production
– Better performance
38