marți, 17 noiembrie 2015

FOR DETAILS ABOUT VERSIONING AND [localePrefix/][libraryName/][libraryVersion/]resourceName[/resourceVersion] ANALYSYS PLEASE READ HERE.

The CSS files used in the following example are
stored locally in /resources folder, as in the below figure:

Common/basic usage in JSF - loading CSS files
using the name and library (optional) attribute (notice that the library value represents the common library/module/theme name where all of those resources commonly belong to; nevertheless, if you decide to use a library name, but you don't have a clear purpose, then a name as default or common, or your company name may be a good choice)

Combine all CSS files in a single stylesheet using OmniFaces
CombinedResourceHandler

The CombinedResourceHandler
claims to considerably improve page loading. This is achieved by removing all
the separate script and stylesheet resources which have the target attribute set to "head"
from the UIViewRoot and create a combined one for
all scripts and another combined one for all stylesheets. So, instead of firing
a GET request per resource, the browser will fire a single GET request for all
scripts, and another one for all stylesheets. Further, the CombinedResourceHandler is responsible to sequentially return
all the resources combined in these requests. Visually speaking, something like
below:

The main goal of the UnmappedResourceHandler
is to allow developers to reference relative URLs to images in CSS files
without using the #{resource}.
If you check the content of
css/style.css, you can see that we load an image via #{resource} like
below:

body {

background:
url("#{resource['/css/imgs/background.jpg']}");

}

Now, with UnmappedResourceHandler,
the background.jpg can be referenced
from css/style.css
as:

body {

background:
url("imgs/background.jpg");

}

The UnmappedResourceHandler
can be configured in faces-config.xml,
like this:

Abonaţi-vă la JSF/OmniFaces Fans

Visitors Starting 4 September 2015

Others

[OmniFaces utilities]

Renderers

Collection of utility methods for the JSF API with respect to working with Renderer

Platform

This class provides access to (Java EE 6) platform services from the view point of JSF

Map Wrapper

Implementation of Map that wraps another map. This allows interception of one or more method on this wrapped map

JNDI

Utility class for simplifying some web related tasks that use JNDI under the hood, such as getting the <env-entry> from web.xml

State

Helper class for StateHelper that uses generic type-inference to make code that uses the StateHelper slightly less verbose

Beans

Collection of utility methods for the CDI API that are mainly shortcuts for obtaining stuff from the BeanManager

Components

Collection of utility methods for the JSF API with respect to working with UIComponent. There are several traversal/lookup methods, there are several UIForm and UIInput related methods which makes it easier to deal with forms and inputs

.Events

Collection of utility methods for the JSF API with respect to working with system and phase events