Top Description Inners Constructors Methods
com.sun.faces.application

public Class ValidateComponentNesting

extends Object
implements SystemEventListener
Class Inheritance
All Implemented Interfaces
javax.faces.event.SystemEventListener, javax.faces.event.FacesListener, java.util.EventListener
Imports
java.util.EnumSet, javax.faces.application.FacesMessage, .ProjectStage, javax.faces.component.ActionSource, .ActionSource2, .EditableValueHolder, .UIComponent, .UIForm, .UIViewAction, .UIViewParameter, .UIViewRoot, javax.faces.component.visit.VisitCallback, .VisitContext, .VisitHint, .VisitResult, javax.faces.context.FacesContext, javax.faces.event.AbortProcessingException, .SystemEvent, .SystemEventListener, com.sun.faces.util.MessageUtils

ValidateFormComponentNesting performs component tree validation to assure ActionSource , ActionSource2 and EditableValueHolder components are placed inside a form. ValidateFormComponentNesting is installed automatically if ProjectStage#Development is active.

Author
dueni

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static void
addOmittedMessage(FacesContext jsf, String clientId, String key)

method for adding a message regarding missing ancestor to context

public boolean
isListenerForSource(Object
the source that is inquiring about the appropriateness of sending an event to this listener instance.
source
)

Implements javax.faces.event.SystemEventListener.isListenerForSource.

This method must return true if and only if this listener instance is interested in receiving events from the instance referenced by the source parameter.

public void
processEvent(SystemEvent
the SystemEvent instance that is being processed.
event
)

Implements javax.faces.event.SystemEventListener.processEvent.

Process PostAddToViewEvent on UIViewRoot to validate form - action/input nesting.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ValidateComponentNestingback to summary
public ValidateComponentNesting()

Method Detail

addOmittedMessageback to summary
private static void addOmittedMessage(FacesContext jsf, String clientId, String key)

method for adding a message regarding missing ancestor to context

isListenerForSourceback to summary
public boolean isListenerForSource(Object source)

Implements javax.faces.event.SystemEventListener.isListenerForSource.

Doc from javax.faces.event.SystemEventListener.isListenerForSource.

This method must return true if and only if this listener instance is interested in receiving events from the instance referenced by the source parameter.

Parameters
source:Object

the source that is inquiring about the appropriateness of sending an event to this listener instance.

Returns:boolean

the value as specified above

Annotations
@Override
processEventback to summary
public void processEvent(SystemEvent event) throws AbortProcessingException

Implements javax.faces.event.SystemEventListener.processEvent.

Process PostAddToViewEvent on UIViewRoot to validate form - action/input nesting.

Parameters
event:SystemEvent

Doc from javax.faces.event.SystemEventListener.processEvent.

the SystemEvent instance that is being processed.

Annotations
@Override
Exceptions
AbortProcessingException:

Doc from javax.faces.event.SystemEventListener.processEvent.

if lifecycle processing should cease for this request.

com.sun.faces.application back to summary

pack-priv Class ValidateComponentNesting.ValidateFormNestingCallback

extends Object
implements VisitCallback
Class Inheritance
  • java.lang.Object
  • com.sun.faces.application.ValidateComponentNesting.ValidateFormNestingCallback
All Implemented Interfaces
javax.faces.component.visit.VisitCallback

Field Summary

Modifier and TypeField and Description
pack-priv boolean
pack-priv boolean

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public VisitResult
visit(VisitContext
the VisitContext for this tree visit.
context
,
UIComponent
the UIComponent to visit
target
)

Implements javax.faces.component.visit.VisitCallback.visit.

This method is called during component tree visits by VisitContext.invokeVisitCallback() to visit the specified component.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

reportedOmittedFormOnceback to summary
pack-priv boolean reportedOmittedFormOnce
reportedOmittedMetadataOnceback to summary
pack-priv boolean reportedOmittedMetadataOnce

Constructor Detail

ValidateFormNestingCallbackback to summary
pack-priv ValidateFormNestingCallback()

Method Detail

visitback to summary
public VisitResult visit(VisitContext context, UIComponent target)

Implements javax.faces.component.visit.VisitCallback.visit.

Doc from javax.faces.component.visit.VisitCallback.visit.

This method is called during component tree visits by VisitContext.invokeVisitCallback() to visit the specified component. At the point in time when this method is called, the argument target is guaranteed to be in the proper state with respect to its ancestors in the View.

Parameters
context:VisitContext

the VisitContext for this tree visit.

target:UIComponent

the UIComponent to visit

Returns:VisitResult

a VisitResult that indicates whether to continue visiting the component's subtree, skip visiting the component's subtree or end the visit.

Annotations
@Override