Return-Path: X-Original-To: apmail-deltaspike-commits-archive@www.apache.org Delivered-To: apmail-deltaspike-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7C8C1186D7 for ; Tue, 12 May 2015 18:37:07 +0000 (UTC) Received: (qmail 40483 invoked by uid 500); 12 May 2015 18:37:07 -0000 Delivered-To: apmail-deltaspike-commits-archive@deltaspike.apache.org Received: (qmail 40449 invoked by uid 500); 12 May 2015 18:37:07 -0000 Mailing-List: contact commits-help@deltaspike.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@deltaspike.apache.org Delivered-To: mailing list commits@deltaspike.apache.org Received: (qmail 40432 invoked by uid 99); 12 May 2015 18:37:07 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 May 2015 18:37:07 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 2DFA1AC09F8 for ; Tue, 12 May 2015 18:37:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1679029 [1/2] - in /deltaspike/site/trunk/content/documentation: bean-validation.html container-control.html data.html jpa.html jsf.html partial-bean.html scheduler.html security.html servlet.html test-control.html Date: Tue, 12 May 2015 18:37:06 -0000 To: commits@deltaspike.apache.org From: rsmeral@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150512183707.2DFA1AC09F8@hades.apache.org> Author: rsmeral Date: Tue May 12 18:37:06 2015 New Revision: 1679029 URL: http://svn.apache.org/r1679029 Log: Site checkin for project Apache DeltaSpike Documentation Modified: deltaspike/site/trunk/content/documentation/bean-validation.html deltaspike/site/trunk/content/documentation/container-control.html deltaspike/site/trunk/content/documentation/data.html deltaspike/site/trunk/content/documentation/jpa.html deltaspike/site/trunk/content/documentation/jsf.html deltaspike/site/trunk/content/documentation/partial-bean.html deltaspike/site/trunk/content/documentation/scheduler.html deltaspike/site/trunk/content/documentation/security.html deltaspike/site/trunk/content/documentation/servlet.html deltaspike/site/trunk/content/documentation/test-control.html Modified: deltaspike/site/trunk/content/documentation/bean-validation.html URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation/bean-validation.html?rev=1679029&r1=1679028&r2=1679029&view=diff ============================================================================== --- deltaspike/site/trunk/content/documentation/bean-validation.html (original) +++ deltaspike/site/trunk/content/documentation/bean-validation.html Tue May 12 18:37:06 2015 @@ -281,7 +281,7 @@ table.CodeRay td.code>pre{padding:0}
-

Configure Your Projects

+

Project Setup

The configuration information provided here is for Maven-based projects and it assumes that you have already declared the DeltaSpike version and DeltaSpike Core module for your projects, as detailed in Configure DeltaSpike in Your Projects. For Maven-independent projects, see Configure DeltaSpike in Maven-independent Projects.

@@ -305,10 +305,8 @@ table.CodeRay td.code>pre{padding:0}
-

Use the Module Features

+

Scoping

-
-

Scoping

A ConstraintValidator inherits the scope defined in the bean class.

@@ -325,8 +323,10 @@ A ConstraintValidator may b
-
-

Code Requirements

+
+
+

Code Requirements

+

There are no compile dependencies to use the Bean Validation module. You simply need to override the factory. Then you can build your ConstraintValidator based on CDI programming rules.

@@ -349,7 +349,6 @@ simply need to override the factory. The
-
@@ -375,18 +374,14 @@ simply need to override the factory. The Modified: deltaspike/site/trunk/content/documentation/container-control.html URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation/container-control.html?rev=1679029&r1=1679028&r2=1679029&view=diff ============================================================================== --- deltaspike/site/trunk/content/documentation/container-control.html (original) +++ deltaspike/site/trunk/content/documentation/container-control.html Tue May 12 18:37:06 2015 @@ -281,7 +281,7 @@ table.CodeRay td.code>pre{padding:0}
-

Configure Your Projects

+

Project Setup

The configuration information provided here is for Maven-based projects and it assumes that you have already declared the DeltaSpike version and DeltaSpike Core module for your projects, as detailed in Configure DeltaSpike in Your Projects. For Maven-independent projects, see Configure DeltaSpike in Maven-independent Projects.

@@ -311,10 +311,8 @@ table.CodeRay td.code>pre{padding:0}
-

Use the Module Features

+

Start the CDI Container from Your Project

-
-

Start the CDI Container from Your Project

To start a CDI container in your application, you must instantiate a CdiContainer object and call the #boot method. When #boot is called, the CdiContainer scans CDI-enabled archives for beans and CDI extensions. Before the application exits, #shutdown must be called to correctly destroy all beans. An example is given in the code snippet here.

@@ -373,8 +371,10 @@ archives for beans and CDI extensions. B
-
-

CdiContainer

+
+
+

CdiContainer

+

The CdiContainer interface provides booting and shutdown of the CDI containers from deployed applications, with CdiContainerLoader a simple factory providing access to the underlying CdiContainer implementation.

@@ -385,14 +385,18 @@ archives for beans and CDI extensions. B

For instructions and examples on using this feature in your projects, see Enable CDI For Your Java Environment: Java SE6+.

-
-

ContextControl Usage

+
+
+

ContextControl Usage

+

The ContextControl interface provides life-cycle control of the CDI container built-in contexts. This includes starting and stoping built-in standard contexts like @RequestScoped, @ConversationScoped, and @SessionScoped. It is provided as an @Dependent bean and can be injected in the classic CDI way. This feature can be used and is helpful in all Java environments, including Java SE, as illustrated here.

-
-

Procedure for builing Uber jar

+
+
+

Procedure for building an uber jar

+

Uber jar or executable jar can created by using the maven shade plugin. Some things you needs to be aware of when you use it.

@@ -418,8 +422,8 @@ archives for beans and CDI extensions. B
-
-

Restart the RequestContext in Unit Tests

+
+

Restart the RequestContext in Unit Tests

In unit testing it can be necessary to test with attached and also with detached JPA entities. A very common approach for JPA is the @@ -451,8 +455,8 @@ EntityManager. Since a single unit test

-
-

Attach a RequestContext to a New Thread in EE

+
+

Attach a RequestContext to a New Thread in EE

Accessing the @RequestScoped bean in a new thread will result in a ContextNotActiveException. The RequestContext usually gets started @@ -488,8 +492,10 @@ business services in for example a Quart

-
-

Embedded Servlet Support

+
+
+

Embedded Servlet Support

+

From DeltaSpike 1.0.2, you can use DeltaSpike to power embedded Servlet runtimes. This work is done via Servlet Listeners. The configuration is @@ -515,8 +521,8 @@ cdiContainer.boot(); cdiContainer.getContextControl().startContexts();

-
-

Jetty

+
+

Jetty

For Jetty, you need to add an EventListener which will be your CdiServletRequestListener. The object must be instantiated. This must @@ -536,8 +542,8 @@ server.start();

-
-

Undertow

+
+

Undertow

For Undertow, you register the CdiServletRequestListener via ListenerInfo by passing in the class to their builders. Then you add @@ -563,8 +569,8 @@ server.start();

-
-

Tomcat

+
+

Tomcat

For Tomcat, you need to register the CdiServletContextListener instead of the CdiServletRequestListener. It is added as an @@ -586,7 +592,6 @@ tomcat.start();

-
@@ -605,33 +610,29 @@ tomcat.start();
Modified: deltaspike/site/trunk/content/documentation/data.html URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation/data.html?rev=1679029&r1=1679028&r2=1679029&view=diff ============================================================================== --- deltaspike/site/trunk/content/documentation/data.html (original) +++ deltaspike/site/trunk/content/documentation/data.html Tue May 12 18:37:06 2015 @@ -328,7 +328,7 @@ chapters.

-

Configure Your Projects

+

Project Setup

The configuration information provided here is for Maven-based projects and it assumes that you have already declared the DeltaSpike version and DeltaSpike Core module for your projects, as detailed in Configure DeltaSpike in Your Projects. For Maven-independent projects, see Configure DeltaSpike in Maven-independent Projects.

@@ -422,12 +422,6 @@ configure the TransactionStrategy< </beans>
-
- - -
-

Use the Module Features

-
@@ -441,10 +435,14 @@ annotation-based entities.
+
+
+ +
+

Core Concepts

+
-

Core Concepts

-
-

Repositories

+

Repositories

With the DeltaSpike Data module, it is possible to make a repository out of basically any abstract class or interface (using a concrete class @@ -474,8 +472,8 @@ classes or interfaces this is the only w entity the repository relates to. In order to simplify this, DeltaSpike Data provides several base types.

-
-
The EntityRepository Interface
+
+

The EntityRepository Interface

Although mainly intended to hold complex query logic, working with both a repository and an EntityManager in the service layer might @@ -549,7 +547,6 @@ is introduced, as we see in the next cha

-
The AbstractEntityRepository Class
@@ -574,8 +571,9 @@ be implemented in the repository.

-
-

Deactivating Repositories

+
+
+

Deactivating Repositories

Repositories can be deactivated creating a ClassDeactivator.

@@ -599,8 +597,8 @@ be implemented in the repository.

-
-

Using Multiple EntityManager

+
+

Using Multiple EntityManager

While most applications will run just fine with a single EntityManager, there might be setups where multiple data sources are @@ -635,8 +633,8 @@ the @EntityManagerConfig an interface.

-
-

Other EntityManager Methods

+
+

Other EntityManager Methods

While the EntityRepository methods should cover most interactions normally done with an EntityManager, for some specific cases it might @@ -656,16 +654,18 @@ a JPA 2.0 EntityManager:

-
-

Query Method Expressions

+
+
+

Query Method Expressions

+

Good naming is a difficult aspects in software engineering. A good method name usually makes comments unnecessary and states exactly what the method does. And with method expressions, the method name is actually the implementation!

-
-

Using Method Expressions

+
+

Using Method Expressions

Let’s start by looking at a (simplified for readability) example:

@@ -809,8 +809,8 @@ expressions:

you will notice early in case you have a typo in those expressions.

-
-

Query Ordering

+
+

Query Ordering

Beside comparators it is also possible to sort queries by using the OrderBy keyword, followed by the attribute name and the direction @@ -828,8 +828,8 @@ you will notice early in case you have a

-
-

Nested Properties

+
+

Nested Properties

To create a comparison on a nested property, the traversal parts can be separated by a _:

@@ -846,8 +846,8 @@ separated by a _:

-
-

Query Options

+
+

Query Options

DeltaSpike supports query options on method expressions. If you want to page a query, you can change the first result as well as the maximum @@ -865,8 +865,8 @@ number of results returned:

-
-

Method Prefix

+
+

Method Prefix

In case the findBy prefix does not comply with your team conventions, this can be adapted:

@@ -884,8 +884,10 @@ this can be adapted:

-
-

Query Annotations

+
+
+

Query Annotations

+

While method expressions are fine for simple queries, they will often reach their limit once things get slightly more complex. Another aspect @@ -894,8 +896,8 @@ best performance is over named queries. cases, the DeltaSpike Data module supports also annotating methods for more control on the generated query.

-
-

Using Query Annotations

+
+

Using Query Annotations

The simples way to define a specific query is by annotating a method and providing the JPQL query string which has to be executed. In code, this @@ -1007,8 +1009,8 @@ not JPQL but plain SQL:

-
-

Annotation Options

+
+

Annotation Options

Beside providing a query string or reference, the @Query annotation provides also two more attributes:

@@ -1051,8 +1053,8 @@ provides also two more attributes:

Note that these options can also be applied to method expressions.

-
-

Query Options

+
+

Query Options

All the query options you have seen so far are more or less static. But sometimes you might want to apply certain query options dynamically. For @@ -1105,8 +1107,8 @@ supported for Hibernate, EclipseLink and expressions.

-
-

Pagination

+
+

Pagination

We introduced the QueryResult type in the last chapter, which can also be used for pagination:

@@ -1127,8 +1129,8 @@ QueryResult<Person> paged = person
-
-

Bulk Operations

+
+

Bulk Operations

While reading entities and updating them one by one might be fine for many use cases, applying bulk updates or deletes is also a common usage @@ -1153,8 +1155,8 @@ marking annotation @Modifying

-
-

Optional Query Results

+
+

Optional Query Results

The JPA spec requires to throw exceptions in case the getSingleResult() method does either return no or more than one @@ -1168,8 +1170,8 @@ sense for the current usecase. While the aligned with JPA, it is also possible to request optional query results.

-
-

Zero or One Result

+
+

Zero or One Result

With this option, the query returns null instead of throwing a NoResultException when there is no result returned. It is usable with @@ -1199,8 +1201,8 @@ with the SingleResultType.OPTIONAL NonUniqueResultException is still thrown.

-
-

Any Result

+
+

Any Result

If the caller does not really mind what kind if result is returned, it is also possible to request any result from the query. If there is no @@ -1232,8 +1234,10 @@ annotations, the singleResult

-
-

Transactions

+
+
+

Transactions

+

If you call any method expression, @Query-annotated method or a method from the EntityRepository, the repository will figure out if a @@ -1297,10 +1301,12 @@ their queries in the transactional implementation can be, for example, in an anonymous class).

+
+
+

Extensions

+
-

Extensions

-
-

Query Delegates

+

Query Delegates

While repositories defines several base interfaces, there might still be the odd convenience method that is missing. This is actually intentional @@ -1328,8 +1334,8 @@ repositories:

-
-

Implementing the Query Delegate

+
+

Implementing the Query Delegate

The first step is to define an interface which contains the extra methods for your repositories (as shown above):

@@ -1377,8 +1383,10 @@ selected.

-
-

Mapping

+
+
+

Mapping

+

While repositories are primarily intended to work with Entities, it might be preferable in some cases to have an additional mapping layer on @@ -1474,8 +1482,8 @@ is mandatory. Also it is up to the mappe correctly (in this example, a conversion from a PersonDto parameter to Person entity and from PersonId to Long is necessary).

-
-

Simple Mappings

+
+

Simple Mappings

In many cases it is just required to map a DTO object back and forth. For this case, the SimpleQueryInOutMapperBase class can be subclassed, @@ -1518,8 +1526,10 @@ entity).

-
-

JPA Criteria API Support

+
+
+

JPA Criteria API Support

+

Beside automatic query generation, the DeltaSpike Data module also provides a DSL-like API to create JPA 2 Criteria queries. It takes @@ -1548,8 +1558,8 @@ strongest point is certainly its type sa of readability. We’re trying to provide a middle way here. A less powerful API, but still type safe and readable.

-
-

API Usage

+
+

API Usage

The API is centered around the Criteria class and is targeted to provide a fluent interface to write criteria queries:

@@ -1681,8 +1691,8 @@ method is called. This creates a JPA Typ repository entity. If required, further processing can be applied here.

-
-

Joins

+
+

Joins

For simple cases, restricting on the repository entity only works out fine, but once the Data model gets more complicated, the query will have @@ -1731,8 +1741,8 @@ are slighly simpler as seen in the next

-
-

Boolean Operators

+
+

Boolean Operators

By default, all query operators are concatenated as an and conjunction to the query. The DeltaSpike criteria API also allows to add groups of @@ -1761,8 +1771,8 @@ disjunctions.

-
-

Selections

+
+

Selections

It might not always be appropriate to retrieve full entities - you might also be interested in scalar values or by modified entity attributes. @@ -1872,8 +1882,10 @@ selection clause:

-
-

Auditing

+
+
+

Auditing

+

A common requirement for entities is tracking what is being done with them. DeltaSpike provides a convenient way to support this requirement.

@@ -1891,8 +1903,8 @@ requirement for your audits, have a look
-
-

Activating Auditing

+
+

Activating Auditing

DeltaSpike uses an entity listener to update auditing data before entities get created or update. The entity listener must be activated @@ -1938,14 +1950,14 @@ module. Alternatively, also the per enti XML.

-
-

Using Auditing Annotations

+
+

Using Auditing Annotations

All that has to be done now is annotating the entity properties which are used to audit the entity.

-
-
Updating Timestamps
+
+

Updating Timestamps

To keep track on creation and modification times, following annotations can be used:

@@ -1981,8 +1993,8 @@ the annotation can be customized:

-
-
Who’s Changing My Entities?
+
+

Who’s Changing My Entities?

Beside keeping track of when a change has happened, it is also often critical to track who’s responsible for the change. Annotate a user @@ -2049,7 +2061,6 @@ provider when persisting / updating the

-
@@ -2079,30 +2090,31 @@ provider when persisting / updating the Modified: deltaspike/site/trunk/content/documentation/jpa.html URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation/jpa.html?rev=1679029&r1=1679028&r2=1679029&view=diff ============================================================================== --- deltaspike/site/trunk/content/documentation/jpa.html (original) +++ deltaspike/site/trunk/content/documentation/jpa.html Tue May 12 18:37:06 2015 @@ -281,7 +281,7 @@ table.CodeRay td.code>pre{padding:0}
-

Configure Your Projects

+

Project Setup

The configuration information provided here is for Maven-based projects and it assumes that you have already declared the DeltaSpike version and DeltaSpike Core module for your projects, as detailed in Configure DeltaSpike in Your Projects. For Maven-independent projects, see Configure DeltaSpike in Maven-independent Projects.

@@ -328,10 +328,8 @@ table.CodeRay td.code>pre{padding:0}
-

Use the Module Features

+

@Transactional

-
-

@Transactional

This annotation is an alternative to transactional EJBs which allows to execute a method within a transaction. Before it is possible to start @@ -630,8 +628,10 @@ a different EntityManager. immediate rollback.

-
-

@TransactionScoped

+
+
+

@TransactionScoped

+

@Transactional also starts a context which is available as long as the transaction started by @Transactional. Besides other beans you can use @@ -670,8 +670,10 @@ this scope for the EntityManager

-
-

Extended Persistence Contexts

+
+
+

Extended Persistence Contexts

+

Frameworks like MyFaces Orchestra provide a feature which allows keeping an EntityManager across multiple requests. That means it is not @@ -794,8 +796,10 @@ serialized as well. However, as mentione such an approach.

-
-

JTA Support

+
+
+

JTA Support

+

By default the transaction-type used by @Transactional is RESOURCE_LOCAL. If you configure transaction-type="JTA" in the @@ -838,7 +842,6 @@ to /META-INF/apache-deltaspike.pro

-
@@ -869,21 +872,17 @@ to /META-INF/apache-deltaspike.pro
Modified: deltaspike/site/trunk/content/documentation/jsf.html URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation/jsf.html?rev=1679029&r1=1679028&r2=1679029&view=diff ============================================================================== --- deltaspike/site/trunk/content/documentation/jsf.html (original) +++ deltaspike/site/trunk/content/documentation/jsf.html Tue May 12 18:37:06 2015 @@ -281,7 +281,7 @@ table.CodeRay td.code>pre{padding:0}
-

Configure Your Projects

+

Project Setup

The configuration information provided here is for Maven-based projects and it assumes that you have already declared the DeltaSpike version and DeltaSpike Core module for your projects, as detailed in Configure DeltaSpike in Your Projects. For Maven-independent projects, see Configure DeltaSpike in Maven-independent Projects.

@@ -321,12 +321,6 @@ table.CodeRay td.code>pre{padding:0} </dependency>
-
-
-
-
-

Use the Module Features

-
@@ -343,8 +337,12 @@ the corresponding impact.
-
-

JSF Messages

+
+
+
+
+

JSF Messages

+

DeltaSpike provides an injectable component for typesafe FacesMessages.

@@ -382,12 +380,14 @@ In case of a String we use it for both t

If a Message is returned, we lookup the 'detail' and 'summary' categories (see org.apache.deltaspike.core.api.message.Message#toString(String) for creating the FacesMessage.

+
+
+

Multi-Window Handling

+
-

Multi-Window Handling

+

Background

-

Background

-
-
Historic Considerations
+

Historic Considerations

Until the end of the 1990s web browsers are usually single threaded and only had one window. But in the last years browsers supporting multiple @@ -398,8 +398,8 @@ maintaining web application data in @Ses still used in most of the cases.

-
-
How JSF-2 Changed the World
+
+

How JSF-2 Changed the World

The MyFaces Orchestra community did a good summary about the various ways to handle multiple window support in JSF Applications. Those @@ -411,8 +411,8 @@ links, a typical JSF-2 application conta used to see in JSF-1, thus we have far more href links to cope with.

-
-
Standard windowId Handling
+
+

Standard windowId Handling

With a classical approach we would not be able to simply add a windowId parameter to such links because if the user would open the link in a new @@ -430,10 +430,10 @@ not feasible as general solution.

+
+

Available Modes

-

Available Modes

-
-
CLIENTWINDOW
+

CLIENTWINDOW

Each GET request results in an intermediate small html page which checks if the browser tab fits the requested windowId. When the windowId is @@ -443,8 +443,8 @@ dsRid/windowId will be added. On the ser will be extracted from the cookie. For POST request detection, the windowId will be added as hidden input to all forms.

-
-
Advantage
+
+
Advantage
  • @@ -453,8 +453,8 @@ windowId will be added as hidden input t
-
-
Disadvantage
+
+
Disadvantage
  • @@ -476,8 +476,8 @@ directly.

-
-
Change windowhandler.html
+
+
Change windowhandler.html

To customize the look and feel of the windowhandler.html, you can simply provide a own via:

@@ -497,8 +497,8 @@ provide a own via:

-
-
LAZY
+
+

LAZY

Always appends the windowId to all, from JSF generated, URLs. On the first GET request without a windowId, it will generate a new windowId @@ -509,8 +509,8 @@ check if the windowId in the URL is matc it is not matching, the view will be refreshed with the right windowId in the URL.

-
-
Advantage
+
+
Advantage
  • @@ -519,8 +519,8 @@ the URL.

-
-
Disadvantage
+
+
Disadvantage
  • @@ -532,8 +532,8 @@ the windowId matches the window.na
-
-
Workflow Example
+
+
Workflow Example

First GET request with windowId

@@ -599,8 +599,8 @@ from window.name

-
-
NONE
+
+

NONE

Any window or browser tab detection will be disabled for the current request. Scopes like @WindowScoped, @GroupedConversationScoped or @@ -609,15 +609,15 @@ current request does not support Javascr bot/crawler.

-
-
DELEGATED
+
+

DELEGATED

Delegates the complete window handling to the new JSF 2.2 ClientWindow (if not disabled).

-
-
CUSTOM
+
+

CUSTOM

Enables to use an complete own org.apache.deltaspike.jsf.spi.scope.window.ClientWindow @@ -625,10 +625,10 @@ implementation.

+
+

Configuration

-

Configuration

-
-
ds:windowId
+

ds:windowId

The component ds:windowId (xmlns:ds="http://deltaspike.apache.org/jsf") is required to enable @@ -638,8 +638,8 @@ mode. The best way, to apply it for all to all of your templates.

-
-
ds:disableClientWindow
+
+

ds:disableClientWindow

Similiar to JSF 2.2' disableClientWindow attribute, ds:disableClientWindow provides the ability to disable the rendering @@ -654,8 +654,8 @@ of the windowId to all links of all chil

-
-
Number of Active Windows
+
+

Number of Active Windows

By default, DeltaSpike allows 1024 active windows per session. Anyway, this number is reduced inside this JSF module to 64 for JSF applications. Once that the limit number of active windows is reached, DeltaSpike will drop the oldest active window.

@@ -680,8 +680,8 @@ of the windowId to all links of all chil
-
-
Switch Mode
+
+

Switch Mode

To switch the mode, just provide a org.apache.deltaspike.jsf.api.config.JsfModuleConfig and overwrite @@ -701,8 +701,8 @@ of the windowId to all links of all chil

-
-
Provide a Custom ClientWindow
+
+

Provide a Custom ClientWindow

If you would like to provide an custom org.apache.deltaspike.jsf.spi.scope.window.ClientWindow @@ -736,8 +736,8 @@ implementation, you can just do it, for

-
-

Based Scopes

+
+

Based Scopes

  • @@ -753,10 +753,12 @@ implementation, you can just do it, for
+
+
+

Scopes

+
-

Scopes

-
-

@WindowScoped

+

@WindowScoped

The window-scope is like a session per window. That means that the data is bound to a window/tab and it not shared between windows (like the @@ -774,8 +776,8 @@ between windows.

-
-

@ViewAccessScoped

+
+

@ViewAccessScoped

In case of conversations you have to un-scope beans manually (or they will be terminated automatically after a timeout). However, sometimes @@ -815,22 +817,22 @@ tab' on a page with a @ViewAccessScoped

-
-

@GroupedConversationScoped (From DeltaSpike 0.6)

+
+

@GroupedConversationScoped

See (Grouped-)Conversations

-
-

@ViewScoped

+
+

@ViewScoped

DeltaSpike provides an CDI context for the JSF 2.0/2.1 @javax.faces.bean.ViewScoped. You can simply annotate your bean with @javax.faces.bean.ViewScoped and @Named.

-
-

JSF 2.0 Scopes

+
+

JSF 2.0 Scopes

JSF 2.0 introduced new annotations as well as a new scope - the View Scope. CODI allows to use all the CDI mechanisms in beans annotated @@ -863,8 +865,10 @@ CDI annotation.

-
-

Integration with DeltaSpike Type-safe Messages

+
+
+

Integration with DeltaSpike Type-safe Messages

+

You can use DeltaSpike type-safe messages with JSF to provide i18n messages and test to an JSF appplicaton.

@@ -933,10 +937,12 @@ javax.faces.component.UIInput.REQUIRED =
+
+
+

Type-safe View-Configs

+
-

Type-safe View-Configs

-
-

Intro

+

Intro

Type-safe view-configs are static configs which can be used in combination with every view-technology which is based on Java. Currently @@ -961,8 +967,8 @@ on the basic API provided by the Core. S custom concepts the same way DeltaSpike itself does.

-
-

Motivation

+
+

Motivation

Instead of learning the concepts and rules of view-configs provided by DeltaSpike, it might be easier for simple demos to just type some @@ -1033,16 +1039,16 @@ more work initially?

If you are still not convinced, you just have to try it. You will see how your daily workflow benefits from it pretty soon.

-
-

Bean-discovery-mode Annotated

+
+

Bean-discovery-mode Annotated

CDI 1.1 introduced a concept called bean-discovery-mode. If you would like to use the mode annotated, please have a look at the tip at @ViewConfigRoot

-
-

Basic API Usages

+
+

Basic API Usages

While reading this section keep the following simple rules in mind: Meta-data gets inherited along the path of Java inheritance @@ -1181,8 +1187,8 @@ navigation target of this method is with }

-
-
File (@View) and Folder (@Folder) Paths
+
+

File (@View) and Folder (@Folder) Paths

@View as well as @Folder are optional annotations. @Folder is only needed for using a different folder-name or for marking folder configs @@ -1247,8 +1253,8 @@ Pages.Wizard1.Step1).

@View#name and @View#extension (or you register custom `NameBuilder`s inline or globally).

-
-
@Folder#name
+
+
@Folder#name

The rules are pretty simple. You will get what you write. There are only two additional features:

@@ -1304,8 +1310,8 @@ two additional features:

-
-
@View
+
+
@View

The same naming rules apply to @View#basePath. However, it is only valid to be used at view-config nodes which represent pages (→ classes @@ -1399,8 +1405,8 @@ inherited along the inheritance path.

-
-
Navigation Parameters
+
+

Navigation Parameters

Since the view-config is static, an approach to add parameters is needed. The following part shows different possibilities to add @@ -1413,8 +1419,8 @@ using @View(navigation = REDIRECT) "includeViewParams=true" and @View(viewParams = INCLUDE).

-
-
Static Configuration via @NavigationParameter
+
+

Static Configuration via @NavigationParameter

In some cases, it is needed to add an information in any case. So you can annotate the view-config class with @NavigationParameter. Supported @@ -1461,8 +1467,8 @@ them statically for particular methods:< }

-
-
Dynamic Configuration via NavigationParameterContext
+
+
Dynamic Configuration via NavigationParameterContext

Instead of using parameters in a static fashion (as shown above), it is also possible to add them dynamically (e.g. in case of special @@ -1494,8 +1500,8 @@ conditions).

-
-
Security Integration via @Secured
+
+

Security Integration via @Secured

This annotation is a custom view-meta-data provided by the Security-module which allows to integrate third-party frameworks (or @@ -1579,8 +1585,8 @@ this case you would need:

-
-
View-Controller Callbacks via @ViewControllerRef
+
+

View-Controller Callbacks via @ViewControllerRef

This annotation is a custom view-meta-data provided by the JSF-module which allows to configure beans which should act as view-controllers. @@ -1633,8 +1639,8 @@ display the exception.

-
-
Referencing Views via @ViewRef
+
+

Referencing Views via @ViewRef

With @ViewControllerRef#value you can annotate a view-config class to bind (/reference) a controller to it. @ViewRef#config allows the same @@ -1669,8 +1675,8 @@ many view/s.

pages).

-
-
Using the (Optional) ViewNavigationHandler
+
+

Using the (Optional) ViewNavigationHandler

With JSF you typically navigate with the action-method bound to a command-component. However, also JSF supports manual navigation via @@ -1706,8 +1712,8 @@ process, since ViewNavigationHandl navigation-handler (of JSF).

-
-
Configuring a Default Error-View
+
+

Configuring a Default Error-View

It is possible to mark one view-config class as default error-view. That means in case of errors it will be used as navigation target @@ -1774,8 +1780,8 @@ in the JSF request-lifecycle for a navig transformed to a standard (implicit) JSF navigation.

-
-
Using ViewConfigResolver
+
+

Using ViewConfigResolver

If you would like to query view-meta-data yourself (for whatever reason), you can do that with ViewConfigResolver.

@@ -1834,10 +1840,10 @@ configured (view-)meta-data and get and/
+
+

Advanced API Usages

-

Advanced API Usages

-
-
Creating Custom Meta-Data via @ViewMetaData
+

Creating Custom Meta-Data via @ViewMetaData

This meta-annotation allows to create custom view-meta-data which can be used for view-configs. By default meta-data of a lower level overrides @@ -1867,8 +1873,8 @@ ViewConfigDescriptor viewConfigDescripto

-
-
Creating Custom Meta-Data via @Stereotype
+
+

Creating Custom Meta-Data via @Stereotype

Like with CDI itself you can encapsulate multiple view meta-data annotation in one annotation.

@@ -1898,8 +1904,8 @@ are by default transparent.

well, once you annotate them with @ViewMetaData.

-
-
Creating Custom Callbacks via @ViewMetaData
+
+

Creating Custom Callbacks via @ViewMetaData

Via a custom ConfigPreProcessor it is possible to register custom callbacks dynamically. The following listing shows a view-config which @@ -1964,8 +1970,8 @@ the type of the callback (= class of the parameter for #getExecutableCallbackDescriptor.

-
-
Creating Custom inline Meta-Data via @InlineViewMetaData
+
+

Creating Custom inline Meta-Data via @InlineViewMetaData

This annotation can be used for view-meta-data which can be placed on other classes than view-config-classes. It is used, for example, for @ViewRef. @@ -1978,8 +1984,8 @@ meta-data representation which is used f

-
-

Path-Validation

+
+

Path-Validation

DeltaSpike (after v0.5) validates your configs out-of-the-box. The application will fail to start, if there is an invalid config (e.g. a @@ -1994,10 +2000,10 @@ which restricts org.apache.deltaspike.jsf.impl.config.view.ViewConfigPathValidator.

+
+

View-Config SPI

-

View-Config SPI

-
-
ConfigDescriptorValidator
+

ConfigDescriptorValidator

Allows to validate the final view-config descriptors before they get deployed. Since the config-descriptor contains, for example, the final path, it is @@ -2005,22 +2011,22 @@ also possible to validate if the corresp @ViewConfigRoot to configure 1-n validators.

-
-
ConfigNodeConverter
+
+

ConfigNodeConverter

Allows to provide custom strategies to process the nodes of the built config-tree. Use @ViewConfigRoot to configure a custom converter.

-
-
ConfigPreProcessor
+
+

ConfigPreProcessor

Allows to change the found meta-data (e.g. replace default values, callbacks,…​) or the ViewConfigNode itself.

-
-
InlineMetaDataTransformer
+
+

InlineMetaDataTransformer

Allows to transform an annotation annotated with @InlineViewMetaData to an annotation annotated with @ViewMetaData. This transformer is @@ -2030,15 +2036,15 @@ the inline-meta-data needs a different s @ViewControllerRef.

-
-
TargetViewConfigProvider
+
+

TargetViewConfigProvider

Allows to provide a custom reference to ViewConfig classes (see for example @InlineViewMetaData and @ViewRef)

-
-
ViewConfigInheritanceStrategy
+
+

ViewConfigInheritanceStrategy

Allows to customize the inheritance-strategy for meta-data. For example, inheritance via standard java inheritance vs. inheritance via nested @@ -2046,15 +2052,15 @@ interfaces. Use @ViewConfigRoot

-
-
ViewConfigNode
+
+

ViewConfigNode

Node-type used for building the meta-data-tree during the bootstrapping process.

-
-
@ViewConfigRoot
+
+

@ViewConfigRoot

Optional annotation which allows to provide custom implementations. Only annotate one ViewConfig class which represents the root node.

@@ -2079,8 +2085,8 @@ example:

-
-

Activation of Custom Naming Conventions

+
+

Activation of Custom Naming Conventions

DeltaSpike allows to customize the default naming convention via View.DefaultBasePathBuilder and/or View.DefaultFileNameBuilder @@ -2093,11 +2099,10 @@ is possible via Folder.folderNameB

-
-

(Grouped-)Conversations

-
-

Available from DeltaSpike 0.6.

+
+

(Grouped-)Conversations

+

DeltaSpike conversations are based on the window-scope. Therefore, do not forget to add the ds:windowId @@ -2254,8 +2259,8 @@ producer methods).

}
-
-

Terminating Conversations

+
+

Terminating Conversations

You can inject the conversation via @Inject and use it to terminate the conversation immediately or you inject the @@ -2384,8 +2389,8 @@ you can close them in a @PostRende

-
-

Sub-Conversation-Groups

+
+

Sub-Conversation-Groups

Due to the parallel conversation concept of DeltaSpike there is no need of something like nested conversations. Just use them in parallel and @@ -2470,10 +2475,12 @@ be closed as soon as you close the Impli

+
+
+

Injection in JSF Artifacts

+
-

Injection in JSF Artifacts

-
-

Converter and Validator

+

Converter and Validator

Per default the JSF module of DeltaSpike handles JSF converters and validators as std. CDI beans and therefore it’s possible to use injection, lifecycle-callbacks, scope-annotations,…​ @@ -2481,8 +2488,8 @@ the same way as with any other CDI bean. The usage is the same as for PhaseListener s.

-
-

PhaseListener

+
+

PhaseListener

Once a std. JSF-PhaseListener is annotated with @org.apache.deltaspike.jsf.api.listener.phase.JsfPhaseListener, that PhaseListener gets active without additional config in faces-config.xml. @@ -2523,10 +2530,12 @@ DeltaSpike itself uses it internally e.g

+
+
+

Event broadcasting

+
-

Event broadcasting

-
-

Observe Faces-Requests

+

Observe Faces-Requests

It is possible to observe JSF-Requests via @Observes in combination with @org.apache.deltaspike.core.api.lifecycle.Initialized or @@ -2548,8 +2557,8 @@ DeltaSpike itself uses it internally e.g

-
-

BeforePhase / AfterPhase

+
+

BeforePhase / AfterPhase

It is possible to observe JSF request-lifecycle phase-events via @Observes in combination with @org.apache.deltaspike.jsf.api.listener.phase.BeforePhase or @@ -2571,8 +2580,8 @@ DeltaSpike itself uses it internally e.g

-
-

JSF SystemEvents

+
+

JSF SystemEvents

Following JSF SystemEvents can be observed via CDI:

@@ -2604,17 +2613,19 @@ DeltaSpike itself uses it internally e.g
-
-

Intergration with Exception Control (from DeltaSpike 0.6)

+
+
+

Integration with Exception Control

+

Whenever a unhandled exception occurs within the JSF lifecycle, our JSF ExceptionHandler provides a integration to the DeltaSpike Exception Control.

+
+

Examples

-

Examples

-
-
Basic
+

Basic

@ExceptionHandler
@@ -2631,8 +2642,8 @@ public class ApplicationExceptionHandler
 
-
-
Redirect
+
+

Redirect

@ExceptionHandler
@@ -2653,8 +2664,8 @@ public class ApplicationExceptionHandler
 
-
-

Using a Custom Qualifier for JSF Exceptions

+
+

Using a Custom Qualifier for JSF Exceptions

In some cases, it is required to differentiate exceptions from JSF and normal exceptions. This is possible via a CDI qualifier:

@@ -2696,8 +2707,10 @@ normal exceptions. This is possible via
-
-

Double-Submit Prevention

+
+
+

Double-Submit Prevention

+

To avoid that the same content of a form gets submitted and therefore processed multiple times, it is possible to use the tag @@ -2723,8 +2736,10 @@ within every JSF form-tag, you would lik

-
-

Tips

+
+
+

Tips

+

Using errorView, DefaultErrorView or ViewNavigationHandler will fail with Weld versions older than 1.1.10 due to @@ -2732,7 +2747,6 @@ with Weld versions older than 1.1.10 due

-
@@ -2767,34 +2781,44 @@ with Weld versions older than 1.1.10 due
Modified: deltaspike/site/trunk/content/documentation/partial-bean.html URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation/partial-bean.html?rev=1679029&r1=1679028&r2=1679029&view=diff ============================================================================== --- deltaspike/site/trunk/content/documentation/partial-bean.html (original) +++ deltaspike/site/trunk/content/documentation/partial-bean.html Tue May 12 18:37:06 2015 @@ -281,7 +281,7 @@ table.CodeRay td.code>pre{padding:0}
-

Configure Your Projects

+

Project Setup

The configuration information provided here is for Maven-based projects and it assumes that you have already declared the DeltaSpike version and DeltaSpike Core module for your projects, as detailed in Configure DeltaSpike in Your Projects. For Maven-independent projects, see Configure DeltaSpike in Maven-independent Projects.

@@ -308,12 +308,6 @@ table.CodeRay td.code>pre{padding:0} </dependency>
-
-
-
-
-

Use the Module Features

-
@@ -326,8 +320,12 @@ Currently CDI Interceptors applied via @
-
-

@PartialBeanBinding

+
+
+
+
+

@PartialBeanBinding

+

Partial beans allow you to implement a generic handler to replace manual implementations of interfaces (or abstract classes).

@@ -369,7 +367,6 @@ interface (/abstract class) to generic h
-
@@ -395,17 +392,13 @@ interface (/abstract class) to generic h
Modified: deltaspike/site/trunk/content/documentation/scheduler.html URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation/scheduler.html?rev=1679029&r1=1679028&r2=1679029&view=diff ============================================================================== --- deltaspike/site/trunk/content/documentation/scheduler.html (original) +++ deltaspike/site/trunk/content/documentation/scheduler.html Tue May 12 18:37:06 2015 @@ -281,7 +281,7 @@ table.CodeRay td.code>pre{padding:0}
-

Configure Your Projects

+

Project Setup

The configuration information provided here is for Maven-based projects and it assumes that you have already declared the DeltaSpike version and DeltaSpike Core module for your projects, as detailed in Configure DeltaSpike in Your Projects. For Maven-independent projects, see Configure DeltaSpike in Maven-independent Projects.

@@ -350,10 +350,8 @@ table.CodeRay td.code>pre{padding:0}
-

Use the Module Features

+

@Scheduled

-
-

@Scheduled

Just annotate your Quartz-Jobs with @Scheduled and they will get picked up and passed to the scheduler automatically (during the @@ -424,8 +422,10 @@ schedule/install jobs dynamically.

-
-

Manual Scheduler Control

+
+
+

Manual Scheduler Control

+

Th SPI allows to control the scheduler (or integrate any other compatible scheduler as an alternative to Quartz2)

@@ -471,15 +471,16 @@ start a job once (without registering it
-
-

Custom Scheduler

+
+
+

Custom Scheduler

+

It is possible to replace the default integration with Quartz. Any scheduler that supports cron-expressions for job-classes can be used. For more information, see Scheduler javadoc.

-
@@ -512,21 +513,17 @@ For more information, see