►
Description
How would you like to utilize your knowledge of Jakarta Server Faces (JSF) development when building sophisticated Microservice based applications? JSF has proven to be a brilliant front end solution for Microservices-based applications, and in this talk I will show you how it can be done. Best of all, many popular frameworks can be harnessed to develop amazing front ends that will scale across many devices. In this talk, you will learn the principles behind leveraging JSF to build stateless views that utilize RESTful web services for performing database interactions.
A
Morning,
everyone
good
afternoon
and
good
evening,
depending
where
you
guys
are
but
welcome
to
another
edition
of
Jakarta
tech
talks.
Today
we
have
jobs,
you
know
showing
us
utilizing
JSF
front-ends
with
micro
services,
so
with
that
in
further
ado,
Josh
take
it
away.
Thanks,
I
appreciate
you
having
me
hello,
everybody
I,
hope
everybody
is
staying
healthy
and
safe
in
these
crazy
times
and
I
appreciate
you
taking
the
time
out
to
learn
a
little
bit
about
using
JSF
with
micro
services.
A
And
so
this
presentation
is
basically
called
utilizing:
JSF
front-ends
with
micro
services,
and
as
I
mentioned,
my
name
is
Josh.
You
know,
I'm
in
a
press
and
Java
magazine,
author
I'm,
a
member
of
the
JCP
Apache
NetBeans
contributor
in
committer,
a
member
of
the
Jakarta
EE
ambassadors
in
Java
champions.
So
during
my
day
job.
A
What
I
do
is
I
application
developer,
primarily
Java
and
Java
EE
2
card
EEE
I,
also
as
an
act
as
a
DBA,
primarily
working
with
Oracle
databases,
but
I
do
work
with
some
FileMaker
databases
and
also
a
system
administrator
I'm,
always
working
with
servers,
both
Linux
and
Windows,
based
primarily-
and
you
know,
when
I'm
not
at
work.
During
the
day.
I
am
authoring
and
speaking
and
doing
podcasts
with
several
others.
A
As
I
mentioned
I'm
a
Java
champion,
Apache
NetBeans
developer
I
primarily
develop
the
Java
EE
code
that
helps
make
Apache
NetBeans
move
forward
with
Java
EE
support.
So
really
the
Java
EE
8
support
and
soon
will
be
Jakarta
y8
support
in
Apache
NetBeans
as
well
and
like
I,
had
mentioned.
Also
a
member
of
the
Jakarta
EE
ambassadors.
A
I
just
want
to
start
off
and
let
you
know
this
is
something
that
I
do
I'm
developing
applications
using
JSF.
Still
today,
it's
very
viable
technology
for
using
as
front
ends
on
micro-services
and
other.
You
know
regular
standard
applications
as
well.
Some
people
call
them
monolith.
Applications
I
really
do
enjoy
them
still.
They
do
definitely
have
a
space
in
the
ecosystem
doesn't
really
make
sense
to
use
micro-services.
A
In
some
cases,
so
you
know,
JSF
is
just
my
go-to
front-end
technology
because
it's
so
easy
to
use
and
it
provides
so
much
right
out
of
the
box
I'm
going
to
show
you
a
little
bit
about
that
today,
so
giving
you
an
idea
of
how
to
get
started.
If
you
wanted
to
download
code
and
start
going,
I
will
share
this
code
after
the
presentation.
A
So
if
you
wanted
to
go
on
github
and
obtain
the
sources
and
get
started,
what
you'll
need
to
do
is
download
eclipse,
GlassFish,
5.10
or
I
utilize,
pyrrha
5.19,
4+4
jdk
eleven
support
there
I'm
not
sure
the
Eclipse
class
special
yet
provides
JDK
11
support,
but
I
could
be
wrong
about
that
now.
I
for
this
particular
presentation,
I'll
be
using
PI
R
of
5.19
or
excuse
me
5.29.
One
I
believe
with
JDK
11
and
you'll
just
need
to
include
Jakarta
dependencies
in
your
project.
A
I'll
show
you
how
to
do
that
I'm
going
to
be
using
maven.
So
that's
my
build
system
and
I'll
be
pulling
the
dependencies
in
using
a
pom
file.
There
are
lots
of
great
examples
out
there,
so
there's
just
a
link
to
a
couple
of
them,
so
just
to
give
you
a
quick
overview
which
Accardi
v8
you
know
this
release
is
primarily
the
first
release
of
Java
EE
and
oak:
an
open
source
atmosphere.
So
you
know
Java
EE
was
transferred
to
the
Eclipse
Foundation
and
it
is
now
known
as
Jakarta
EE
and
Jakarta
EEA.
A
It
is
the
first
release
and
it
really
just
provides
the
same
functionality
as
Java
EE
eight
did
provide
and
what
that
is
is
continued
enhancements
for
productivity
and
web
standards
alignment,
and
it
does
have
better
alignment
with
Java
SE
8.
But,
as
I
mentioned,
you
can
also
utilize
Java
11
as
well,
if
you're,
using
the
compatible
application
server,
and
this
also
works
towards
a
better
platform
for
development
of
micro
services.
A
Now
I
just
want
to
take
another
step
back
real,
quick
and
mention
that
what
I'm
going
to
show
you
today
also
works
very
well
with
docker
and
containerized
environments.
So
actually,
the
project
that
I'm
using
today
deploys
very
well
to
pyro
micro,
and
so
that
will
allow
you
to
deploy
your
service
to
a
container
in
pretty
you
know
in
docker,
and
then
you'll
have
your
docker
container,
which
will
be
providing
you
data
for
a
separate
container,
which
will
conclude
your
front-end.
A
A
There
are
also
some
UI
changes,
such
as
iterable
math,
custom,
UI
data
support,
and
there
are
some
component
search
expressions.
Now
the
radio
button
was
made
a
part
of
the
library
they
added
style
class
attribute
on
each
column,
so
that
allows
you
to
better
style
your
data
tables
and
then
there's
basic
support
for
extension
list
URLs.
A
A
Other
things
that
were
part
of
JSF
3.0
lots
of
removal
of
old
cruft,
so
managed
beans
are
no
not
really
used
any
longer.
Now
we
utilize
CDI
beans.
This
is
basically
providing
you
with
great
the
great
feature
that
CDI
allows.
Is
it
provides
you
the
ability
to
utilize
scope
in
your
application
and
pull
beans
in
to
other
resources
so
that
you
know
they
can
be
used
and
provides
you
with
many
different
scopes
which
can
be
used
application
wide.
A
So
the
managed
bean
facility
was
basically
created
just
for
JSF
and
we
are
no
longer
really
using
that
today.
It's
all
should
be
CDI
based
and
more
artifacts
are
moving
towards
CDI.
So
that
means
that
we
can
now
go
ahead
and
do
injection
into
our
beans
as
well
with
what
some
of
the
JSF
artifacts
there's
an
action
model.
That's
possibly
going
to
be
coming
at
some
point
and
extension
list
mapping.
A
A
So
that
works
by
JSF
2.3,
providing
default
producers
for
many
of
the
most
commonly
used,
JSF,
artifacts
and
then
another
benefit
is
that
we
can
now,
when
you're,
building
a
custom,
converter
or
validator.
These
are
now
injection
targets
as
well,
so
you
can
inject
into
those
as
well.
So
here's
just
a
quick
screenshot
of
some
of
the
different
artifacts
that
can
be
injected
into
your
CDI
beans.
A
So,
let's
take
a
look
at
another
one:
the
spec
stem
and
show
you
a
little
bit
about
today
and
that's
Jakarta
API
for
restful
web
services
or
jax-rs.
As
it's
commonly
been
known,
some
of
the
new
features
were
improved.
Cdi
integration,
reactive
client,
api,
non-blocking
I/o.
These
were
some
of
the
newer
features
that
were
released
as
part
of
Java
EE
8.
So
therefore,
they're
part
of
Jakarta
EE,
8
server-sent
events
are
part
of
this
spec
now
and
they
include
the
ability
to
create
a
one-way
communication.
A
And
so
what
we
want
to
do
here
in
order
to
create
an
application
which
allows
JSF
to
be
used
as
the
front-end
for
micro
services,
let's
first
start
by
building
a
simple
service,
so
this
service
will
basically
utilize
jax-rs
or
Jakarta
restful
web
services.
It
uses
JPA
to
communicate
with
database
and
bean
validation
to
limit.
A
We're
going
to
wire
all
this
together
using
expression,
language
and,
like
I,
said
the
front
end
is
going
to
communicate
with
the
services
using
jax-rs
and
all
the
database
communication
is
going
to
occur
within
the
services.
So
that
means
the
front
end
doesn't
have
to
know.
You
know
anything
about
the
database.
All
the
cares
about
is
the
restful
endpoints.
A
The
the
web
services
that
is
going
to
be
using
to
communicate
and
the
jax-rs
web
service
will
then
make
a
call
to
the
database
using
JPA
and
then
send
that
data
back
in
an
XML
or
JSON
format.
So
that's
the
JSF
front-end
can
pick
it
so
on
the
front
end
when
we're
using
the
jsf
we're
going
to
have
to
utilize
a
jax-rs
client
and
this
code
here
kind
of
shows
you
just
how
to
set
something
like
this
up
using
straight
code.
A
There
are
api's
now
which
will
allow
you
to
get
rid
of
some
of
the
ceremony,
so
you
do
not
have
to
write
all
this
code
out
to
create
a
jax-rs
client,
so
one
such
implementation
is
micro,
profile,
restful
web
services,
clients
which
allows
you
to
use
in
the
annotation
instead.
But
in
this
case
what
I'll
be
doing
is
basically
showing
you
how
to
do
all
the
code,
and
so
you
will
create
the
clients
based
upon
a
URI
to
a
restful
web
service.
A
And
then
you
would
just
make
a
call
by
calling
upon
the
request
in
passing
the
media
type
of
XML,
since
we
want
to
retrieve
XML
and
then
in
this
case
we're
going
to
be
retrieving
a
list
of
entity
classes
which
go
by
the
name
of
roster.
So
that's
why
you
see
we
are
retrieving
a
list
of
roster
and
then,
when
I'm,
making
a
call
using
that
client
code.
A
The
restful
web
service
may
look
something
like
this,
so
in
in
this
case
we're
going
to
be
producing
or
returning
XML
or
JSON,
and
this
is
a
get
call.
So,
whenever
that
restful
web
service
is
invoked
without
putting
an
extension
or
a
pass
on
on
the
end
of
it,
it's
going
to
go
ahead
and
call
this
method
which
will
return
a
list
of
the
roster
entities.
So
let
me
get
out
of
this
presentation
here
and
show
you
a
little
bit
about
how
this
is
done.
A
So
I'm
going
into
Apache
netbeans
here
and
I'm,
going
to
show
you
the
web
service
code,
so
this
code
is
called
roster
service
and
basically
to
start
off.
What
we
have
here
is
a
class
which
is
an
entity
class
and
it's
going
to
be
called
roster
now.
What
this
does
this
entity
class
basically
maps
to
a
database
table?
Okay,
so
let
me
show
you
very
quickly:
I've
got
this
database
that
is
running
locally
on
my
laptop
here
and
it
is
an
Apache
Derby
database,
okay,
and
so
what
I
have
here
are
a
couple
of
tables.
A
One
of
those
is
called
roster,
okay,
and
there
are
five
fields
in
roster,
and
so
basically,
what
this
entity
class
does,
if
you're
not
familiar
with
Java
persistence
or
Jakarta
persistence
API
is
it
will
map
this
Hojo?
This
plain
old
Java
object
to
this
roster
class,
so
basically
I
create
this
entity
class.
The
table
behind
it
is
going
to
be
called
roster
and
I'm
going
to
have
column
for
each
of
the
fields
in
the
database
a
table.
A
So
you
can
see
here
that
what
I'm
doing
is
I've
got
this
sequence
generator
for
the
primary
key,
which
is
the
ID.
What
this
is
going
to
do
is
every
time
a
new
entity
is
created,
this
sequence
will
be
incremented,
and
so
the
primary
key
will
automatically
increment
and
we
will
always
have
a
primary
or
unique
key
here
in
this
scenario.
A
So,
basically
to
make
this
happen,
what
I
did
in
the
Patric
Derby
was
create
a
sequence
by
the
name
of
roster
underscore
ass,
okay
and
the
rest
of
it
is
just
the
same
as
a
regular
plain
old
java
object,
okay,
so
that
we
will
need
in
order
to
to
our
database
and
then
the
other
thing
we
need
to
set
up
this
restful.
Web
service
is
a
Jack's
RF
configuration,
and
so
basically,
all
that
comes
down
to
is
annotating
a
class
that
extends
the
Java
xws
rs
application.
A
So
the
next
thing
I
want
to
do
is
create
a
web
service
class
that
is
going
to
utilize
this
entity
class.
This
is
pretty
easy
to
do
if
you're,
using
something
like
a
passion
NetBeans.
So
what
I
would
do
here
in
this
case
would
be
right-click
and
I
would
just
say
that
I
wanted
to
create
a
new
restful
web
services
for
entity
classes,
and
this
would
allow
me
to
select
the
roster
class
that
I
just
created,
and
it
would
create
this
code
here.
Basically,
what
this
does
is
creates
a.
A
Ejb
almost
but
it's
a
restful
web
service
EJB,
so
it's
going
to
annotate
the
class
with
this
path,
which
allows
the
web
service
to
become
available
on
using
roster
in
the
URI,
and
we
have
a
persistence
context
in
this
class
because
this
is
actually
going
to
be
utilized
to
communicate
with
the
database.
So
we've
got
this
entity
manager
here
that
is
injected
in
what
the
persistence
context
and
basically,
what
it
is
going
to
do
is
it'll
be
used
to
communicate
with
the
database.
A
So
since
I
used
NetBeans
to
automatically
generate
this
most
of
the
entity,
may
your
is
abstracted
away
using
this
abstract
facade,
so
we
won't
worry
about
it,
but
just
know
that
when
I'm
in
this
class,
if
you
look
at
to
create
method,
for
instance,
if
I
call
upon
create
entity,
it's
automatically
calling
upon
the
entity
manager
and
persisting
this
this
entity
into
the
database,
so
lots
of
that
code
is
taken
away.
So
you
don't
have
to
worry
about
it.
A
A
So
this
is
what
happens
when
I
call
upon
it,
so
I
put
in
the
URL
into
my
browser
and
call
upon
roster,
and
it's
going
to
return
me
all
of
the
records
that
are
in
my
roster
database,
okay,
and
so
that's
all
the
find
all
method
does.
So
what
we
want
to
do
here
is
get
this
information
into
a
table.
Okay,
a
database
table
excuse
me
a
table
in
a
JSF
application
that
will
basically
show
the
data
that's
in
the
table.
A
A
So
I
can
put
this
roster
UI
service
in
its
own
container
as
well,
in
this
case
I'm
running
both
of
them
on
a
local
power
server,
but
they
could
be
in
their
own
container
if
you
wanted,
and
so
what
I
have
here,
I'm
going
to
first
show
you
how
to
create
this
communication
using
just
straight
JSF
I'm
not
going
to
be
bringing
in
any
special
libraries
here
for
this.
So
what
I
want
to
do
is
basically
get
to
the
final
result
of
this.
A
So
if
you
can
see
my
screen
here,
basically
what
I
am
showing
you
is
a
database
representation
on
screen.
Okay,
so
I'm
querying
that
restful
web
service
and
I'm
presenting
the
data
now
into
a
table
in
JSF.
So
the
way
I
did
that
here
is
in
my
index,
page
I
just
go
ahead
and
I've
got
this
data
table
created
and
this
data
table
what
it
does
is
they
called
upon
the
value
of
there's
a
roster
list
and
that
roster
list
is
contained
within
roster
controller.
Okay.
So
what
is
roster
controller?
So
roster
controller?
A
A
I
can
use
this
at
named
annotation
to
make
this
controller
available
to
my
front-end
via
the
expression
language.
Remember,
I
said
that
we
were
going
to
wire
this
together
using
expression
language.
So
when
I
looked
at
my
view,
I
can
call
straight
upon
roster
controller,
since
it's
got
the
add
named
injection.
This
is
also
view
scope.
So
this
isn't
the
old
JSF
view
scoped.
This
is
the
CDI
view
scope.
A
So,
if
we
look
here,
you
can
see
I'm
injecting
Java
acts
faces
view,
view
scope,
and
so
that
means
that
this
being
is
only
going
to
main
Payne
State
for
the
lifetime
of
the
view.
So
once
you
navigate
through
a
different
view,
the
state
is
lost.
Okay,
so
to
do
that,
I
have
to
make
this
serializable
excuse
me
serializable,
so
this
controller
can
be
serialized
and
persisted
to
disk
if
needed,
and
what
I
do
here
is
I
call
upon
this
post
construct
method.
When
this
view
is.
A
Visited
because
this
beam
is
going
to
be
instantiated
every
time
the
view
is
visited
and
post
construct
will
also
then
be
called
automatically.
What
am
I
doing
with
post
construct?
Well
I'm
populating
that
roster
list?
Okay,
so
like
I
said,
roster
list
is
just
a
list
of
the
roster
objects
and
I.
Think
I
did
step
a
little
too
fast
here,
because
I
didn't
show
you
what
roster
looks
like
so
as
I
showed.
A
You
remember
if
you
recall,
on
the
service,
I've
got
the
entity
class
of
roster
and
I
have
a
very
similar
class
here
in
my
JSF
front-end,
and
this
is
just
basically
a
plain
old
Java
object
and
I
also
include
this
XML
root
element
annotation,
which
allows
this
to
translate
to
XML
so
that
it
can
be
transported
back
and
forth.
Okay,
it's
also,
then
a
serializable
class
and
I
include
a
field
for
each
of
the
database
fields
or
entity
class
fields.
I
can
also
use
bean
validation
to
limit
the
size
or
control.
A
You
know
constrain
the
fields
as
I
need
to
do
in
my
application,
and
then
you
can
see
it's
just
basically
a
user's
access
or
methods.
There's
a
hash
code
equals
to
string
to
give
you
a
quick
tip.
If
you
want
to
use
a
Lombok
that
library
will
allow
you
to
get
rid
of
all
of
these
access
or
methods
altogether
and
setters,
you
can
get
rid
of
every
one
of
them.
You
can
get
rid
of
these
equals
and
hashcode
methods
and
to
string
as
well
and
basically
all
you'll
have
left
is
this.
A
It
looks
a
like
a
groovy
class
in
that
case,
if
you
use
lombok,
but
here
we're
doing
straight
Java.
So,
basically,
all
my
model
class
yeah
is
is
a
POJO
okay
and
it's
annotated
with
XML
Road
element.
Okay,
so
back
with,
in
my
view,
scoped
controller
I've
got
a
list
of
these
roster
objects
and
I
need
to
populate
that
using
the
restful
web
service.
So
how
do
I
do
that
so
I
use
that
jax-rs,
client?
A
Okay,
what
I
did
here
is
I
showed
you
a
little
tip
if
you're
going
to
be
calling
upon
a
restful
web
service.
Client
often
it
makes
sense
to
abstract
to
add
to
call
away
into
some
utility
class.
So
I
created
this
utility
class
here
that
not
it
holds
a
bunch
of
you
know
widely
used
common
utilities,
and
this
method
here
is
called
a
teen
client.
What
it
does
is.
It
accepts
a
client,
URI
and
a
client
service
name,
and
it
builds
this
client
and
it
goes
ahead
and
obtains
it
and
returns
the
resource.
A
A
Endpoint?
Okay?
So
what
it
does
is
it
this
will
get
you
to
the
point
where
it's
available.
You
know
this
is
your
application
with
the
service,
but
I
didn't
actually
put
a
service
name
at
the
end,
so
roster
is
not
there,
so
that
allows
me
to
use
this
URI
for
any
services
that
create
within
roster
service.
So
if
I
also
wanted
to
have
another
service
in
there,
you
know
maybe
called
teen
service
or
something
then
I
could
utilize.
A
This
restful
URI
for
any
of
those
services
and
right
here,
is
where
I
pass
roster
the
actual
end
point
URI.
So
when
that
client
is
built,
it
calls
upon
target
client,
URI
top
half,
and
then
it's
it's
taken
the
client
service
and
it's
going
to
return
that
web
target.
Okay.
So
then
what
I
do
is
I'm,
just
printing
the
target
out
to
the
the
command
line,
so
I
can
see
the
URI
and
what
I
do
is
I
set
the
roster
list
here.
So
how
I
do
that
as
I
call
upon
the
request?
A
A
There
you
go
now
and
I'm
just
getting
all
of
the
records
in
that
table.
Okay,
so
that's
not
very
interesting
I'm
getting
the
data.
So
what
about
adding
data?
Well,
that's
easy
enough
to
I
can
add
data
using
a
web
service
as
well.
So,
let's
just
add
a
new
record
of
test.
Well,
first
name
is
test
test
for
the
last
name
and
we'll
make
this
person
a
forward
and
I
can
add.
As
you
see,
that's
been
now
added
to
my
table.
So
how
does
that
happen?
A
What
that
means
is
it's
going
to
return
this
add
okay
since
I'm,
not
really
calling
upon
an
action
in
the
cd-I
beam
I'm,
just
returning
a
string,
that's
going
to
use
that
implicit
navigation
to
call
a
view
that
is,
and
so
when
I
pull
up
the
ad
view.
Basically,
what
you
can
see
is
it's
just
a
form
and
the
way
I
created
it.
I
utilized
a
panel
grid
to
provide
labels
and
input
fields
and
then
I
mapped
these
fields
to
a
current
variable
that
is
within
the
roster
controller.
Okay.
A
So
if
we
take
a
look
at
current,
what
is
current
current
is
just
a
roster
object.
Okay,
and
so,
when
I
call
upon
that
object,
it's
calling
get
current
and
if
get
current
is
null
it's
going
to
create
a
new
roster
object.
So
when
I
call
that
ad
and
I
show
it,
it
automatically
creates
a
new
roster
object
right
and
then
I
populate
that
on
the
screen
and
then
I
go
ahead
and
select
this
add
player
action.
Okay,
this
does
now
is
perform.
Another
restful
call
to
add
that
layer
to
the
database.
A
A
So
look
at
the
webservice
code
here
you
can
see
that
the
path
annotation
of
a
head
is
added
to
this
method.
That's
named
ad
okay,
and
this
accepts
a
couple
of
form
parameters.
Okay,
so
we
are
accepting
a
foreign
parameter
or
first
name
last
name
in
position,
and
basically
what
this
is
going
to
do
is
create
a
new
roster
object.
It's
going
to
set
the
date
and
it's
going
to
go
ahead
and
and
populate.
A
This
roster
object
accordingly
and
then
it's
going
to
utilize
that
and
the
manager
I
showed
you
to
create,
there's
a
roster
object
and
then
it's
just
going
to
return
a
response
to
the
client
to
let
it
know
if
it
was
successful
or
not.
So
if
I
go
back
to
my
code
now
for
ad
player,
you
can
see
here
in
my
CDI
beam
in
the
front
end.
A
What
I
am
doing
is
I'm,
creating
this
form
object
and
what
type
of
a
form
is
that
it
is
a
Java,
xws,
Rs,
core
form,
object
and
I'm,
going
to
set
it
up
passing
parameters,
so
I
named
the
first
parameter,
first
name,
second
parameter
last
name:
third
parameter
position
and
I'm
just
basically
pulling
out
the
different
fields
from
this.
Roster
object
that
populated
on
the
screen:
okay
and
then
what
I'm
doing
here
is
I'm.
A
Getting
this
invocation
builder
and
I'm,
setting
the
request
type
to
the
XML
and
then
I
post
the
entity,
and
what
I'm
posting
is.
This
form
object,
yeah
and
I'm
going
to
set
it
the
media
type
accordingly
and
I'm
going
to
be
looking
for
a
response
from
the
web
service
call,
and
if
the
response
is
okay
or
the
status
code
is
okay,
it's
going
to
go
ahead
and
add
that
player
to
the
database.
Okay,
if
it's
not,
then
I'm
supposed
to
return
a
message
that
says:
hey
that
didn't
work.
A
Okay,
so,
like
I,
show
before
in
the
front
end
here,
I
added
that
player
okay
and
we
can
do
the
same
thing
with
remove
so
I
want
to
remove
that
player.
So
I
click
that
button
and
basically
that
should
have
removed
the
player.
You
see
it's
if
I
refresh
the
screen
it's
removed
for
some
reason.
My
my
aged
action
working
correctly
on
this
remove
button.
I
didn't
take
the
time
to
figure
that
one
out
but
I'll
show
you
how
it
works.
A
So,
basically,
I've
got
this
remove
action
as
well
here
and
what
I
do
is
in
the
column
itself
here,
as
you
can
see
in
the
data
table,
I'm
iterating
over
each
of
the
entities
in
the
roster
list,
using
this
player
variable
okay.
So
when
I'm
listing
the
first
name
in
the
position
and
whatnot
I'm
showing
you
know,
player
dot,
position,
player
that
entered
a
player
dot
first
name,
so
that
allows
me
to
get
down
to
the
field
level
of
each
of
these.
A
You
know,
entities
in
the
list,
so
I
can
actually
pass
that
entity
to
the
remove
method
as
well
and
when
I
do
that.
I'm
saying
okay
I
want
to
remove
this
player,
okay,
so
the
way
that
that
happens
is
very
similarly
I'm
doing
a
different
kind
of
call
this
time.
Just
to
show
you
a
different
way
to
do
it.
There
are
various
different
ways
to
you
know:
work
with
the
restful
web
service.
You
could
use
a
form
object.
Like
I
showed
you
with
the
ad.
A
You
can
also
utilize
some
of
the
methods
that
are
inherently
there
by
default.
So
in
this
case,
that's
what
I'm
doing
I'm
passing
this,
the
ID
of
this
roster
player
and
then
I'm
going
to
call
upon
the
request,
delete
method.
What
that's
going
to
do
is
in
the
restful
Webster
to
call
upon
this
delete
method
method
in
the
class
that
is
annotated
by
at
delete
and,
as
you
can
see,
that
method
accepts
an
ID
and
then
it
just
goes
ahead
and
uses
that
nd
manager
to
remove
that
object.
A
Okay,
so
that's
basically
all
it
does
so
the
front
end,
then,
by
clicking
remove,
is
able
to
remove
that
player,
and
then
you
can
see
what
it
does.
Is
it
just
sets
the
roster
list
null
and
populate
the
roster
list
so
that
next
time
you
query
that
list
it
is
available
and
it
is
showing
the
the
true
list
with
the
removed
player
now.
My
code
here
is
supposed
to
use,
is
a
page
ax
event
to
clear
and
to
refresh
that
list,
but
it's
not
working
for
some
reason.
A
That's
okay,
though,
because
I
created
a
nicer
front-end,
that's
showing
you
how
to
do
just
straight
JSF
and
that's
all
nice
and
well
and
good
most
of
our
applications.
Nowadays
we
want
to
utilize
more
crisp
front-end,
which
provides
you
must
move
much
more
robust
actions
and
capabilities
so
that
the
users
have
a
better
experience.
So
one
of
the
libraries
of
alia
I
like
to
utilize,
is
called
primefaces
I'm.
Sure
many
of
you
watching
this
presentation
are
familiar
with
primefaces
and
so
primefaces
basically
allows
you
to
create
the
same
type
of
pages.
A
You
would
do
using
a
standard,
JSF
front-end.
However,
it
uses
its
own
custom
components
which
contain
lots
more
functionality.
So
in
this
case,
if
I
go
to
this
prime
index
page,
basically
it's
going
to
do
the
same
thing
with
respect
to
the
table
I'm
using
primefaces
data
table.
Instead,
though,
so,
if
you
look
here
at
the
top
I'm
getting
this
namespace
signing
it
to
the
P,
prefix,
primefaces,
org,
UI
and
so
I
can
use.
A
P
data
table
and
I
can
call
upon
and
get
that
same
roster
list,
and
something
I
really
like
about
Brian
faces
is
that
their
data
tables
are
very
powerful.
You
get
sorting
by
default,
you
get,
you
know,
drag
and
drop
those
columns
into
the
order
you
like
them.
Almost
you
know
an
unlimited
number
of
you
know
functional
options
available
for
you
in
the
data
table.
A
It
is
really
a
robust
component
and
one
of
those
nice
features
that
just
is
given
to
you
is
that,
instead
of
creating
a
facet
for
the
Heather
I,
just
passed
Heather
text-
if
you
look
back
here
at
the
way,
I
had
to
create
the
initial
table
with
Jaya
step,
I
had
to
just
use
this
column
name,
every
column
had
to
have
this
facet
for
the
Heather
I.
Don't
need
that
with
the
primefaces
I
just
pass
Heather
text,
okay
same
thing,
and
so
let
me
show
you
what
this
looks
like.
A
This
is
prime
index,
it's
not
too
much
better,
but
there
are
a
few
things
that
gives
you.
As
you
can
see.
Every
other
row
is
colored
shaded
a
little
bit
differently.
So
then
it
makes
it
a
little
easier
on
the
eyes.
Okay
and
basically
I've
got
the
same
functionality
built
out.
But
what
I've
done
here
with
the
add,
as
I
I've
used
this
dialog
instead,
which
provides
you
a
nice
pop
up
and
basically
the
same
functionality
here
so
I'm
going
to
do
that.
A
I'm
going
to
add
this
and
you
can
see
wallah
I
player
successfully
added
it
refreshes
the
screen
nicely,
and
this
has
done
in
the
quote.
The
code
by
just
using
this
command
button,
all
command
buttons
in
primefaces
automatically
use
Ajax.
So
if
you
don't
want
to
use
Ajax,
you
can
actually
put
the
attribute
Ajax
tinkles
false
on
those
objects,
but
by
using
Ajax
I'm
going
to
make
you
know
not
submit
the
page.
It's
just
going
to
you
know
it's
not
going
to
automatically
refresh
the
page
like
it
would
do
for
a
regular
JSF
component.
A
It's
just
going
to
utilize
action
listeners.
So,
in
this
case,
what
I'm
doing,
though,
with
the
ad
player
button
is
I'm,
calling
this
managed
dialogue
I'm
going
to
show
it
so
manage?
Dialogue
is
just
a
dialogue
component
and
really
all
it
does.
Is
it
has
this
form
inside
of
it
and,
as
you
saw
in
the
add
form,
I
showed
you
earlier.
A
It's
just
using
a
panel
grid
with
labels,
input
text
for
getting
their
Oster
generated,
and
then
I've
got
a
couple
of
buttons
here
on
the
on
the
end,
so
the
add
player
button,
it
basically
is
going
to
do
the
same
thing.
I'm
going
to
call
upon
this
method,
which
calls
the
restful
web
service,
creates
this
form
and
they
will
post
it
and,
and
that's
basically
what
I'm
doing
for
that.
A
If
I
wanted
to
update
the
player,
I
can
also
do
that
from
within
this
view,
so
you
can
see
I
had
this
manage
button,
so
let's
say
I
want
to
manage
that
player
when
I
call
upon
that
manage
button.
Basically,
what
that
is
doing.
If
I
go
back
to
the
prime
index,
it
is
calling
manage
the
method
managing
the
roster
controller
and
passing
this
current
entity.
A
Okay,
so
all
managed
does
is
sets
the
current
player
equal
to
the
player
that
you
selected
really
and
and
then
it
goes
ahead,
and
it
shows
that
managed
form
again
and
that's
populated
with
the
current
player.
Okay.
So
now,
if
I
wanted
to
take
this
in,
say
last
name
instead
and
update
it,
it's
going
to
update
that
last
name.
The
way
that
there
is
happening
is
via
the
jax-rs
again.
So
if
I
go
back
to
the
dialogue
and
then
I
look
at
this
update
player.
A
Basically,
what
I'm
doing
here
is
I'm
calling
upon
the
same
web
service.
This
time,
I
am
passing
the
ID
again
here
and
but
instead
of
calling,
you
know
that
delete
I'm
calling
put
so
this
will
automatically
call
the
web
service
method,
which
will
edit
or
update
that
object,
and
what
I'm
doing
here
is
I'm
passing
this
entity,
which
is
the
current
roster
player
of
the
current
player
in
XML
format.
A
So
let's
look
at
that
service
as
being
called,
so
this
is
going
to
call
upon
this
here,
okay
and
it's
going
to
check
to
see
if
the
entity
I'm
passing
has
a
player
in
it.
If
it's
actually
populated,
if
it's
not
it's,
going
to
return
a
400
response,
otherwise
it's
going
to
edit
that
current
object
accordingly
and
then
it's
going
to
return
a
response
of
okay,
all
right.
A
This
widget
allows
me
to
add
a
header
of
confirmation
and
it's
going
to
ask
if
you're
sure
you
wish
to
room
that
player
and
then,
if
I
go
ahead
and
click.
Yes,
it's
going
to
call
upon
that
actionlistener.
One
more
thing:
I
need,
in
my
view,
in
order
to
call
this
P
confirm
is
I
need
to
have
the
confirmed
dialog.
So
this
actually
constructs
the
dialog
that
pops
up
when
I
click
remove
okay,
and
so
you
can
add
as
many
command
buttons
as
you'd
like
to
it.
A
So
that's
that's,
basically
how
my
short
little
demo
is
going
to
work
for
you
to
call
upon
these
web
services
and
communicate
with
your
JSF
front-end,
and
your
restful
back-end
now
I
want
to
mention
and
I
want
to
stress
that
you
should
not
leave
your
web
services
wide
open,
I
really!
This
is
a
this
is
just
for
demo
purposes.
What
we
really
want
to
be
doing
here
is
each
of
these
methods
that
can
go
ahead
and
change
something
we
want
to
be
annotating
this
with
some
kind
of
a
token.
A
We
want
to
require
an
authentication
token
it's
in
order
to
make
this
thing
work.
So
basically,
what
it's
going
to
check
is
to
verify
that
the
person
is
authenticated
into
the
database
or
into
the
application
accordingly,
and
they
have
the
correct
roles
before
it
will.
You
know
execute
that
restful
web
service
call
I,
don't
have
the
JWT
setup
for
this
basic
application,
but
it
is
very
easy
to
do
and
I'll
talk
a
little
bit
more
about
that
in
just
a
minute.
A
A
But
I'm
not
sure,
but
I
can
actually
ask
any
questions
or
not,
but
what
I'll
do
is
I'll
go
through
the
chat
at
the
very
end
that
will
make
it
a
little
bit
easier
and
I'll
put
my
picture
on
screen
so
you're,
not
just
looking
at
my
the
chat
window
on
my
screen.
So
let's
get
back
to
the
presentation
here
so
I
showed
you,
the
communication
demo
and,
like
I,
said
when
you're
writing
or
modifying
data.
A
You
want
to
utilize
a
web
service
that
has
annotation
of
put
or
posts
on
it
and,
like
I
said,
like
I
showed
you
what
the
add
method.
We
are
adding
data
in
this
case
using
form
parameters.
So
basically
it
will
accept
strings
from
your
web
form
and
then
it
will
create
an
entity
and
then
call
upon
that
energy
manager
to
create
that
object
and
return
a
response,
and
then,
in
this
case
here
with
the
edit
or
the
update
or
modify.
However
you'd
like
to
call
it.
A
We
have
this
method
annotated
with
put
and
I'm,
basically
passing
the
ID
of
the
entity,
and
what
this
is
going
to
do
is
just
check
to
make
sure
that
this
thing
is
populated
and
then
it's
going
to
go
ahead
and
edit
it
accordingly.
In
return
response
and
I
showed
you
the
demo
for
that
already
as
well,
and
one
thing
that
you
can
also
do
which
I've
done
for
some
of
my
applications
is.
You
can
utilize
this
@
name
stored
procedure,
annotation
and
in
entity
class
within
the
restful
web
service.
A
If
you
want
to
call
upon
a
database
stored
procedure,
excuse
me
so
this
this
is
sometimes
useful.
If
you
want
to
invoke
some
kind
of
a
database
functionality
that
would
allow
the
database
to
go
ahead
and
perform
custom
trigger,
or
you
know,
procedure
that
may
populate
a
couple
of
different
tables
and
return,
a
response,
and
you
know-
or
maybe
it
even
works
with
an
underlying
view.
A
Somehow,
anyway,
of
what
you
can
do
is
you
can
actually
hook
up
your
JSF
front-end
to
invoke
a
action
in
your
restful
web
service
in
the
same
manner,
but
call
upon
this
name
storage
procedure,
and
it
will
invoke
the
database
functionality,
that's
in
the
procedure,
so
that
is
a
useful
thing
to
know
about
as
well
like
I
had
mentioned
you're
going
to
want
to
secure
your
services,
this
demo
really
didn't
show
any
insecurities.
What
we
want
to
do
is
probably
use
something
like
a
loss
or
LDAP
to
require
authentication
into
our
application.
A
A
If
you
wanted
to
work
with
this
JWT
solution
or
you
can
utilize
something
like
the
micro
profile
JWT
solution
which
will
allow
you
to
utilize
the
annotations
of
what
not
to
pass
tokens
around
now,
there's
really
a
lot
of
different
ways
to
go
about
it.
Most
of
the
applications,
I've
written
utilize,
a
homegrown
JSON
web
token.
A
Jwt
was
around
I,
really
would
recommend
looking
at
micro
profile,
JSON
web
tokens.
If
you
wanted
to
secure
your
restful
endpoints,
but
it's
with
something
and
it's
really
straight
out
of
the
box
as
long
as
you're
using
OAuth
or
something
similar.
It
allows
you
to
easily
secure
your
web
services
and,
like
I,
said,
there's
dozens
of
libraries
out
there
all
ready
to
go.
So
you
know
if
you've
been
a
JSF
developer
for
years,
and
you
want
to
start
using
this,
it's
easy
to
get
going
if
you've
never
used
JSF.
A
Thousands
of
components
probably
are
available
for
yearly
use
now,
because
JSF
has
been
around
for
years,
and
these
can
all
be
used
in
the
same
way
as
I
showed
you
today
with
the
prime
basis
front-end,
you
can
even
hook
up
templates
to
make
this
thing
reactive
so
that
it
will
also
scale
to
a
mobile
screen.
Just
the
same,
and
so
prime
faces
in
particular
provides
many
different
templates
that
allow
you
know
for
a
nice
mobile
screen
as
well
as
desktop.
A
A
So
I
mentioned
at
the
top
that
I
am
a
member
of
a
couple
of
different
Popkin
podcasts,
a
member
of
the
pub
house
podcast
network
I
particularly
do
the
AVI,
podcast
and
stacked
podcast.
So
you
know
you
can
always
tune
in
to
those
podcasts
and
listen
in
we've
always
got
new
things
to
talk
about
each
month.
I
also
did
want
to
take
a
quick
moment
and
just
dedicate
this
presentation
today
to
those
who
have
been
victims
of
covert
19.
You
know
this
is
a
pandemic.
A
That's
it's
plagued
the
world
and
we're
all
suffering
from
it,
but
in
my
case,
I'm
very
grateful
to
have
the
ability
to
work
from
home
and
be
able
to
share.
You
know
now
is
with
you
over
the
internet.
We
are.
We
have
so
many
resources
available
to
us
nowadays,
we're
very
lucky
to
be
able
to
do
this
in
this
day
and
age.
I
want
to
just
dedicate
this
to
the
people
who
are
sick
and
and
not
doing
well,
with
covert
19,
and
particularly
those
members
of
the
java
community.
A
A
A
So
we
seem
to
have
gotten
a
question:
I
saw
you
use
the
EJB
as
a
rest
component.
Architectural
II
is
that
okay
and
that's
perfectly
okay
and
actually
I,
still
utilize,
EJ
peas
and
lots
of
my
single
war
file.
Applications.
Uj
peas
are
perfectly
viable
option
for
utilizing
nowadays,
so
yeah
I
think
architectural
II,
that's
okay,.
A
All
right,
so,
if
there's
no
more
questions,
I
think
we'll
call
that
a
day.
Thank
you
so
much
Josh
for
presenting
your
presentation
to
us
today
and
you
can
find
all
the
files
and
code
that
Josh
presented
on
their
social
media
and
thank
you.
Everyone
for
coming
out
have
a
great
day
thanks.
Everyone
I
appreciate
it.
Thank
You
Josh.