JSF Core Facelets Tag Library.


Standard Syntax:
     <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>

XML Syntax:
     <anyxmlelement xmlns:f="http://java.sun.com/jsf/core" />

This tag library implements the standard JSF core tags for Facelets.

Tag Library Information
Display NameJSF Core Facelets Tag Library.
Version2.0
Short Namef
URIhttp://java.sun.com/jsf/core
 

Tag Summary
subviewBase class for components that provide a new "namespace" for the ids of their child components.

See the javadocs for interface NamingContainer for further details.

viewParamTODO: documentation on jsp and pld are not the same. It appear two params: maxlength and for, but no property getter and setter founded here. If maxlength is used, we can put something like this: JSFJspProperty(name = "maxlength", returnType = "java.lang.String")
paramThis tag associates a parameter name-value pair with the nearest parent UIComponent. A UIComponent is created to represent this name-value pair, and stored as a child of the parent component; what effect this has depends upon the renderer of that parent component.

Unless otherwise specified, all attributes accept static values or EL expressions.

selectItemThis tag associates a single SelectItem with the nearest parent UIComponent. The item represents a single option for a component such as an h:selectBooleanCheckbox or h:selectOneMenu. See also component selectItems.

Unless otherwise specified, all attributes accept static values or EL expressions.

UISelectItem should be nestetd inside a UISelectMany or UISelectOne component, and results in the addition of a SelectItem instance to the list of available options for the parent component

validateBean

BeanValidator is a {@link javax.faces.validator.Validator} that doesn't do any validation itself, but delegates validation logic to Bean Validation.

validateDoubleRangeCreates a validator and associateds it with the nearest parent UIComponent. When invoked, the validator ensures that values are valid doubles that lie within the minimum and maximum values specified. Commonly associated with a h:inputText entity. Unless otherwise specified, all attributes accept static values or EL expressions. see Javadoc of JSF Specification
validateLengthCreates a validator and associateds it with the nearest parent UIComponent. When invoked, the validator ensures that values are valid strings with a length that lies within the minimum and maximum values specified. Commonly associated with a h:inputText entity. Unless otherwise specified, all attributes accept static values or EL expressions. see Javadoc of JSF Specification
validateLongRangeCreates a validator and associateds it with the nearest parent UIComponent. When invoked, the validator ensures that values are valid longs that lie within the minimum and maximum values specified. Commonly associated with a h:inputText entity. Unless otherwise specified, all attributes accept static values or EL expressions. see Javadoc of JSF Specification
validateRegex

RegexValidator is a {@link javax.faces.validator.Validator} that checks the value of the corresponding component against specified pattern using Java regular expression syntax. The regular expression syntax accepted by the RegexValidator class is same as mentioned in class {@link java.util.regex.Pattern} in package java.util.regex.

The following algorithm is implemented:

  • If the passed value is null, exit immediately.
  • If the passed value is not a String, exit with a {@link #NOT_MATCHED_MESSAGE_ID} error message.
  • If no pattern has been set, or pattern resolves to null or an empty String, throw a {@link javax.faces.validator.ValidatorException} with a {@link #PATTERN_NOT_SET_MESSAGE_ID} message.
  • If pattern is not a valid regular expression, according to the rules as defined in class {@link java.util.regex.Pattern}, throw a {@link ValidatorException} with a (@link #MATCH_EXCEPTION_MESSAGE_ID} message.
  • If a pattern property has been configured on this {@link javax.faces.validator.Validator}, check the passed value against this pattern. If value does not match pattern throw a {@link ValidatorException} containing a {@link #NOT_MATCHED_MESSAGE_ID} message.
validateRequiredCheck if a value is empty, in the same way as set UIInput required property to true (including all rules related to this property).
actionListenerThis tag creates an instance of the specified ActionListener, and associates it with the nearest parent UIComponent.

Unless otherwise specified, all attributes accept static values or EL expressions.

Register an ActionListener instance on the UIComponent associated with the closest parent UIComponent custom action.

See tag documentation.

ajaxThis tag creates an instance of AjaxBehavior, and associates it with the nearest parent UIComponent that implements ClientBehaviorHolder interface. This tag can be used on single or composite components.

Unless otherwise specified, all attributes accept static values or EL expressions.

According to the documentation, the tag handler implementing this tag should meet the following conditions:

  • Since this tag attach objects to UIComponent instances, and those instances implements Behavior interface, this component should implement BehaviorHolderAttachedObjectHandler interface.
  • f:ajax does not support binding property. In theory we should do something similar to f:convertDateTime tag does: extends from ConverterHandler and override setAttributes method, but in this case BehaviorTagHandlerDelegate has binding property defined, so if we extend from BehaviorHandler we add binding support to f:ajax.
  • This tag works as a attached object handler, but note on the api there is no component to define a target for a behavior. See comment inside apply() method.
attributeThis tag associates an attribute with the nearest parent UIComponent.

When the value is not an EL expression, this tag has the same effect as calling component.getAttributes.put(name, value). When the attribute name specified matches a standard property of the component, that property is set. However it is also valid to assign attributes to components using any arbitrary name; the component itself won't make any use of these but other objects such as custom renderers, validators or action listeners can later retrieve the attribute from the component by name.

When the value is an EL expression, this tag has the same effect as calling component.setValueBinding. A call to method component.getAttributes().get(name) will then cause that expression to be evaluated and the result of the expression is returned, not the original EL expression string.

See the javadoc for UIComponent.getAttributes for more details.

Unless otherwise specified, all attributes accept static values or EL expressions.

Sets the specified name and attribute on the parent UIComponent. If the "value" specified is not a literal, it will instead set the ValueExpression on the UIComponent.

See tag documentation.

convertDateTimeThis tag associates a date time converter with the nearest parent UIComponent. Unless otherwise specified, all attributes accept static values or EL expressions. see Javadoc of JSF Specification

Register a DateTimeConverter instance on the UIComponent associated with the closest parent UIComponent custom action.

See tag documentation.

converterThis tag creates an instance of the specified Converter, and associates it with the nearest parent UIComponent.

Register a named Converter instance on the UIComponent associated with the closest parent UIComponent custom action.

See tag documentation.

convertNumberThis tag creates a number formatting converter and associates it with the nearest parent UIComponent. Unless otherwise specified, all attributes accept static values or EL expressions. see Javadoc of JSF Specification

Register a NumberConverter instance on the UIComponent associated with the closest parent UIComponent custom action.

See tag documentation.

eventRegisters a listener for a given system event class on the UIComponent associated with this tag.
facetThis tag adds its child as a facet of the nearest parent UIComponent. A child consisting of multiple elements should be nested within a container component (i.e., within an h:panelGroup for HTML library components). Unless otherwise specified, all attributes accept static values or EL expressions. see Javadoc of JSF Specification

Register a named facet on the UIComponent associated with the closest parent UIComponent custom action.

See tag documentation.

loadBundleLoads a resource bundle and saves it as a variable in the request scope.

Unless otherwise specified, all attributes accept static values or EL expressions.

TODO: We should find a way to save loaded bundles in the state, because otherwise on the next request the bundle map will not be present before the render phase and value bindings that reference to the bundle will always log annoying "Variable 'xxx' could not be resolved" error messages.

Load a resource bundle localized for the Locale of the current view, and expose it (as a Map) in the request attributes of the current request.

See tag documentation.

phaseListenerRegister a PhaseListener instance

null

selectItemsThis tag associates a set of selection list items with the nearest parent UIComponent. The set of SelectItem objects is retrieved via a value-binding.

Unless otherwise specified, all attributes accept static values or EL expressions.

UISelectItems should be nested inside a UISelectMany or UISelectOne component, and results in the addition of one ore more SelectItem instance to the list of available options for the parent component

null

setPropertyActionListener

null

validatorCreates a validator and associates it with the nearest parent UIComponent.

During the validation phase (or the apply-request-values phase for immediate components), if the associated component has any submitted value and the conversion of that value to the required type has succeeded then the specified validator type is invoked to test the validity of the converted value.

Commonly associated with an h:inputText entity, but may be applied to any input component.

Some validators may allow the component to use attributes to define component-specific validation constraints; see the f:attribute tag. See also the "validator" attribute of all input components, which allows a component to specify an arbitrary validation <i>method</i> (rather than a registered validation type, as this tag does).

Unless otherwise specified, all attributes accept static values or EL expressions.

Register a named Validator instance on the UIComponent associated with the closest parent UIComponent custom action.

See tag documentation.

valueChangeListenerAdds the specified ValueChangeListener to the nearest parent UIComponent (which is expected to be a UIInput component).

Whenever the form containing the parent UIComponent is submitted, an instance of the specified type is created. If the submitted value from the component is different from the component's current value then a ValueChangeEvent is queued. When the ValueChangeEvent is processed (at end of the validate phase for non-immediate components, or at end of the apply-request-values phase for immediate components) the object's processValueChange method is invoked.

Unless otherwise specified, all attributes accept static values or EL expressions.

Register an ValueChangeListener instance on the UIComponent associated with the closest parent UIComponent custom action.

See tag documentation.

verbatim

Handler for f:verbatim

viewCreates a JSF View, which is a container that holds all of the components that are part of the view.

Unless otherwise specified, all attributes accept static values or EL expressions.

See the javadoc for this class in the JSF Specification for further details.

Container for all JavaServer Faces core and custom component actions used on a page.

See tag documentation.

metadataDefines the view metadata. It is expected that this tag contains only one or many f:viewParam tags.
 

Listeners
org.apache.myfaces.webapp.StartupServletContextListener
 


Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-3 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.