Class MessageComponent

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

public class MessageComponent extends UIOutput

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

  • Constructor Details

    • MessageComponent

      public MessageComponent()

      Create a new MessageComponent 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
    • isFilter

      public boolean isFilter()

      Return a flag indicating whether filtering should take place.

    • setFilter

      public void setFilter(boolean filter)

      Set the flag indicating that the output value should be filtered.

      Parameters:
      filter - The new filter flag
    • getKey

      public String getKey()

      Return the message key.

    • setKey

      public void setKey(String key)

      Set the message key.

      Parameters:
      key - The new key
    • 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)
    • 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