uCosminexus Application Server, Web Container Functionality Guide
This section describes the details on JSF functionalities.
When you develop a Web application using JSF, you can use various JSF functionalities such as defining access to the page view, page re-use, changing or validating types of input values from the client, and controlling events in the application.
You use the ManagedBean or the Expression Language functionality to implement most of the functionalities of JSF.
ManagedBean is a JavaBean that defines methods and the data to be used in the JSP and Facelets pages. For details on ManagedBean, see the JSF specifications.
The Expression Language functionality associates properties and methods defined in the ManagedBean with attributes of the JSF tags by coding properties and methods in a prescribed format. The Expression Language functionality is a part of the JSP specifications. For details, see the JSF specifications.
The following table describes functionalities of the Bean Validation that can be used from JSF.
Table 3-2 Functionalities of Bean Validation that can be used from JSF
No. | Functionality | Overview | |
---|---|---|---|
1 | Validation of input values | This functionality uses the specified validation definitions to verify the values set in ManagedBean. | |
Group management functionality | This functionality groups validations. | ||
Message management functionality | This functionality manages the messages that are returned when the validation result is an error. | ||
2 | Create custom validator | This functionality creates independent validation processes. |
You can use the functionalities of the Bean Validation by specifying annotations. The following table describes annotation classes that can be specified for using the functionalities of the Bean Validation. The table also describes the types of variables that can be specified as well as the operations performed when an invalid type of variable is specified.
Table 3-3 Annotation classes and variable types that can be specified in the Bean Validation
No. | Annotation class | Variable type that can be specified | Behavior when an invalid variable type is specified | Remarks |
---|---|---|---|---|
1 | Null | You can specify any type of variable | -- | -- |
2 | NotNull | You can specify any type of variable | -- | -- |
3 | AssertTrue |
|
javax.validation.UnexpectedTypeException is thrown. | -- |
4 | AssertFalse |
|
javax.validation.UnexpectedTypeException is thrown. | -- |
5 | Min |
|
javax.validation.UnexpectedTypeException is thrown. | -- |
6 | Max |
|
javax.validation.UnexpectedTypeException is thrown. | -- |
7 | DecimalMin |
|
javax.validation.UnexpectedTypeException is thrown. | javax.validation.ValidationException is thrown if you specify a value that cannot be parsed by java.math.BigDecimal, for the value attribute. |
8 | DecimalMax |
|
javax.validation.UnexpectedTypeException is thrown. | javax.validation.ValidationException is thrown if you specify a value that cannot be parsed by java.math.BigDecimal, for the value attribute. |
9 | Size |
|
javax.validation.UnexpectedTypeException is thrown. | javax.validation.ValidationException is thrown if you specify a negative value for the max or min attribute. javax.validation.ValidationException is thrown if you specify a value greater than max, in min. |
10 | Digits |
|
javax.validation.UnexpectedTypeException is thrown. | javax.validation.ValidationException is thrown if you specify a negative value for the integer or fraction attribute. |
11 | Past |
|
javax.validation.UnexpectedTypeException is thrown. | -- |
12 | Future |
|
javax.validation.UnexpectedTypeException is thrown. | -- |
13 | Pattern |
|
javax.validation.UnexpectedTypeException is thrown. | javax.validation.ValidationException is thrown if the value that you have specified for the regexp attribute is incorrect as a regular expression. Whether an expression is regular depends on the java.util.regex.Pattern specifications. |
JSF operations in Application Server are as follows:
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.