javax.faces.view.AttachedObjectHandler
, javax.faces.view.BehaviorHolderAttachedObjectHandler
public class EventHandler extends TobagoComponentHandler implements javax.faces.view.BehaviorHolderAttachedObjectHandler
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:
Modifier and Type | Class | Description |
---|---|---|
static class |
EventHandler.AjaxBehaviorListenerImpl |
Wraps a method expression in a AjaxBehaviorListener
|
Modifier and Type | Field | Description |
---|---|---|
static java.lang.Class<?>[] |
AJAX_BEHAVIOR_LISTENER_SIG |
Constructor | Description |
---|---|
EventHandler(javax.faces.view.facelets.ComponentConfig config) |
Modifier and Type | Method | Description |
---|---|---|
void |
apply(javax.faces.view.facelets.FaceletContext ctx,
javax.faces.component.UIComponent parent) |
|
void |
applyAttachedObject(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent parent) |
This method should create an AjaxBehavior object and attach it to the
parent component.
|
protected EventBehavior |
createBehavior(javax.faces.context.FacesContext context) |
|
java.lang.String |
getEventName() |
ViewDeclarationLanguage.retargetAttachedObjects uses it to check
if the the target to be processed is applicable for this handler
|
java.lang.String |
getFor() |
The documentation says this attribute should not be used since it is not
taken into account.
|
void |
onComponentCreated(javax.faces.view.facelets.FaceletContext faceletContext,
javax.faces.component.UIComponent component,
javax.faces.component.UIComponent parent) |
getComponentConfig, getTagHandlerDelegate, isNew
applyNextHandler, getBinding, getTag, getTagAttribute, getTagId, isDisabled, setAttributes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAttribute, getRequiredAttribute, toString
createMetaRuleset, onComponentPopulated
public static final java.lang.Class<?>[] AJAX_BEHAVIOR_LISTENER_SIG
public EventHandler(javax.faces.view.facelets.ComponentConfig config)
public void apply(javax.faces.view.facelets.FaceletContext ctx, javax.faces.component.UIComponent parent) throws java.io.IOException
apply
in class javax.faces.view.facelets.DelegatingMetaTagHandler
java.io.IOException
public java.lang.String getEventName()
getEventName
in interface javax.faces.view.BehaviorHolderAttachedObjectHandler
public void applyAttachedObject(javax.faces.context.FacesContext context, javax.faces.component.UIComponent parent)
Also, it should check if the parent can apply the selected AjaxBehavior to the selected component through ClientBehaviorHolder.getEventNames() or ClientBehaviorHolder.getDefaultEventName()
applyAttachedObject
in interface javax.faces.view.AttachedObjectHandler
protected EventBehavior createBehavior(javax.faces.context.FacesContext context)
public void onComponentCreated(javax.faces.view.facelets.FaceletContext faceletContext, javax.faces.component.UIComponent component, javax.faces.component.UIComponent parent)
onComponentCreated
in class javax.faces.view.facelets.ComponentHandler
public java.lang.String getFor()
getFor
in interface javax.faces.view.AttachedObjectHandler
Copyright © 2002–2018 The Apache Software Foundation. All rights reserved.