First page Back Continue Last page Graphics

Managed Properties


Notes:

Managed Properties

Managed properties are bean variables that are exposed through setter and getter methods for write/read access. All variables that are not explicitly set as Managed Properties will retain the default values upon bean instantiation.

The managed-property element represents an individual property of a managed bean. A managed property calls the equivalent setter method of the bean-on-bean initialization.

<!ELEMENT managed-property (description*, display-name*, icon*, property-name, property-class?, (map-entries|null-value|value|list-entries))>

The managed property element is nested within the <managed-bean> element. Managed properties must have a name and a value. Optionally, they can have a property class, a description, a display name, and an icon. The last three elements are for tools to display the property and have no meaning for the JSF application at run time.

The property class need not be mentioned for simple types because JSF can identify it on its own.

Though null is among the possible values for a managed property, it is allowed only if the property is an object. This means that null cannot be used for types such as integer, Boolean, and so on.