Class FormComponent

All Implemented Interfaces:
NamingContainer, PartialStateHolder, StateHolder, TransientStateHolder, UniqueIdVendor, ComponentSystemEventListener, FacesListener, SystemEventListenerHolder, EventListener

public class FormComponent extends UIForm
FormComponent is a specialized subclass of jakarta.faces.component.UIForm that supports automatic creation of form beans in request or session scope.
Version:
$Rev$ $Date$
  • Constructor Details

    • FormComponent

      public FormComponent()
  • Method Details

    • getAction

      public String getAction()

      Return the Struts action path to which this form should be submitted.

    • setAction

      public void setAction(String action)

      Set the Struts action to which this form should be submitted.

      Parameters:
      action - The new action path
    • getEnctype

      public String getEnctype()

      Return the encoding type for this form submit.

    • setEnctype

      public void setEnctype(String enctype)

      Set the encoding type for this form submit.

      Parameters:
      enctype - The new enctype path
    • getFamily

      public String getFamily()

      Return the component family to which this component belongs.

      Overrides:
      getFamily in class UIForm
    • getFocus

      public String getFocus()

      Return the focus element name.

    • setFocus

      public void setFocus(String focus)

      Set the focus element name.

      Parameters:
      focus - The new focus path
    • getFocusIndex

      public String getFocusIndex()

      Return the focus element index.

    • setFocusIndex

      public void setFocusIndex(String focusIndex)

      Set the focus element index.

      Parameters:
      focusIndex - The new focusIndex path
    • getOnreset

      public String getOnreset()

      Return the JavaScript to execute on form reset.

    • setOnreset

      public void setOnreset(String onreset)

      Set the JavaScript to execute on form reset.

      Parameters:
      onreset - The new onreset path
    • getOnsubmit

      public String getOnsubmit()

      Return the JavaScript to execute on form submit.

    • setOnsubmit

      public void setOnsubmit(String onsubmit)

      Set the JavaScript to execute on form submit.

      Parameters:
      onsubmit - The new onsubmit path
    • getStyle

      public String getStyle()

      Return the CSS style(s) to be rendered for this component.

    • setStyle

      public void setStyle(String style)

      Set the CSS style(s) to be rendered for this component.

      Parameters:
      style - The new CSS style(s)
    • getStyleClass

      public String getStyleClass()

      Return the CSS style class(es) to be rendered for this component.

    • setStyleClass

      public void setStyleClass(String styleClass)

      Set the CSS style class(es) to be rendered for this component.

      Parameters:
      styleClass - The new CSS style class(es)
    • getTarget

      public String getTarget()

      Return the target frame for the response to this form submit.

    • setTarget

      public void setTarget(String target)

      Set the target frame for the response to this form submit.

      Parameters:
      target - The new CSS target(s)
    • processDecodes

      public void processDecodes(FacesContext context)

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

      Overrides:
      processDecodes in class UIForm
      Parameters:
      context - FacesContext for the request we are processing
    • restoreState

      public void restoreState(FacesContext context, Object state)

      Restore our state from the specified object.

      Specified by:
      restoreState in interface StateHolder
      Overrides:
      restoreState in class UIComponentBase
      Parameters:
      context - FacesContext for the current request
      state - Object containing our saved state
    • saveState

      public Object saveState(FacesContext context)

      Create and return an object representing our state to be saved.

      Specified by:
      saveState in interface StateHolder
      Overrides:
      saveState in class UIComponentBase
      Parameters:
      context - FacesContext for the current request
    • createActionForm

      public void createActionForm(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:
      IllegalArgumentException - if no ActionConfig for the specified action attribute can be located
      IllegalArgumentException - if no FormBeanConfig for the specified form bean can be located
      IllegalArgumentException - if no ModuleConfig can be located for this application module