Class ErrorsComponent

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

public class ErrorsComponent extends UIOutput

Custom component that replaces the Struts <html:errors> tag.

  • Constructor Details

    • ErrorsComponent

      public ErrorsComponent()

      Create a new ErrorsComponent with default properties.

  • Method Details

    • getBundle

      public String getBundle()

      Return the MessageResources key.

    • setBundle

      public void setBundle(String bundle)

      Set the MessageResources key.

      Parameters:
      bundle - The new key
    • getFamily

      public String getFamily()

      Return the component family to which this component belongs.

      Overrides:
      getFamily in class UIOutput
    • getProperty

      public String getProperty()

      Return the property name for which to report errors.

    • setProperty

      public void setProperty(String property)

      Set the property name for which to report errors.

      Parameters:
      property - The new property name
    • restoreState

      public void restoreState(FacesContext context, Object state)

      Restore the state of this component.

      Specified by:
      restoreState in interface StateHolder
      Overrides:
      restoreState in class UIOutput
      Parameters:
      context - FacesContext for the current request
      state - State object from which to restore our state
    • saveState

      public Object saveState(FacesContext context)

      Save the state of this component.

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