org.apache.struts.faces.component
Class FormComponent

java.lang.Object
  |
  +--javax.faces.component.UIComponentBase
        |
        +--javax.faces.component.UIForm
              |
              +--org.apache.struts.faces.component.FormComponent
All Implemented Interfaces:
java.io.Serializable, javax.faces.component.UIComponent

public class FormComponent
extends javax.faces.component.UIForm

FormComponent is a specialized subclass of javax.faces.component.UIForm that supports automatic creation of form beans in request or session scope.

Version:
$Revision: 1.2 $ $Date: 2003/06/04 17:38:13 $
Author:
Craig R. McClanahan
See Also:
Serialized Form

Field Summary
protected static org.apache.commons.logging.Log log
          The Log instance for this class.
 
Fields inherited from class javax.faces.component.UIForm
 
Fields inherited from class javax.faces.component.UIComponentBase
 
Fields inherited from interface javax.faces.component.UIComponent
SEPARATOR_CHAR
 
Constructor Summary
FormComponent()
           
 
Method Summary
 void createActionForm(javax.faces.context.FacesContext context)
          Create an appropriate form bean in the appropriate scope, if one does not already exist.
 java.lang.String getAction()
          Return the Struts action path to which this form should be submitted.
 org.apache.struts.config.ModuleConfig lookupModuleConfig(javax.faces.context.FacesContext context)
          Return the ModuleConfig for the application module this form is being processed for.
 void processDecodes(javax.faces.context.FacesContext context)
          Create an instance of the form bean (if necessary) before delegating to the standard decoding process.
 void setAction(java.lang.String action)
          Set the Struts action to which this form should be submitted.
 
Methods inherited from class javax.faces.component.UIForm
getFormName, setFormName
 
Methods inherited from class javax.faces.component.UIComponentBase
addChild, addChild, addFacet, addValidator, broadcast, clearChildren, clearFacets, clearValidators, containsChild, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttribute, getAttributeNames, getChild, getChildCount, getChildren, getClientId, getComponentId, getConverter, getFacet, getFacetNames, getFacetsAndChildren, getParent, getRendererType, getRendersChildren, getRendersSelf, getValidators, isRendered, isValid, processReconstitutes, processUpdates, processValidators, reconstitute, removeChild, removeChild, removeFacet, removeValidator, setAttribute, setComponentId, setConverter, setParent, setRendered, setRendererType, setValid, updateModel, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log

The Log instance for this class.

Constructor Detail

FormComponent

public FormComponent()
Method Detail

getAction

public java.lang.String getAction()

Return the Struts action path to which this form should be submitted. It is an alias for formName (and value) on the superclass UIForm.


setAction

public void setAction(java.lang.String action)

Set the Struts action to which this form should be submitted. It is an alias for formName (and value) on the superclass UIForm.

Parameters:
action - The new action path

processDecodes

public void processDecodes(javax.faces.context.FacesContext context)
                    throws java.io.IOException

Create an instance of the form bean (if necessary) before delegating to the standard decoding process.

Specified by:
processDecodes in interface javax.faces.component.UIComponent
Overrides:
processDecodes in class javax.faces.component.UIComponentBase
Parameters:
context - FacesContext for the request we are processing
Throws:
java.io.IOException - if an input/output error occurs during decoding

createActionForm

public void createActionForm(javax.faces.context.FacesContext context)

Create an appropriate form bean in the appropriate scope, if one does not already exist.

Parameters:
context - FacesContext for the current request
Throws:
java.lang.IllegalArgumentException - if no ActionConfig for the specified action attribute can be located
java.lang.IllegalArgumentException - if no FormBeanConfig for the specified form bean can be located
java.lang.IllegalArgumentException - if no ModuleConfig can be located for this application module

lookupModuleConfig

public org.apache.struts.config.ModuleConfig lookupModuleConfig(javax.faces.context.FacesContext context)

Return the ModuleConfig for the application module this form is being processed for.

Parameters:
context - The FacesContext for the current request
Throws:
java.lang.IllegalArgumentException - if no ModuleConfig can be found


Copyright © 2003 - Apache Software Foundation