com.sun.faces.metadata.taglib.faces.core.taglib.xml Maven / Gradle / Ivy
Show all versions of jakarta.faces Show documentation
Jakarta Faces Core Tag Library
The core Jakarta Faces
tags that are independent of any particular
RenderKit.
]]>
jakarta.faces.core
Register an ActionListener instance on the
UIComponent associated with the closest parent UIComponent
tag.
]]>
actionListener
com.sun.faces.facelets.tag.faces.core.ActionListenerHandler
binding
false
jakarta.faces.event.ActionListener
If present, this attribute
refers
to the value of one of the exposed attached objects within the
composite component inside of which this tag is nested.
]]>
for
false
java.lang.String
type
false
java.lang.String
Register an
AjaxBehavior instance on one or more UIComponents implementing
the ClientBehaviorHolder interface. This tag may be nested
witin a single component (enabling Ajax for a single component),
or it may be "wrapped" around multiple components (enabling Ajax
for many components).
The String value for ids
specified for execute and render may be specified as a search
expression as outlined in the JavaDocs for
UIComponent.findComponent()
. The implementation
must resolve these ids as specified for
UIComponent.findComponent()
. For example, consider
the following Facelets code.
- <h:form id="form_1">
- <h:panelGrid id="panel_1" rows="2">
- <!-- content irrelevant -->
- </h:panelGrid>
- </h:form>
-
- <h:form id="form_2">
- <h:commandButton id="button">
- <f:ajax render=":form1:panel_1 panel_2" />
- </h:commandButton>
- <h:panelGrid id="panel_2">
- <!-- content irrelevant -->
- </h:panelGrid>
- </h:form>
When the button is pressed,
panel_1, in form_1 will be re-rendered, along with panel_2 in
form_2.
]]>
ajax
com.sun.faces.facelets.tag.faces.core.AjaxHandler
If less than
delay milliseconds elapses between calls to
request() only the most recent one is sent and all other
requests are discarded. If this option is not specified, or if the
value of delay is the literal string 'none'
without the quotes, no delay is used.
]]>
delay
false
java.lang.String
A value of "true" indicates
the
AjaxBehavior should not be rendered. A value of "false"
indicates
the AjaxBehavior should be rendered. "false" is the default.
]]>
disabled
false
java.lang.Boolean
A String or
ValueExpression (that evalulates to a String) identifying the type of event
the Ajax action will apply to. If specified, it must be one of the
events supported by the component the Ajax behavior is being applied to.
For HTML components this would be the set of supported DOM events for the
component, plus "action" for Faces ActionSource components and "valueChange"
for Faces EditableValueHolder components. If not specified, the default
event is determined for the component. The DOM event name is the actual DOM
event name (for example: "click") as opposed to (for example: "onclick").
]]>
event
false
java.lang.String
Evaluates to
Collection<String>. This is a space separated list of
search expressions to
components that will participate in the "execute"
portion of the Request Processing Lifecycle. See the javadoc for
SearchKeywordResolver
for the complete list of
keywords. If a literal is specified the ids must be
space delimited. If
not specified, the default value of "@this" is assumed. For
example, @this clientIdOne clientIdTwo
.
When nested within a composite component,
and the value contains or implies the keyword @this
,
then the keyword must be remapped to the targets
attribute of the associated <composite:clientBehavior>
declaration, if any,
else if the value is not an absolute search expression,
then it must be reinterpreted relative to the location of the <f:ajax>
declaration.
]]>
execute
false
java.util.Collection
If "true" behavior events
generated from this behavior
are broadcast during Apply Request Values phase. Otherwise, the
events will be
broadcast during Invoke Aplications phase
]]>
immediate
false
java.lang.Boolean
Method expression referencing
a method
that will be called when an AjaxBehaviorEvent has been
broadcast for the listener.
]]>
listener
false
public void
processAjaxBehavior(jakarta.faces.event.AjaxBehaviorEvent event)
throws jakarta.faces.event.AbortProcessingException
The name of the JavaScript
function that will handle errors.
]]>
onerror
false
java.lang.String
The name of the JavaScript
function that will handle UI events.
]]>
onevent
false
java.lang.String
Evaluates to
Collection<String>. The search expressions to
components that will participate in the "render" portion
of the Request Processing Lifecycle. See the javadoc for
SearchKeywordResolver
for the complete list of
keywords. If a literal is specified the identifiers must
be space delimited. If not specified, the
default value of "@none" is assumed. For example, @this
clientIdOne clientIdTwo
.
When nested within a composite component,
and the value contains or implies the keyword @this
,
then the keyword must be remapped to the client ID of the associated <composite:implementation>
,
else if the value is not an absolute search expression,
then it must be reinterpreted relative to the location of the <f:ajax>
declaration.
]]>
render
false
java.util.Collection
Reset specific input values.
Interpret the value of the render
attribute as
a space separated list of client identifiers suitable for
passing directly to UIViewRoot.resetValues()
.
The implementation must cause an ActionListener
to be attached to the ActionSource
component
in which this tag is nested that calls
UIViewRoot.resetValues()
passing the value of
the render
attribute as the argument.
]]>
resetValues
false
java.lang.Boolean
Add an attribute to the UIComponent associated with the closest
parent UIComponent tag.
]]>
attribute
com.sun.faces.facelets.tag.faces.core.AttributeHandler
The name of the component attribute to be set.
]]>
name
java.lang.String
The value of the component attribute to be set.
]]>
value
java.lang.Object
Add attributes to the UIComponent associated with the closest
parent UIComponent tag.
For each Map.Entry
in the Map<String, Object>
referenced by the value attribute of this tag, take the following action.
If parent.getAttributes().containsKey(entry.getKey())
returns
true
, take no action for this entry. Otherwise, if
entry.getValue()
is a ValueExpression
call
parent.setValueExpression(entry.getKey(), entry.getValue())
.
Otherwise, call parent.getAttributes.put(entry.getKey(), entry.getValue()).
]]>
attributes
com.sun.faces.facelets.tag.faces.core.AttributesHandler
An EL ValueExpression
that evaluates to a Map<String, Object>
.]]>
value
true
java.util.Map
Register a
DateTimeConverter instance on the UIComponent associated
with the closest parent UIComponent tag.
]]>
convertDateTime
jakarta.faces.DateTime
com.sun.faces.facelets.tag.faces.core.ConvertDateTimeHandler
A ValueExpression that evaluates to an instance of
jakarta.faces.convert.DateTimeConverter.
]]>
binding
jakarta.faces.convert.DateTimeConverter
Predefined
formatting style which determines how the date component
of a date string is to be formatted and parsed. Applied
only if type is "date", "both", "localDate",
"localDateTime", or "zonedDateTime". Valid values
are "default", "short", "medium", "long", and "full".
Default value is "default". If a java.time
formatter is being used, yet the dateStyle is set to "default",
the value "medium" is assumed.
]]>
dateStyle
java.lang.String
If present, this attribute
refers
to the value of one of the exposed attached objects within the
composite component inside of which this tag is nested.
]]>
for
false
java.lang.String
Locale whose predefined styles for dates and times are used
during formatting or parsing. If not specified, the Locale
returned by FacesContext.getViewRoot().getLocale() will be used.
Value must be either a VB expression that evaluates to a
java.util.Locale instance, or a String that is valid to pass as
the first argument to the constructor java.util.Locale(String
language, String country). The empty string is passed as the
second argument.
]]>
locale
false
java.lang.Object
Custom formatting pattern which determines how the
date/time string should be formatted and parsed.
]]>
pattern
java.lang.String
Predefined
formatting style which determines how the time component of a
date string is to be formatted and
parsed. Applied only if type is "time", "both",
"localTime" or
"offsetTime".
Valid values are "default", "short", "medium", "long",
and "full". Default value is "default". If a java.time
formatter is being used, yet the timeStyle is set to "default",
the value "medium" is assumed.
]]>
timeStyle
java.lang.String
Time zone in which to interpret any time information in the date
String. Value must be either a ValueExpression that evaluates to
a java.util.TimeZone instance, or a String that is a timezone ID
as described in the javadocs for
java.util.TimeZone.getTimeZone().
]]>
timeZone
java.lang.Object
Specifies what
contents the string value will be formatted to include, or
parsed expecting. Valid values are "date", "time",
"both", "localDate",
"localDateTime", "localTime", "offsetTime",
"offsetDateTime", and "zonedDateTime". The values starting
with "local", "offset" and "zoned" correspond to Java SE 8
Date Time API classes in package java.time
with
the name derived by upper casing the first letter. For
example, java.time.LocalDate
for the value
"localDate". Default value is "date".
]]>
type
java.lang.String
tag.
]]>
convertNumber
jakarta.faces.Number
com.sun.faces.facelets.tag.faces.core.ConvertNumberHandler
A ValueExpression that evaluates to an instance of
jakarta.faces.convert.NumberConverter.
]]>
binding
jakarta.faces.convert.NumberConverter
ISO 4217 currency code, applied only when
formatting currencies.
]]>
currencyCode
java.lang.String
Currency symbol, applied only when formatting
currencies.
]]>
currencySymbol
java.lang.String
If present, this attribute
refers
to the value of one of the exposed attached objects within the
composite component inside of which this tag is nested.
]]>
for
false
java.lang.String
Flag specifying whether formatted output will
contain grouping separators. Expressions must
evaluate to a boolean. Default value
is true.
]]>
groupingUsed
java.lang.Boolean
Flag specifying whether only the integer part
of the value will be formatted and parsed.
Expressions must evaluate to a boolean.
Default value is false.
]]>
integerOnly
java.lang.Boolean
Locale
whose
predefined styles for numbers are used during formatting
and parsing. If not specified, the Locale returned by
FacesContext.getViewRoot().getLocale() will be used.
Expressions must evaluate to a java.util.Locale or a String that is valid to
pass as the first argument to the constructor
java.util.Locale(String language, String country). The
empty string is passed as the second argument.
]]>
locale
java.lang.Object
Maximum number of digits that will be formatted
in the fractional portion of the output. Expressions
must evaluate to an int.
]]>
maxFractionDigits
java.lang.Integer
Maximum number of digits that will be formatted
in the integer portion of the output. Expressions
must evaluate to an int.
]]>
maxIntegerDigits
java.lang.Integer
Minimum number of digits that will be formatted
in the fractional portion of the output. Expressions
must evaluate to an int.
]]>
minFractionDigits
java.lang.Integer
Minimum number of digits that will be formatted
in the integer portion of the output. Expressions
must evaluate to an int.
]]>
minIntegerDigits
java.lang.Integer
Custom formatting pattern which determins how the
number string should be formatted and parsed.
]]>
pattern
java.lang.String
Specifies how the number string will be formatted
and parsed. Valid values are "number", "currency",
and "percent". Default value is "number".
]]>
type
java.lang.String
Register a named Converter instance on the UIComponent
associated with the closest parent UIComponent tag.
]]>
converter
com.sun.faces.facelets.tag.faces.core.ConvertDelegateHandler
A ValueExpression that evaluates to an object that
implements jakarta.faces.convert.Converter.
]]>
binding
jakarta.faces.convert.Converter
Converter identifier of the Converter instance to be
created and registered.
]]>
converterId
java.lang.String
If present, this attribute
refers
to the value of one of the exposed attached objects within the
composite component inside of which this tag is nested.
]]>
for
false
java.lang.String
Allow Jakarta Faces page authors to
install ComponentSystemEventListener
instances
on a component in a page.
]]>
event
com.sun.faces.facelets.tag.faces.core.EventHandler
The expression must
evaluate to a public method that takes a
ComponentSystemEvent
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 where the event
came from, but this can be useful in cases where a
notification is needed that "an event happened".
]]>
listener
true
public void
listener(jakarta.faces.event.ComponentSystemEvent event) throws
jakarta.faces.event.AbortProcessingException
Name of the event for which
to install a listener. The following table lists the
valid values for this attribute, and the corresponding
event type for which the listener action is
registered.
value for "type
" tag
attribute
Type of event sent to listener method
preRenderComponent
jakarta.faces.event.PreRenderComponentEvent
preRenderView
jakarta.faces.event.PreRenderViewEvent
postAddToView
jakarta.faces.event.PostAddToViewEvent
preValidate
jakarta.faces.event.PreValidateEvent
postValidate
jakarta.faces.event.PostValidateEvent
In addition to these values, the fully qualified class name of any
java class that extends
jakarta.faces.event.ComponentSystemEvent
may be used as the
value of the "type" attribute.
Also, the @jakarta.faces.event.NamedEvent
annotation may
be attached to any java class that extends
jakarta.faces.event.ComponentSystemEvent
. This enables that
event to be referenced from this attribute, as descibed in the javadocs
for @NamedEvent
.
]]>
type
true
java.lang.String
Register a named
facet on the UIComponent associated with the closest parent
UIComponent tag.
When the facet contains more than one child the children will be
automatically put in a container UIPanel.
]]>
facet
com.sun.faces.facelets.tag.faces.core.FacetHandler
Name of the facet to be created.
]]>
name
true
java.lang.String
Used inside of the metadata facet of a view, this tag will import a mapping of all constant field values of the given type in the current view.
Constant field values are all public static final
fields of the given type.
The map key represents the constant field name as String
.
The map value represents the actual constant field value.
This works for classes, interfaces and enums.
]]>
importConstants
jakarta.faces.ImportConstants
The fully qualified name of the type to import the constant field values for.
]]>
type
true
java.lang.String
Name of request scope attribute under which constants will be exposed as a Map.
Defaults to the simple name of the given type.
]]>
var
false
Load a resource bundle localized for the Locale of the current
view, and expose it as a java.util.Map in the request attributes
of the current request under the key specified by the value of the
"var" attribute of this tag. The Map must behave such that if a
get() call is made for a key that does not exist in the Map, the
literal string ???KEY??? is returned from the Map, where KEY is
the key being looked up in the Map, instead of a
MissingResourceException being thrown. If the ResourceBundle does
not exist, a TagAttributeException must be thrown.
]]>
loadBundle
com.sun.faces.facelets.tag.faces.core.LoadBundleHandler
Base name of the resource bundle
to be loaded.
]]>
basename
java.lang.String
Name of a request scope attribute under which
the resource bundle will be exposed as a Map.
]]>
var
true
java.lang.String
Declare the metadata
facet for this view. This must be a child of the
<f:view>
. This tag
must reside within the top level XHTML file for the given
viewId, or in a
template client, but 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.
template client XHTML view, view01.xhtml
- <ui:composition
template="template.xhtml">
-
<ui:define name="metadata">
-
<f:metadata>
-
<f:viewParam
name="id"/>
-
</f:metadata>
-
</ui:define>
-
<ui:define name="content">
-
<h1>The
big news stories of the day</h1>
-
</ui:define>
- </ui:composition>