Top Description Inners Methods
jakarta.faces.annotation

public @Interface View

extends Annotation
Known Direct Implementers
jakarta.faces.annotation.View.Literal
Annotations
@Target:TYPE, METHOD, PARAMETER, FIELD
@Retention:RUNTIME
@Qualifier
@Documented
Static Imports
java.lang.annotation.ElementType.FIELD, .ElementType.METHOD, .ElementType.PARAMETER, .ElementType.TYPE, .RetentionPolicy.RUNTIME

The presence of this annotation on a target (type, method, parameter or field) within an application is used to indicate that this target is somehow handling a Faces View Id or Ids.

The exact way in which such view is handled depends on the annotated element in question.

Since
4.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
View.Literal

Supports inline instantiation of the View annotation.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the Faces View Id pattern
value
()

Set the Faces View Id pattern.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public String value()

Set the Faces View Id pattern.

The Faces View Id pattern can represent a single view, such as "/index.xhtml", or a pattern like "/foo/bar/*". Though the exact interpretation of the Faces View Id for a single view is ultimately defined by the annotated element, in general it should align with the return value from an action expression (see ActionSource#setActionExpression(jakarta.el.MethodExpression)
Returns:String

the Faces View Id pattern

jakarta.faces.annotation back to summary

public final Class View.Literal

extends AnnotationLiteral<View>
implements View
Class Inheritance
All Implemented Interfaces
jakarta.faces.annotation.View, java.lang.annotation.Annotation

Supports inline instantiation of the View annotation.

Field Summary

Modifier and TypeField and Description
public static final View.Literal
INSTANCE

Instance of the View qualifier.

private static final long
private final String

Constructor Summary

AccessConstructor and Description
private
Literal(String value)

Method Summary

Modifier and TypeMethod and Description
public static View.Literal
of(String value)

public String
value()

Implements jakarta.faces.annotation.View.value.

Set the Faces View Id pattern.

Inherited from jakarta.enterprise.util.AnnotationLiteral:
annotationTypeequalshashCodetoString

Field Detail

INSTANCEback to summary
public static final View.Literal INSTANCE

Instance of the View qualifier.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides jakarta.enterprise.util.AnnotationLiteral.serialVersionUID.

valueback to summary
private final String value

Constructor Detail

Literalback to summary
private Literal(String value)

Method Detail

ofback to summary
public static View.Literal of(String value)
valueback to summary
public String value()

Implements jakarta.faces.annotation.View.value.

Doc from jakarta.faces.annotation.View.value.

Set the Faces View Id pattern.

The Faces View Id pattern can represent a single view, such as "/index.xhtml", or a pattern like "/foo/bar/*". Though the exact interpretation of the Faces View Id for a single view is ultimately defined by the annotated element, in general it should align with the return value from an action expression (see ActionSource#setActionExpression(jakarta.el.MethodExpression)
Returns:String

the Faces View Id pattern

Annotations
@Override