public class MoveComponent extends UtilFamily implements SystemEventListener, ClientBehaviorHolder
The <o:moveComponent>
component is a utility component via which components, facets and behaviors can be moved at runtime
to a target component in various ways. This allows for simple programmatic composition of components using a declarative page author
centric approach.
The destination of a move operation is specified in terms of a location that's relative to a given target component. The following shows a list of supported destinations:
BEFORE
- Component is moved right before target component, i.e. as a sibling with an index that's 1 position lower
ADD_FIRST
- Component is added as the first child of the target component, any other children will have their index increased by 1
ADD_LAST
- Component is added as the last child of the target component, any other children will stay at their original location
FACET
- Component will be moved to the facet section of the target component under the name denoted by "facet"
BEHAVIOR
- A Behavior will be moved to the behavior section of the target component
AFTER
- Component is moved right after target component, i.e. as a sibling with an index that's 1 position higher
Modifier and Type | Class and Description |
---|---|
static class |
MoveComponent.Destination |
Modifier and Type | Field and Description |
---|---|
static String |
COMPONENT_TYPE |
static String |
DEFAULT_SCOPE |
COMPONENT_FAMILY
ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY
Constructor and Description |
---|
MoveComponent() |
Modifier and Type | Method and Description |
---|---|
void |
addClientBehavior(String eventName,
ClientBehavior behavior) |
void |
doProcess() |
String |
getBehaviorDefaultEvent() |
String |
getBehaviorEvents() |
String |
getDefaultEventName() |
MoveComponent.Destination |
getDestination() |
Collection<String> |
getEventNames() |
String |
getFacet() |
String |
getFor() |
boolean |
isListenerForSource(Object source) |
void |
processEvent(SystemEvent event) |
void |
setBehaviorDefaultEvent(String behaviorDefaultEventValue) |
void |
setBehaviorEvents(String behaviorEventsValue) |
void |
setDestination(MoveComponent.Destination destinationValue) |
void |
setFacet(String facetValue) |
void |
setFor(String nameValue) |
getFamily, getRendersChildren
addFacesListener, broadcast, clearInitialState, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getPassThroughAttributes, getRenderer, getRendererType, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, visitTree
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getClientBehaviors
public static final String COMPONENT_TYPE
public static final String DEFAULT_SCOPE
public boolean isListenerForSource(Object source)
isListenerForSource
in interface SystemEventListener
public void processEvent(SystemEvent event) throws AbortProcessingException
processEvent
in interface SystemEventListener
AbortProcessingException
public void addClientBehavior(String eventName, ClientBehavior behavior)
addClientBehavior
in interface ClientBehaviorHolder
addClientBehavior
in class UIComponentBase
public String getDefaultEventName()
getDefaultEventName
in interface ClientBehaviorHolder
getDefaultEventName
in class UIComponentBase
public Collection<String> getEventNames()
getEventNames
in interface ClientBehaviorHolder
getEventNames
in class UIComponentBase
public void doProcess()
public String getFor()
public void setFor(String nameValue)
public MoveComponent.Destination getDestination()
public void setDestination(MoveComponent.Destination destinationValue)
public String getFacet()
public void setFacet(String facetValue)
public String getBehaviorDefaultEvent()
public void setBehaviorDefaultEvent(String behaviorDefaultEventValue)
public String getBehaviorEvents()
public void setBehaviorEvents(String behaviorEventsValue)
Copyright © 2012–2015 OmniFaces. All rights reserved.