ComponentSystemEventListener
instances
on a component in a page.
value for "name " tag attribute |
Type of event sent to listener method |
---|---|
preRenderComponent | javax.faces.event.PreRenderComponentEvent |
PostAddToView | javax.faces.event.PostAddToViewEvent |
preValidate | javax.faces.event.PreValidateEvent |
postValidate | javax.faces.event.PostValidateEvent |
In addition to these values, the fully qualified class name of any
java class that extends
javax.faces.event.ComponentSystemEvent
may be used as the
value of the "type" attribute.
Also, the @javax.faces.event.NamedEvent
annotation may
be attached to any java class that extends
javax.faces.event.ComponentSystemEvent
. This enables that
event to be referenced from this attribute, as descibed in the javadocs
for @NamedEvent
.
<f:view>
. This tag must reside within the
top level XHTML file for the given viewId, not in a
template. The implementation must insure that the direct
child of the facet is a UIPanel
, even if there
is only one child of the facet. The implementation must set
the id of the UIPanel
to be the value of the
UIViewRoot.METADATA_FACET_NAME
symbolic
constant.
The implementation must allow templating for this element according to the following pattern.
viewId XHTML page, page01.xhtml
Note line 4. The page author must ensure that the
<f:metadata>
element does not appear on a template or
included page. It must reside on the root page that corresponds to the
viewId.
The template page, template.xhtml
The page author is not required to use templating, but if
they do, it must be done as shown above, (or with
<ui:include>
in a similar manner).
UIViewParameter
extends UIInput
all of the attributes and nested child content for any
UIInput
tags are valid on this tag as well.
]]>ValueChangeEvent
parameter,
with a return type of void, or
to a public method that takes no arguments with a return type
of void. In the latter case, the method has no way of easily
knowing what the new value is, but this can be useful in cases
where a notification is needed that "this value
changed".
]]>
When iterating over the
select items, toString()
mest be called on the
string rendered attribute values.
Version 2 of the specification introduces several new attributes, described below. These are: var, itemValue, itemLabel, itemDescription, itemDisabled, and itemLabelEscaped.
]]>Collection
or array. The member elements may be instances of
SelectItem
or any Java Object. In the
case where the member elements are plain Java Objects,
several additional attributes must be used by the page
author to correctly identify the data to the enclosing
UISelectOne
or UISelectMany
component, as shown in the following example.
In the preceding example, the
value
attribute on line 1 points to a
Collection<HobbitBean>
. HobbitBean
is
just a regular Java Object (POJO) that conforms to JavaBeans naming
conventions for its properties. The value
attribute on
line 2 points to a List<HobbitBean>
, though it could
just as well point to a Collection
, array, or
javax.faces.model.DataModel
. The attributes on lines 3
through 9, inclusive, leverage the fact that the value is a collection
of POJOs.
value
attribute under this request scoped key so that it
may be referred to in EL for the value of other attributes.
]]>
Collection
, array, or Map
from which the items
to be shown will be rendered. ]]>
The implementation of this tag creates a special
ActionListener
instance and registers it on the
ActionSource
associated with our most immediate surrounding
instance of a tag whose implementation class is a subclass of
UIComponentTag
. This tag creates no output to the page
currently being created.
The ActionListener
instance created and installed by
this tag has the following behavior and contract.
ActionListener
instance
the first time the component for this tag is createdUsage outside of an EditableValueHolder
parent
If this element is nested within a
UIComponent
tag that has other
UIComponent
children, the validator will be
automatically added to all the child components as well as
this one. The implementation must ensure this occurs even if
the parent of this element is not an instance of
EditableValueHolder
.