|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.faces.component.UIComponent javax.faces.component.UIComponentBase javax.faces.component.UIForm com.sun.rave.web.ui.component.FormBase com.sun.rave.web.ui.component.Form
Component that represents an input form.
Nested Class Summary | |
static class |
Form.VirtualFormDescriptor
|
Field Summary | |
static char |
ID_WILD_CHAR
|
Fields inherited from class javax.faces.component.UIForm |
COMPONENT_FAMILY, COMPONENT_TYPE |
Fields inherited from interface javax.faces.component.NamingContainer |
SEPARATOR_CHAR |
Constructor Summary | |
Form()
|
Method Summary | |
void |
addInternalVirtualForm(Form.VirtualFormDescriptor descriptor)
Add a VirtualFormDescriptor to the internal virtual forms. |
void |
discardSubmittedValue(javax.faces.component.EditableValueHolder inputField)
Ensure that the supplied EditableValueHolder component
will discard (rather than retain) its submitted value when a virtual
form is submitted in which the component does not participate. |
void |
discardSubmittedValues(java.lang.String virtualFormName)
Ensure that the participants in the supplied virtual form will discard (rather than retain) their submitted values when a different virtual form is submitted. |
javax.faces.component.UIComponent |
findComponentById(java.lang.String id)
Given a bare, partially qualified, or fully qualified id, find the component. |
static boolean |
fullyQualifiedIdMatchesPattern(java.lang.String fqId,
java.lang.String pattern)
Determine if the fully qualified id provided matches the supplied pattern. |
static Form.VirtualFormDescriptor[] |
generateVirtualForms(java.lang.String configStr)
Generate an array of VirtualFormDescriptor s based on a virtual form
configuration String . |
static java.lang.String |
generateVirtualFormsConfig(Form.VirtualFormDescriptor[] descriptors)
Generate a virtual form configuration String based on an
array of VirtualFormDescriptor s. |
java.lang.String |
getEnctype()
Use this attribute to set the content-type of the HTTP request generated by this form. |
static java.lang.String |
getFullyQualifiedId(javax.faces.component.UIComponent component)
Obtain the virtual form compatible fully-qualified id for the supplied component. |
Form.VirtualFormDescriptor |
getVirtualFormComponentSubmits(java.lang.String id)
Get the virtual form submitted by the component whose id is provided or null if the component does not submit a virtual form. |
static boolean |
isValidFullyQualifiedId(java.lang.String id)
Determine if the id provided is non-null and exhibits the traits of a fully qualified id. |
void |
processDecodes(javax.faces.context.FacesContext context)
Override UIForm.processDecodes(FacesContext) to ensure
correct virtual form processing. |
void |
queueEvent(javax.faces.event.FacesEvent event)
|
void |
restoreNonParticipatingSubmittedValues()
Restore the submitted values erased by the virtual form mechanism where appropriate. |
void |
setSubmittedVirtualForm(Form.VirtualFormDescriptor vfd)
|
void |
setVirtualForms(Form.VirtualFormDescriptor[] vfds)
The virtual forms within this literal form, represented as an array of Form.VirtualFormDescriptor objects. |
void |
setVirtualFormsConfig(java.lang.String configStr)
The configuration of the virtual forms within this literal form, represented as a String. |
Methods inherited from class com.sun.rave.web.ui.component.FormBase |
getFamily, getInternalVirtualForms, getOnClick, getOnDblClick, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getOnReset, getOnSubmit, getStyle, getStyleClass, getTarget, getVirtualForms, getVirtualFormsConfig, isAutoComplete, isVisible, restoreState, saveState, setAutoComplete, setEnctype, setInternalVirtualForms, setOnClick, setOnDblClick, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setOnReset, setOnSubmit, setStyle, setStyleClass, setTarget, setVisible |
Methods inherited from class javax.faces.component.UIForm |
isSubmitted, processUpdates, processValidators, setSubmitted |
Methods inherited from class javax.faces.component.UIComponentBase |
addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final char ID_WILD_CHAR
Constructor Detail |
public Form()
Method Detail |
public void processDecodes(javax.faces.context.FacesContext context)
Override UIForm.processDecodes(FacesContext)
to ensure
correct virtual form processing.
context
- FacesContext
for the current request
java.lang.NullPointerException
- Thrown when context
is nullpublic void queueEvent(javax.faces.event.FacesEvent event)
public void setSubmittedVirtualForm(Form.VirtualFormDescriptor vfd)
public void setVirtualForms(Form.VirtualFormDescriptor[] vfds)
FormBase
The virtual forms within this literal form, represented as an array of Form.VirtualFormDescriptor objects. This property and the "virtualFormsConfig" property are automatically kept in-sync.
setVirtualForms
in class FormBase
FormBase.getVirtualForms()
public void setVirtualFormsConfig(java.lang.String configStr)
FormBase
The configuration of the virtual forms within this literal form, represented as a String. Each virtual form is described by three parts, separated with pipe ("|") characters: the virtual form name, a space-separated list of component ids that participate in the virtual form, and a space-separated list of component ids that submit the virtual form. Multiple such virtual form "descriptors" are separated by commas. The component ids may be qualified (for instance, "table1:tableRowGroup1:tableColumn1:textField1").
setVirtualFormsConfig
in class FormBase
FormBase.getVirtualFormsConfig()
public Form.VirtualFormDescriptor getVirtualFormComponentSubmits(java.lang.String id)
public javax.faces.component.UIComponent findComponentById(java.lang.String id)
findComponent
method, this method does recursively
search NamingContainers.
public static Form.VirtualFormDescriptor[] generateVirtualForms(java.lang.String configStr)
Generate an
array of VirtualFormDescriptor
s based on a virtual form
configuration String
.
public static java.lang.String generateVirtualFormsConfig(Form.VirtualFormDescriptor[] descriptors)
Generate a virtual form
configuration String
based on an
array of VirtualFormDescriptor
s.
public static java.lang.String getFullyQualifiedId(javax.faces.component.UIComponent component)
NamingContainer.SEPARATOR_CHAR
(representing the Form
itself), contains component ids of the
component's ancestors separated by NamingContainer.SEPARATOR_CHAR
,
and ends with the component's id.
public static boolean isValidFullyQualifiedId(java.lang.String id)
NamingContainer.SEPARATOR_CHAR
, not ending with that
character unless it is the only character, not ending in
Form.ID_WILD_CHAR
, and not containing spaces.
public static boolean fullyQualifiedIdMatchesPattern(java.lang.String fqId, java.lang.String pattern)
NamingContainer.SEPARATOR_CHAR
followed by the
Form.ID_WILD_CHAR
, in which case the children of the component
indicated by the pattern will be considered a match.
public void addInternalVirtualForm(Form.VirtualFormDescriptor descriptor)
VirtualFormDescriptor
to the internal virtual forms.
If an existing VirtualFormDescriptor object is found with the same name,
the object is replaced.
descriptor
- The VirtualFormDescriptor
to add.public void restoreNonParticipatingSubmittedValues()
Restore the submitted values erased by the virtual form mechanism
where appropriate.
This method is called in FormRenderer.renderStart
. It should
not be called by developer code.
Note: Restoring of submitted values works on
TableRowGroup
components, but does not work on the
standard faces data table component. This is because in
UIData.encodeBegin
, the table's per-row saved state is
typically discarded. The result is that upon
exiting FormRenderer.renderStart
, the submitted values will
be restored; however, they will subsequently be discarded.
Nonetheless, we still cache and restore those submitted values, in case
a third-party component extends
UIData
and, unlike UIData
, does not discard
its saved state during rendering.
public void discardSubmittedValue(javax.faces.component.EditableValueHolder inputField)
Ensure that the supplied EditableValueHolder
component
will discard (rather than retain) its submitted value when a virtual
form is submitted in which the component does not participate.
inputField
- An EditableValueHolder
component that is
not a participant in the virtual form that was submitted
on this request.
java.lang.IllegalArgumentException
- if inputField is null.
java.lang.IllegalArgumentException
- if a virtual form has been
submitted and the supplied inputField participates in it.public void discardSubmittedValues(java.lang.String virtualFormName)
Ensure that the participants in the supplied virtual form will discard (rather than retain) their submitted values when a different virtual form is submitted.
virtualFormName
- The name of a virtual form on this page which
has not been submitted.
java.lang.IllegalArgumentException
- if no virtual form exists with the
supplied name.
java.lang.IllegalArgumentException
- if the supplied virtual form has been
submitted on this request.public java.lang.String getEnctype()
FormBase
Use this attribute to set the content-type of the HTTP request generated by this form. You do not normally need to set this attribute. Its default value is application/x-www-form-urlencoded. If there is an upload tag inside the form, the upload tag will modify the form's enctype attribute to multipart/form-data.
getEnctype
in class FormBase
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |