Top Description Fields Constructors Methods
com.sun.faces.application.view

pack-priv Class FormOmittedChecker

extends Object
Class Inheritance
Imports
com.sun.faces.util.MessageUtils, java.util.EnumSet, .List, .Set, javax.faces.application.FacesMessage, javax.faces.component.ActionSource, .ActionSource2, .EditableValueHolder, .UIComponent, .UIForm, .UIViewRoot, javax.faces.component.visit.VisitCallback, .VisitContext, .VisitHint, .VisitResult, javax.faces.context.FacesContext

A convenience class that checks for omitted forms.

Field Summary

Modifier and TypeField and Description
private static String
SKIP_ITERATION_HINT

Stores the skip hint.

Constructor Summary

AccessConstructor and Description
private
FormOmittedChecker()

Constructor.

Method Summary

Modifier and TypeMethod and Description
private static void
addFormOmittedMessage(FacesContext
the Faces context.
context
,
UIComponent
the UI component.
component
)

Add the form omitted message.

public static void
check(FacesContext
the Faces context.
context
)

Check if omitted forms are present.

private static boolean

Returns:

true if it is a form, false otherwise.
isForm
(UIComponent
the UI component.
component
)

Is the component a form.

private static boolean

Returns:

true if the component is in need of a form, false otherwise.
isInNeedOfForm
(UIComponent
the UI component.
component
)

Is the component in need of a form.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

SKIP_ITERATION_HINTback to summary
private static String SKIP_ITERATION_HINT

Stores the skip hint.

Constructor Detail

FormOmittedCheckerback to summary
private FormOmittedChecker()

Constructor.

Method Detail

addFormOmittedMessageback to summary
private static void addFormOmittedMessage(FacesContext context, UIComponent component)

Add the form omitted message.

Parameters
context:FacesContext

the Faces context.

component:UIComponent

the UI component.

checkback to summary
public static void check(FacesContext context)

Check if omitted forms are present.

Parameters
context:FacesContext

the Faces context.

isFormback to summary
private static boolean isForm(UIComponent component)

Is the component a form.

Note normally a form inherits from UIForm, but there might be some component libraries out there that might not honor that. So we check the component family to avoid warning in cases where 3rd party form component that does not extend UIForm (eg. tr:form) is used.

Parameters
component:UIComponent

the UI component.

Returns:boolean

true if it is a form, false otherwise.

isInNeedOfFormback to summary
private static boolean isInNeedOfForm(UIComponent component)

Is the component in need of a form.

Parameters
component:UIComponent

the UI component.

Returns:boolean

true if the component is in need of a form, false otherwise.