SlideShare a Scribd company logo
1 of 33
25+ Reasons to use OmniFaces in JSF applications
Anghel Leonard
What we will cover ? (I)
• Enable restorable view
• Loading CDN resources
• Loading images as stream/byte array
• OmniFaces converters
• OmniFaces validators
• OmniFaces server-side Cache
• Defer JavaScript loading
• Preserve view/request parameters on post-back
• Execute JSF AJAX request via JavaScript method call
• OmniFaces tree hierarchy
• OmniFaces stateless ViewParam
• Full AJAX exception handler
• Highlight invalid inputs
• OmniFaces boosted messages
What we will cover ? (II)
• Eagerly instantiate scoped beans
• OmniFaces PartialViewContext
• OmniFaces events for Invoke Application
• Auto-generated JSF component IDs
• Extensionless URLs
• Import constants
• Import functions
• Combined resource handler
• Unmapped resource handler
• Injecting cookies and context params
• OmniFaces filters
• OmniFaces ViewScope
• OmniFaces utilities methods
• OmniFaces utilities functions
What is OmniFaces ?
• Well, if this is the first time when you hear about OmniFaces then you have to know
that OmniFaces is a utility library for JSF and a comprehensive compendium of
programming techniques, design patterns and recipes for JSF developers.
• Read before: Introduction to OmniFaces by Anghel Leonard
Enable restorable view
Your application works like a charm, but ViewExpiredException spoil all the
satisfaction ?
OmniFaces fix this problem via a custom tag handler that instructs the view
handler to recreate the entire view whenever the view has been expired. So,
check how easy is to get rid of this exception using
<o:enableRestorableView>.
Loading CDN resources
If you want to use <h:outputScript> and <h:outputStylesheet> to
load external resources from CDNs (e.g. Google Hosted Libraries), then
you know that this is not possible in default JSF ?
OmniFaces comes with the solution via a custom resource handler, named
CDNResourceHandler. This will simply allows you to load resources from
CDNs via <h:outputScript> and <h:outputStylesheet>.
Loading images as stream/byte array
You need to render images that comes as InputStream or byte[] ?
You want to render them as data URI or load SVG files?
OmniFaces provides the <o:graphicImage>, which is an extension of the
<h:graphicImage> dedicated to render JSF resource as data URI,
InputStream/byte[] property as resource, InputStream
/byte[] property as data URI, etc. Just check the OmniFaces Showcase.
OmniFaces converters
JSF custom converters are time consuming, they are called at every request
regardless of whether the submitted value has changed or not, or they need to
do the job based on possibly expensive service/DAO operations, etc.
Just if you read the names of converters provides out of the box by OmniFaces,
you will take into account to check them at your first need to write a custom
converter:
GenericEnumConverter
ListConverter
ListIndexConverter
SelectItemsConverter
SelectItemsIndexConverter
ValueChangeConverter
Read further: OmniFaces Converters by Constantin Alin
OmniFaces validators
Components validation is interdependent ? Need special custom validators to:
- validate if ONLY ONE of the given UIInput components have been filled out ?
- validate if ALL of the given UIInput components have been filled out ?
- validate if ALL of the given UIInput components have the same value ?
- validate if ONLY ONE of the given UIInput components has been filled out or
that NONE of the given UIInput components have been filled out ?
…
If you answered yes, or you think of some other case, then OmniFaces has
a set of 14 special custom validators.
Read further: OmniFaces Validators by Anghel Leonard
OmniFaces server-side Cache
Your page source code contains a lot of markup ? Well, the Render Response
phase is the most time consuming JSF phase, especially in cases when the
rendered markup is consistent.
You can speed up this process with a snap of a finger via the OmniFaces
Cache component. Caching markup will boost the Render Response phase
(check some tests here). The examples provided by OmniFaces Showcase are
very clear and well explained.
Read further: Test OmniFaces Cache for Render Response Phase by Anghel Leonard
Defer JavaScript loading
I know a trendy topic: deferred scripts. I'm pretty sure that you heard about
placing the scripts at the end of </body>, use defer="true“ or async=
"true", but I'm not so sure that you know that these approaches are not really
working as expected.
The OmniFaces, <o:deferredScript> defers the loading of the given script
resource to the window load event (the given script resource is only loaded
when the window is really finished with loading).
Preserve view/request
parameters on post-back
As you know, when we submit JSF forms we simply cannot preserve
view or request parameters in the request URL.
Well, OmniFaces fixes this issue via Form (<o:form>) component, which
extends the standard <h:form> and provides a way to keep view or request
parameters in the request URL after a post-back and offers in combination with
the <o:ignoreValidationFailed> tag on an UICommand component the
possibility to ignore validation failures so that the invoke action phase will be
executed anyway.
Execute JSF AJAX request via
JavaScript method call
As an end-user you may want to execute a JSF AJAX request via a
JavaScript function call. Well, OmniFaces provides the CommandScript
component exactly for this purpose.
The <o:commandScript> is a component based on the standard
<h:commandXxx> which generates a JavaScript function in the global
JavaScript scope which allows the end-user to execute a JSF AJAX request
by just a function call functionName() in the JavaScript context.
OmniFaces tree hierarchy
OmniFaces comes with Tree component.
The <o:tree> allows the developers to have full control over the markup
of a tree hierarchy by declaring the appropriate JSF components or HTML
elements in the markup. The <o:tree> does namely not render any
HTML markup by itself.
Beside the OmniFaces Showcase, you can check some examples here:
Use OmniFaces Tree to render JSON
Expose a path as an OmniFaces tree (<o:tree>)
Building dynamic responsive multi-level menus with plain HTML and OmniFaces
OmniFaces stateless ViewParam
The JSF built-in <f:viewParam> is a stateful artifact. This causes major
issues as Arjan Tijms points on his blog. OmniFaces, comes with a
stateless ViewParam component.
The <o:viewParam> is a component that extends the standard
<f:viewParam> and provides a stateless mode of operation and fixes
the issue wherein null model values are converted to empty string
parameters in query string (e.g. when includeViewParams=true) and
the (bean) validation never being triggered when the parameter is
completely absent in query string, causing e.g. @NotNull to fail.
Full AJAX exception handler
By default, most of AJAX exceptions are invisible to the client. They are
returned to the client, but unfortunately JSF AJAX clients aren't prepared to
deal with arbitrary error messages, so they simply ignore them. But a custom
exception handler is specially created for this task by OmniFaces.
The handler is named FullAjaxExceptionHandler, and the factory is
named FullAjaxExceptionHandlerFactory. This will give to your
AJAX based applications a real boost, because your end users would know
if their actions was successfully performed or not.
Highlight invalid inputs
Beside validation messages, you simply want to highlight the invalid inputs of
a form via some CSS ?
The OmniFaces, <o:highlight> is a helper component which highlights
all invalid UIInput components and the associated labels by adding an
error style class to them. Additionally, it by default focuses the first invalid
UIInput component.
OmniFaces boosted messages
Working with <h:message> and <h:messages> has several important
limitations.
OmniFaces, comes with <o:messages>, which allows us to
specify multiple client IDs space separated in the for attribute, show a single
custom message whenever the component has received any faces message,
HTML escaping and messages iteration markup control.
Eagerly instantiate scoped beans
CDI managed beans doesn’t have the ability to eagerly instantiate application
scoped beans.
OmniFaces fills this void and even goes one step further by
introducing the @Eager annotation that can be applied to @RequestScoped,
@ViewScoped, @SessionScoped and @ApplicationScoped beans.
This causes these beans to be instantiated automatically at the start of each
such scope instead of on demand when a bean is first referenced.
OmniFaces PartialViewContext
Do you need to:
• Execute callback scripts by
PartialResponseWriterstartEval() ?
• Add arguments to AJAX response ?
• Prevents errors about malformed XML caused by tags which
Mojarra and MyFaces has left open after an exception in rendering
of an already committed AJAX response ?
• Fix the no-feedback problem when a ViewExpiredException
occurs during an AJAX request on a page which is restricted by
web.xml <security-constraint> ?
Then you need the OmniFaces, OmniPartialViewContext.
OmniFaces events for Invoke Application
JSF comes with a considerable number of events, but none of them is related
to Invoke Application phase.
OmniFaces fills this void with the InvokeActionEventListener which add
support for the new <f:event> types: preInvokeAction and
postInvokeAction. Those events are published during the beforephase and
afterphase of INVOKE_APPLICATION respectively. This actually offers a better
hook on invoking actions after the <f:viewParam> values been set than the
preRenderView event.
Starting with OmniFaces 2.2, any component will support these two events.
Auto-generated JSF component IDs
As you know, JSF will provide auto-generated IDs for each component
that doesn’t have an explicit ID.
OmniFaces has an view handler, NoAutoGeneratedIdViewHandler
which inspects the rendered output and signal via an
llegalStateException whenever an automatically generated JSF
component ID (j_id...) is encountered in the rendered output.
Extensionless URLs
Do you find the presence of the extension (e.g. .xhtml) inappropriate in
the URL ?
Well, OmniFaces comes with FacesViews, which is a
mechanism to use SEO-friendly extensionless URLs in a JSF
application without the need to enlist individual Facelet source files in
some configuration file.
Instead, Facelets source files can be put into either the special /WEB-
INF/faces-views directory, from where they will be automatically scanned
(no configuration whatsoever required) or an explicit directory can be
configured to be scanned. The web app root is supported as well.
Import constants
By default, constant field values cannot be use in JSF pages.
Well, OmniFaces provides the ImportConstants tag handler that allows
the developer to have a mapping of all constant field values of the given
fully qualified name of a type in the request scope (e.g. declared as,
public static final).
Import functions
By default, functions that are not registered in .taglib.xml file cannot be
use in JSF pages.
Well, OmniFaces comes with the ImportFunctions tag handler which allows
developers to have access to all functions of the given fully qualified name of a
type in the Facelet scope using the usual EL functions syntax without the need
to register them in .taglib.xml file. The functions are those public
static methods with a non-void return type.
Combined resource handler
As you know, for each resource (CSS and JS) we have a separate request.
OmniFaces seriously improve the page loading speed via the
CombinedResourceHandler resource handler.
This will remove all separate script and stylesheet resources which have the
target Attributeset to head from the UIViewRoot and create a combined
one for all scripts and another combined one for all stylesheets.
Unmapped resource handler
When we need to reference relative URLs to images in CSS files we can use
the #{resource} EL expression in images paths. This issue is solved by
OmniFaces via the UnmappedResourceHandler.
This implementation allows the developer to map JSF resources on an URL
pattern of /javax.faces.resource/* without the need for an additional
FacesServlet prefix or suffix URL pattern in the default produced resource
URLs.
Injecting cookies and context params
Need quick access to information stored in cookies and context
parameters ? Preferably via CDI injection ?
Well, OmniFaces provides @Cookie annotation for injecting cookie
data and @ContextParam annotation for injecting context parameters
(the later is available starting with OmniFaces 2.2).
OmniFaces filters
OmniFaces comes with several filters, as follows:
• CacheControlFilter - controls the cache-related headers of
the response
• CharacterEncodingFilter - set the request body character
encoding when not already set by the client
• FacesExceptionFilter - solve 2 problems with exceptions
thrown in JSF methods: Mojarra's FacesFileNotFoundException
needs to be interpreted as 404 and root cause needs to be
unwrapped from FacesException and ELException to utilize
standard Servlet API error page handling.
• GzipResponseFilter - will apply GZIP compression on
responses whenever applicable
• HttpFilter - abstract filter specifically for HTTP requests
OmniFaces ViewScope
OmniFaces comes with a view scope that can be used in JSF 2.0/2.1.
Starting with JSF 2.2, we can use the built-in view scope, but, if we need to
immediately destroy @ViewScoped bean when browser window is unloaded
/closed then we need to come back to OmniFaces solution.
Starting with OmniFaces 2.2, the view scope was improved to immediately
destroy @ViewScoped on a GET navigation, or a close of browser tab
/window. These features are not supported by JSF 2.2.
OmniFaces utilities methods
OmniFaces comes with 300+ utilities methods that are available in
org.omnifaces.util package. We have utility methods based on JSF API
for AJAX, CDI Beans, messages, faces, events, callbacks, renderers, etc.
Most of them are useful to obtain a less verbose code, much easy to
understand, others provides hidden functionalities or simply comes with new
functionalities that are not easy to be achieved in JSF.
Read further: OmniFaces Utilities ZEEF Page by Anghel Leonard
OmniFaces utilities functions
OmniFaces comes with a comprehensive set of utilities functions in
org.omnifaces.el.functions package. These functions allows us to
easy manipulate objects, strings, arrays, dates, numbers, etc directly in page
via EL.
Read further: OmniFaces Utilities ZEEF Page by Anghel Leonard
References
• Bauke Scholtz - http://balusc.omnifaces.org/
• Arjan Tijms - http://arjan-tijms.omnifaces.org/
• JSF ZEEF page - https://jsf.zeef.com/bauke.scholtz
• OmniFaces ZEEF page - https://omnifaces.zeef.com/bauke.scholtz
• OmniFaces Wikipedia - http://en.wikipedia.org/wiki/OmniFaces

More Related Content

What's hot

Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSam Brannen
 
Spring Framework - AOP
Spring Framework - AOPSpring Framework - AOP
Spring Framework - AOPDzmitry Naskou
 
JCConf 2021 - Java17: The Next LTS
JCConf 2021 - Java17: The Next LTSJCConf 2021 - Java17: The Next LTS
JCConf 2021 - Java17: The Next LTSJoseph Kuo
 
RabbitMQ vs Apache Kafka Part II Webinar
RabbitMQ vs Apache Kafka Part II WebinarRabbitMQ vs Apache Kafka Part II Webinar
RabbitMQ vs Apache Kafka Part II WebinarErlang Solutions
 
Intro To Mongo Db
Intro To Mongo DbIntro To Mongo Db
Intro To Mongo Dbchriskite
 
Atomicity In Redis: Thomas Hunter
Atomicity In Redis: Thomas HunterAtomicity In Redis: Thomas Hunter
Atomicity In Redis: Thomas HunterRedis Labs
 
SMC304 Serverless Orchestration with AWS Step Functions
SMC304 Serverless Orchestration with AWS Step FunctionsSMC304 Serverless Orchestration with AWS Step Functions
SMC304 Serverless Orchestration with AWS Step FunctionsAmazon Web Services
 
Real Life Clean Architecture
Real Life Clean ArchitectureReal Life Clean Architecture
Real Life Clean ArchitectureMattia Battiston
 
Event Sourcing, Stream Processing and Serverless (Benjamin Stopford, Confluen...
Event Sourcing, Stream Processing and Serverless (Benjamin Stopford, Confluen...Event Sourcing, Stream Processing and Serverless (Benjamin Stopford, Confluen...
Event Sourcing, Stream Processing and Serverless (Benjamin Stopford, Confluen...confluent
 
What is context? How to use context in Odoo by weblearns
What is context? How to use context in Odoo by weblearnsWhat is context? How to use context in Odoo by weblearns
What is context? How to use context in Odoo by weblearnsWeb Learns
 
Rapise Overview Presentation
Rapise Overview PresentationRapise Overview Presentation
Rapise Overview PresentationAdam Sandman
 
MVC ppt presentation
MVC ppt presentationMVC ppt presentation
MVC ppt presentationBhavin Shah
 
Getting Started with Amazon Database Migration Service
Getting Started with Amazon Database Migration ServiceGetting Started with Amazon Database Migration Service
Getting Started with Amazon Database Migration ServiceAmazon Web Services
 
Flexible and Real-Time Stream Processing with Apache Flink
Flexible and Real-Time Stream Processing with Apache FlinkFlexible and Real-Time Stream Processing with Apache Flink
Flexible and Real-Time Stream Processing with Apache FlinkDataWorks Summit
 
An introduction to Microservices
An introduction to MicroservicesAn introduction to Microservices
An introduction to MicroservicesCisco DevNet
 
Difference between ActionResult() and ViewResult()
Difference between ActionResult() and ViewResult()Difference between ActionResult() and ViewResult()
Difference between ActionResult() and ViewResult()Umar Ali
 

What's hot (20)

Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. REST
 
Spring Framework - AOP
Spring Framework - AOPSpring Framework - AOP
Spring Framework - AOP
 
JCConf 2021 - Java17: The Next LTS
JCConf 2021 - Java17: The Next LTSJCConf 2021 - Java17: The Next LTS
JCConf 2021 - Java17: The Next LTS
 
RabbitMQ vs Apache Kafka Part II Webinar
RabbitMQ vs Apache Kafka Part II WebinarRabbitMQ vs Apache Kafka Part II Webinar
RabbitMQ vs Apache Kafka Part II Webinar
 
Intro To Mongo Db
Intro To Mongo DbIntro To Mongo Db
Intro To Mongo Db
 
SRV410 Deep Dive on AWS Batch
SRV410 Deep Dive on AWS BatchSRV410 Deep Dive on AWS Batch
SRV410 Deep Dive on AWS Batch
 
Atomicity In Redis: Thomas Hunter
Atomicity In Redis: Thomas HunterAtomicity In Redis: Thomas Hunter
Atomicity In Redis: Thomas Hunter
 
SMC304 Serverless Orchestration with AWS Step Functions
SMC304 Serverless Orchestration with AWS Step FunctionsSMC304 Serverless Orchestration with AWS Step Functions
SMC304 Serverless Orchestration with AWS Step Functions
 
Real Life Clean Architecture
Real Life Clean ArchitectureReal Life Clean Architecture
Real Life Clean Architecture
 
Event Sourcing, Stream Processing and Serverless (Benjamin Stopford, Confluen...
Event Sourcing, Stream Processing and Serverless (Benjamin Stopford, Confluen...Event Sourcing, Stream Processing and Serverless (Benjamin Stopford, Confluen...
Event Sourcing, Stream Processing and Serverless (Benjamin Stopford, Confluen...
 
EJB3 Basics
EJB3 BasicsEJB3 Basics
EJB3 Basics
 
Pydata-Python tools for webscraping
Pydata-Python tools for webscrapingPydata-Python tools for webscraping
Pydata-Python tools for webscraping
 
What is context? How to use context in Odoo by weblearns
What is context? How to use context in Odoo by weblearnsWhat is context? How to use context in Odoo by weblearns
What is context? How to use context in Odoo by weblearns
 
Rapise Overview Presentation
Rapise Overview PresentationRapise Overview Presentation
Rapise Overview Presentation
 
Laravel ppt
Laravel pptLaravel ppt
Laravel ppt
 
MVC ppt presentation
MVC ppt presentationMVC ppt presentation
MVC ppt presentation
 
Getting Started with Amazon Database Migration Service
Getting Started with Amazon Database Migration ServiceGetting Started with Amazon Database Migration Service
Getting Started with Amazon Database Migration Service
 
Flexible and Real-Time Stream Processing with Apache Flink
Flexible and Real-Time Stream Processing with Apache FlinkFlexible and Real-Time Stream Processing with Apache Flink
Flexible and Real-Time Stream Processing with Apache Flink
 
An introduction to Microservices
An introduction to MicroservicesAn introduction to Microservices
An introduction to Microservices
 
Difference between ActionResult() and ViewResult()
Difference between ActionResult() and ViewResult()Difference between ActionResult() and ViewResult()
Difference between ActionResult() and ViewResult()
 

Viewers also liked

Viewers also liked (17)

JSF Design Patterns
JSF Design PatternsJSF Design Patterns
JSF Design Patterns
 
Mastering OmniFaces - A Problem to Solution Approach
Mastering OmniFaces - A Problem to Solution ApproachMastering OmniFaces - A Problem to Solution Approach
Mastering OmniFaces - A Problem to Solution Approach
 
Practica 2
Practica 2Practica 2
Practica 2
 
PIUSS - Case History
PIUSS - Case HistoryPIUSS - Case History
PIUSS - Case History
 
Sorrow Magazine
Sorrow MagazineSorrow Magazine
Sorrow Magazine
 
детская презентация
детская презентациядетская презентация
детская презентация
 
Nepal earthquake
Nepal earthquakeNepal earthquake
Nepal earthquake
 
งานอังกฤษ
งานอังกฤษงานอังกฤษ
งานอังกฤษ
 
CarolinaCon Presentation on Streaming Analytics
CarolinaCon Presentation on Streaming AnalyticsCarolinaCon Presentation on Streaming Analytics
CarolinaCon Presentation on Streaming Analytics
 
Ejercicios de klapp
Ejercicios de klappEjercicios de klapp
Ejercicios de klapp
 
Tutorial Eclipse 3
Tutorial Eclipse 3Tutorial Eclipse 3
Tutorial Eclipse 3
 
Standards
StandardsStandards
Standards
 
DSS-Literally Litter Free
DSS-Literally Litter Free DSS-Literally Litter Free
DSS-Literally Litter Free
 
Pres professional gaming ipeek foundation pdf
Pres professional gaming ipeek foundation pdfPres professional gaming ipeek foundation pdf
Pres professional gaming ipeek foundation pdf
 
Ishak 009
Ishak 009Ishak 009
Ishak 009
 
Practicas 11 a 15
Practicas 11 a 15Practicas 11 a 15
Practicas 11 a 15
 
Instrumentos y herramientas
Instrumentos y herramientasInstrumentos y herramientas
Instrumentos y herramientas
 

Similar to 25+ Reasons to use OmniFaces in JSF applications

Javascript-heavy Salesforce Applications
Javascript-heavy Salesforce ApplicationsJavascript-heavy Salesforce Applications
Javascript-heavy Salesforce ApplicationsSalesforce Developers
 
SoCal Code Camp 2011 - ASP.NET MVC 4
SoCal Code Camp 2011 - ASP.NET MVC 4SoCal Code Camp 2011 - ASP.NET MVC 4
SoCal Code Camp 2011 - ASP.NET MVC 4Jon Galloway
 
C sharp and asp.net interview questions
C sharp and asp.net interview questionsC sharp and asp.net interview questions
C sharp and asp.net interview questionsAkhil Mittal
 
Using Ajax In Domino Web Applications
Using Ajax In Domino Web ApplicationsUsing Ajax In Domino Web Applications
Using Ajax In Domino Web Applicationsdominion
 
RichFaces 4: Rich Ajax Components For Your JSF Applications
RichFaces 4: Rich Ajax Components For Your JSF ApplicationsRichFaces 4: Rich Ajax Components For Your JSF Applications
RichFaces 4: Rich Ajax Components For Your JSF ApplicationsMax Katz
 
Asp.Net Ajax Component Development
Asp.Net Ajax Component DevelopmentAsp.Net Ajax Component Development
Asp.Net Ajax Component DevelopmentChui-Wen Chiu
 
React & Redux JS
React & Redux JS React & Redux JS
React & Redux JS Hamed Farag
 
Effective JavaFX architecture with FxObjects
Effective JavaFX architecture with FxObjectsEffective JavaFX architecture with FxObjects
Effective JavaFX architecture with FxObjectsSrikanth Shenoy
 
Using HttpWatch Plug-in with Selenium Automation in Java
Using HttpWatch Plug-in with Selenium Automation in JavaUsing HttpWatch Plug-in with Selenium Automation in Java
Using HttpWatch Plug-in with Selenium Automation in JavaSandeep Tol
 
Dave Orchard - Offline Web Apps with HTML5
Dave Orchard - Offline Web Apps with HTML5Dave Orchard - Offline Web Apps with HTML5
Dave Orchard - Offline Web Apps with HTML5Web Directions
 
An Introduction to Websphere sMash for PHP Programmers
An Introduction to Websphere sMash for PHP ProgrammersAn Introduction to Websphere sMash for PHP Programmers
An Introduction to Websphere sMash for PHP Programmersjphl
 
RichFaces: rich:* component library
RichFaces: rich:* component libraryRichFaces: rich:* component library
RichFaces: rich:* component libraryMax Katz
 
Maxim Salnikov - Service Worker: taking the best from the past experience for...
Maxim Salnikov - Service Worker: taking the best from the past experience for...Maxim Salnikov - Service Worker: taking the best from the past experience for...
Maxim Salnikov - Service Worker: taking the best from the past experience for...Codemotion
 
Ajax Testing Approach
Ajax Testing ApproachAjax Testing Approach
Ajax Testing ApproachHarshJ
 

Similar to 25+ Reasons to use OmniFaces in JSF applications (20)

Javascript-heavy Salesforce Applications
Javascript-heavy Salesforce ApplicationsJavascript-heavy Salesforce Applications
Javascript-heavy Salesforce Applications
 
SoCal Code Camp 2011 - ASP.NET MVC 4
SoCal Code Camp 2011 - ASP.NET MVC 4SoCal Code Camp 2011 - ASP.NET MVC 4
SoCal Code Camp 2011 - ASP.NET MVC 4
 
C sharp and asp.net interview questions
C sharp and asp.net interview questionsC sharp and asp.net interview questions
C sharp and asp.net interview questions
 
Using Ajax In Domino Web Applications
Using Ajax In Domino Web ApplicationsUsing Ajax In Domino Web Applications
Using Ajax In Domino Web Applications
 
Introduction to ajax
Introduction to ajaxIntroduction to ajax
Introduction to ajax
 
RichFaces 4: Rich Ajax Components For Your JSF Applications
RichFaces 4: Rich Ajax Components For Your JSF ApplicationsRichFaces 4: Rich Ajax Components For Your JSF Applications
RichFaces 4: Rich Ajax Components For Your JSF Applications
 
Asp.Net Ajax Component Development
Asp.Net Ajax Component DevelopmentAsp.Net Ajax Component Development
Asp.Net Ajax Component Development
 
Wwf
WwfWwf
Wwf
 
React & Redux JS
React & Redux JS React & Redux JS
React & Redux JS
 
react-en.pdf
react-en.pdfreact-en.pdf
react-en.pdf
 
AJppt.pptx
AJppt.pptxAJppt.pptx
AJppt.pptx
 
ASP.NET 4.0 Roadmap
ASP.NET 4.0 RoadmapASP.NET 4.0 Roadmap
ASP.NET 4.0 Roadmap
 
Effective JavaFX architecture with FxObjects
Effective JavaFX architecture with FxObjectsEffective JavaFX architecture with FxObjects
Effective JavaFX architecture with FxObjects
 
Using HttpWatch Plug-in with Selenium Automation in Java
Using HttpWatch Plug-in with Selenium Automation in JavaUsing HttpWatch Plug-in with Selenium Automation in Java
Using HttpWatch Plug-in with Selenium Automation in Java
 
Codeception
CodeceptionCodeception
Codeception
 
Dave Orchard - Offline Web Apps with HTML5
Dave Orchard - Offline Web Apps with HTML5Dave Orchard - Offline Web Apps with HTML5
Dave Orchard - Offline Web Apps with HTML5
 
An Introduction to Websphere sMash for PHP Programmers
An Introduction to Websphere sMash for PHP ProgrammersAn Introduction to Websphere sMash for PHP Programmers
An Introduction to Websphere sMash for PHP Programmers
 
RichFaces: rich:* component library
RichFaces: rich:* component libraryRichFaces: rich:* component library
RichFaces: rich:* component library
 
Maxim Salnikov - Service Worker: taking the best from the past experience for...
Maxim Salnikov - Service Worker: taking the best from the past experience for...Maxim Salnikov - Service Worker: taking the best from the past experience for...
Maxim Salnikov - Service Worker: taking the best from the past experience for...
 
Ajax Testing Approach
Ajax Testing ApproachAjax Testing Approach
Ajax Testing Approach
 

Recently uploaded

What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 

Recently uploaded (20)

What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 

25+ Reasons to use OmniFaces in JSF applications

  • 1. 25+ Reasons to use OmniFaces in JSF applications Anghel Leonard
  • 2. What we will cover ? (I) • Enable restorable view • Loading CDN resources • Loading images as stream/byte array • OmniFaces converters • OmniFaces validators • OmniFaces server-side Cache • Defer JavaScript loading • Preserve view/request parameters on post-back • Execute JSF AJAX request via JavaScript method call • OmniFaces tree hierarchy • OmniFaces stateless ViewParam • Full AJAX exception handler • Highlight invalid inputs • OmniFaces boosted messages
  • 3. What we will cover ? (II) • Eagerly instantiate scoped beans • OmniFaces PartialViewContext • OmniFaces events for Invoke Application • Auto-generated JSF component IDs • Extensionless URLs • Import constants • Import functions • Combined resource handler • Unmapped resource handler • Injecting cookies and context params • OmniFaces filters • OmniFaces ViewScope • OmniFaces utilities methods • OmniFaces utilities functions
  • 4. What is OmniFaces ? • Well, if this is the first time when you hear about OmniFaces then you have to know that OmniFaces is a utility library for JSF and a comprehensive compendium of programming techniques, design patterns and recipes for JSF developers. • Read before: Introduction to OmniFaces by Anghel Leonard
  • 5. Enable restorable view Your application works like a charm, but ViewExpiredException spoil all the satisfaction ? OmniFaces fix this problem via a custom tag handler that instructs the view handler to recreate the entire view whenever the view has been expired. So, check how easy is to get rid of this exception using <o:enableRestorableView>.
  • 6. Loading CDN resources If you want to use <h:outputScript> and <h:outputStylesheet> to load external resources from CDNs (e.g. Google Hosted Libraries), then you know that this is not possible in default JSF ? OmniFaces comes with the solution via a custom resource handler, named CDNResourceHandler. This will simply allows you to load resources from CDNs via <h:outputScript> and <h:outputStylesheet>.
  • 7. Loading images as stream/byte array You need to render images that comes as InputStream or byte[] ? You want to render them as data URI or load SVG files? OmniFaces provides the <o:graphicImage>, which is an extension of the <h:graphicImage> dedicated to render JSF resource as data URI, InputStream/byte[] property as resource, InputStream /byte[] property as data URI, etc. Just check the OmniFaces Showcase.
  • 8. OmniFaces converters JSF custom converters are time consuming, they are called at every request regardless of whether the submitted value has changed or not, or they need to do the job based on possibly expensive service/DAO operations, etc. Just if you read the names of converters provides out of the box by OmniFaces, you will take into account to check them at your first need to write a custom converter: GenericEnumConverter ListConverter ListIndexConverter SelectItemsConverter SelectItemsIndexConverter ValueChangeConverter Read further: OmniFaces Converters by Constantin Alin
  • 9. OmniFaces validators Components validation is interdependent ? Need special custom validators to: - validate if ONLY ONE of the given UIInput components have been filled out ? - validate if ALL of the given UIInput components have been filled out ? - validate if ALL of the given UIInput components have the same value ? - validate if ONLY ONE of the given UIInput components has been filled out or that NONE of the given UIInput components have been filled out ? … If you answered yes, or you think of some other case, then OmniFaces has a set of 14 special custom validators. Read further: OmniFaces Validators by Anghel Leonard
  • 10. OmniFaces server-side Cache Your page source code contains a lot of markup ? Well, the Render Response phase is the most time consuming JSF phase, especially in cases when the rendered markup is consistent. You can speed up this process with a snap of a finger via the OmniFaces Cache component. Caching markup will boost the Render Response phase (check some tests here). The examples provided by OmniFaces Showcase are very clear and well explained. Read further: Test OmniFaces Cache for Render Response Phase by Anghel Leonard
  • 11. Defer JavaScript loading I know a trendy topic: deferred scripts. I'm pretty sure that you heard about placing the scripts at the end of </body>, use defer="true“ or async= "true", but I'm not so sure that you know that these approaches are not really working as expected. The OmniFaces, <o:deferredScript> defers the loading of the given script resource to the window load event (the given script resource is only loaded when the window is really finished with loading).
  • 12. Preserve view/request parameters on post-back As you know, when we submit JSF forms we simply cannot preserve view or request parameters in the request URL. Well, OmniFaces fixes this issue via Form (<o:form>) component, which extends the standard <h:form> and provides a way to keep view or request parameters in the request URL after a post-back and offers in combination with the <o:ignoreValidationFailed> tag on an UICommand component the possibility to ignore validation failures so that the invoke action phase will be executed anyway.
  • 13. Execute JSF AJAX request via JavaScript method call As an end-user you may want to execute a JSF AJAX request via a JavaScript function call. Well, OmniFaces provides the CommandScript component exactly for this purpose. The <o:commandScript> is a component based on the standard <h:commandXxx> which generates a JavaScript function in the global JavaScript scope which allows the end-user to execute a JSF AJAX request by just a function call functionName() in the JavaScript context.
  • 14. OmniFaces tree hierarchy OmniFaces comes with Tree component. The <o:tree> allows the developers to have full control over the markup of a tree hierarchy by declaring the appropriate JSF components or HTML elements in the markup. The <o:tree> does namely not render any HTML markup by itself. Beside the OmniFaces Showcase, you can check some examples here: Use OmniFaces Tree to render JSON Expose a path as an OmniFaces tree (<o:tree>) Building dynamic responsive multi-level menus with plain HTML and OmniFaces
  • 15. OmniFaces stateless ViewParam The JSF built-in <f:viewParam> is a stateful artifact. This causes major issues as Arjan Tijms points on his blog. OmniFaces, comes with a stateless ViewParam component. The <o:viewParam> is a component that extends the standard <f:viewParam> and provides a stateless mode of operation and fixes the issue wherein null model values are converted to empty string parameters in query string (e.g. when includeViewParams=true) and the (bean) validation never being triggered when the parameter is completely absent in query string, causing e.g. @NotNull to fail.
  • 16. Full AJAX exception handler By default, most of AJAX exceptions are invisible to the client. They are returned to the client, but unfortunately JSF AJAX clients aren't prepared to deal with arbitrary error messages, so they simply ignore them. But a custom exception handler is specially created for this task by OmniFaces. The handler is named FullAjaxExceptionHandler, and the factory is named FullAjaxExceptionHandlerFactory. This will give to your AJAX based applications a real boost, because your end users would know if their actions was successfully performed or not.
  • 17. Highlight invalid inputs Beside validation messages, you simply want to highlight the invalid inputs of a form via some CSS ? The OmniFaces, <o:highlight> is a helper component which highlights all invalid UIInput components and the associated labels by adding an error style class to them. Additionally, it by default focuses the first invalid UIInput component.
  • 18. OmniFaces boosted messages Working with <h:message> and <h:messages> has several important limitations. OmniFaces, comes with <o:messages>, which allows us to specify multiple client IDs space separated in the for attribute, show a single custom message whenever the component has received any faces message, HTML escaping and messages iteration markup control.
  • 19. Eagerly instantiate scoped beans CDI managed beans doesn’t have the ability to eagerly instantiate application scoped beans. OmniFaces fills this void and even goes one step further by introducing the @Eager annotation that can be applied to @RequestScoped, @ViewScoped, @SessionScoped and @ApplicationScoped beans. This causes these beans to be instantiated automatically at the start of each such scope instead of on demand when a bean is first referenced.
  • 20. OmniFaces PartialViewContext Do you need to: • Execute callback scripts by PartialResponseWriterstartEval() ? • Add arguments to AJAX response ? • Prevents errors about malformed XML caused by tags which Mojarra and MyFaces has left open after an exception in rendering of an already committed AJAX response ? • Fix the no-feedback problem when a ViewExpiredException occurs during an AJAX request on a page which is restricted by web.xml <security-constraint> ? Then you need the OmniFaces, OmniPartialViewContext.
  • 21. OmniFaces events for Invoke Application JSF comes with a considerable number of events, but none of them is related to Invoke Application phase. OmniFaces fills this void with the InvokeActionEventListener which add support for the new <f:event> types: preInvokeAction and postInvokeAction. Those events are published during the beforephase and afterphase of INVOKE_APPLICATION respectively. This actually offers a better hook on invoking actions after the <f:viewParam> values been set than the preRenderView event. Starting with OmniFaces 2.2, any component will support these two events.
  • 22. Auto-generated JSF component IDs As you know, JSF will provide auto-generated IDs for each component that doesn’t have an explicit ID. OmniFaces has an view handler, NoAutoGeneratedIdViewHandler which inspects the rendered output and signal via an llegalStateException whenever an automatically generated JSF component ID (j_id...) is encountered in the rendered output.
  • 23. Extensionless URLs Do you find the presence of the extension (e.g. .xhtml) inappropriate in the URL ? Well, OmniFaces comes with FacesViews, which is a mechanism to use SEO-friendly extensionless URLs in a JSF application without the need to enlist individual Facelet source files in some configuration file. Instead, Facelets source files can be put into either the special /WEB- INF/faces-views directory, from where they will be automatically scanned (no configuration whatsoever required) or an explicit directory can be configured to be scanned. The web app root is supported as well.
  • 24. Import constants By default, constant field values cannot be use in JSF pages. Well, OmniFaces provides the ImportConstants tag handler that allows the developer to have a mapping of all constant field values of the given fully qualified name of a type in the request scope (e.g. declared as, public static final).
  • 25. Import functions By default, functions that are not registered in .taglib.xml file cannot be use in JSF pages. Well, OmniFaces comes with the ImportFunctions tag handler which allows developers to have access to all functions of the given fully qualified name of a type in the Facelet scope using the usual EL functions syntax without the need to register them in .taglib.xml file. The functions are those public static methods with a non-void return type.
  • 26. Combined resource handler As you know, for each resource (CSS and JS) we have a separate request. OmniFaces seriously improve the page loading speed via the CombinedResourceHandler resource handler. This will remove all separate script and stylesheet resources which have the target Attributeset to head from the UIViewRoot and create a combined one for all scripts and another combined one for all stylesheets.
  • 27. Unmapped resource handler When we need to reference relative URLs to images in CSS files we can use the #{resource} EL expression in images paths. This issue is solved by OmniFaces via the UnmappedResourceHandler. This implementation allows the developer to map JSF resources on an URL pattern of /javax.faces.resource/* without the need for an additional FacesServlet prefix or suffix URL pattern in the default produced resource URLs.
  • 28. Injecting cookies and context params Need quick access to information stored in cookies and context parameters ? Preferably via CDI injection ? Well, OmniFaces provides @Cookie annotation for injecting cookie data and @ContextParam annotation for injecting context parameters (the later is available starting with OmniFaces 2.2).
  • 29. OmniFaces filters OmniFaces comes with several filters, as follows: • CacheControlFilter - controls the cache-related headers of the response • CharacterEncodingFilter - set the request body character encoding when not already set by the client • FacesExceptionFilter - solve 2 problems with exceptions thrown in JSF methods: Mojarra's FacesFileNotFoundException needs to be interpreted as 404 and root cause needs to be unwrapped from FacesException and ELException to utilize standard Servlet API error page handling. • GzipResponseFilter - will apply GZIP compression on responses whenever applicable • HttpFilter - abstract filter specifically for HTTP requests
  • 30. OmniFaces ViewScope OmniFaces comes with a view scope that can be used in JSF 2.0/2.1. Starting with JSF 2.2, we can use the built-in view scope, but, if we need to immediately destroy @ViewScoped bean when browser window is unloaded /closed then we need to come back to OmniFaces solution. Starting with OmniFaces 2.2, the view scope was improved to immediately destroy @ViewScoped on a GET navigation, or a close of browser tab /window. These features are not supported by JSF 2.2.
  • 31. OmniFaces utilities methods OmniFaces comes with 300+ utilities methods that are available in org.omnifaces.util package. We have utility methods based on JSF API for AJAX, CDI Beans, messages, faces, events, callbacks, renderers, etc. Most of them are useful to obtain a less verbose code, much easy to understand, others provides hidden functionalities or simply comes with new functionalities that are not easy to be achieved in JSF. Read further: OmniFaces Utilities ZEEF Page by Anghel Leonard
  • 32. OmniFaces utilities functions OmniFaces comes with a comprehensive set of utilities functions in org.omnifaces.el.functions package. These functions allows us to easy manipulate objects, strings, arrays, dates, numbers, etc directly in page via EL. Read further: OmniFaces Utilities ZEEF Page by Anghel Leonard
  • 33. References • Bauke Scholtz - http://balusc.omnifaces.org/ • Arjan Tijms - http://arjan-tijms.omnifaces.org/ • JSF ZEEF page - https://jsf.zeef.com/bauke.scholtz • OmniFaces ZEEF page - https://omnifaces.zeef.com/bauke.scholtz • OmniFaces Wikipedia - http://en.wikipedia.org/wiki/OmniFaces