PrimeFaces enables you to build modern, powerful, attractive Java EE UIs with dozens of off-the-shelf components. You can build new functionality very quickly with the built-in capabilities of the component suite as well as the power of JavaServer Faces. But what about those situations that require some customization or additional features built on top of an existing component? That’s when you need to understand exactly what’s happening behind the scenes. This session deconstructs PrimeFaces from the Java layer (component code, Ajax integration, and so on) all the way through the JavaScript browser layer (CSS, JavaScript widget API, and jQuery).
Presented at JavaOne 2015.
1. Kito
D.
Mann
Principal
Consultant
Advanced PrimeFaces
2. Kito D. Mann
@kito99
» Principal
Consultant
at
Virtua
» h6p://www.virtua.com
» Training,
consul?ng,
architecture,
mentoring,
» Official
US
PrimeFaces
partner
» Author,
JavaServer
Faces
in
Ac?on
» Founder,
JSF
Central
» h6p://www.jsfcentral.com
Copyright (C) 2012 Virtua, Inc. All rights reserved.
3. Kito D. Mann
@kito99
» Co-‐host,
Enterprise
Java
Newscast
» h6p://enterprisejavanews.com
» Interna?onally
recognized
speaker
» JavaOne,
JavaZone,
Devoxx,
NFJS,
TSSJS,
etc.
» JCP
Member
» JSF,
MVC,
CDI,
JSF
Portlet
Bridge,
Portlets
Copyright (C) 2012 Virtua, Inc. All rights reserved.
4. What’s new in PrimeFaces 5.3
» Responsiveness
across
all
components
» Signature
component
» DragDrop
support
for
mobile
devices
» Over
100
bug
fixes
Copyright (C) 2012 Virtua, Inc. All rights reserved.
9. Ajax Update Keywords
Copyright (C) 2012 Virtua, Inc. All rights reserved.
Keyword
Type
@this
Standard
@form
Standard
@none
Standard
@namingcontainer
PrimeFaces
@parent
PrimeFaces
@composite
PrimeFaces
@child(n)
PrimeFaces
@previous
PrimeFaces
@widgetVar(name)
PrimeFaces
17. Why Would You Modify a
Component?
» Fix
a
bug
» Change
the
behavior
» Add
a
feature
» Provide
default
behavior
Copyright (C) 2012 Virtua, Inc. All rights reserved.
18. Component Modification
Approaches
» Java
» Composite
components
» Subclassing
the
Java
class
» Patching
the
Java
class
Copyright (C) 2012 Virtua, Inc. All rights reserved.
22. Theme Anatomy
» Components
have
Structural
CSS
» Not
part
of
theme
» Padding
» Layout
» Margin
» Dimensions
» Specific
component
selectors
are
covered
in
the
documenta?on
24. Theme Anatomy
Selector
Applies
To
.ui-‐widget
All
PrimeFaces
components
.ui-‐widget-‐header
Header
sec?on
of
a
component
.ui-‐widget-‐content
Content
sec?on
of
a
component
.ui-‐state-‐default
Default
class
of
a
clickable
element
.ui-‐state-‐hover
Hover
class
of
a
clickable
element
.ui-‐state-‐ac?ve
When
a
clickable
element
is
selected
.ui-‐state-‐highlight
Highlighted
elements
.ui-‐state-‐disabled
Disabled
elements
.ui-‐icon
Elements
that
represent
icons
Debugging JS
Subclassing components to provide default properties
Overriding renderer
Replacing or overriding the standard components in faces that config