@ErrorView

Target: Class annotated with @StageDefinition or an attribute of a POJO annotated with @StageDefinition.

Description: Defines a view that will be used for redirection if a business exception is raised on the annotated stage. When used on attributes allows the definition of several error views (one per each attribute) and allows flow control. When used on the class the redirection is automatic.

Remarks: This annotation must not be used with @ErrorStage.

If used on an attribute it must be of type ViewObject.

JavaDoc: Click here

Attributes:

Name Description Data type Required Default value
engine The view rendering engine to use. String No Inferred from view extension.
target The ID of the view to redirect to. String Yes -
exceptions Comma-separated list of the FQNs of the exceptions associated with the injected view. String No java.lang.Exception

Example:

@ErrorView(target = "errorView.jsp", exceptions="my.package.MyException, my.package.MyOtherException")
public class MockupStage {
 ...
} 

See also:

Back to annotation reference