Class BaseEventListener<T extends BaseUIForm>

java.lang.Object
org.exoplatform.webui.event.EventListener<T>
org.exoplatform.forum.common.webui.BaseEventListener<T>

public abstract class BaseEventListener<T extends BaseUIForm> extends org.exoplatform.webui.event.EventListener<T>
Base EventListener with convenience methods delegated to the underlying BaseUIForm. implementers should implement onEvent(Event, BaseUIForm, String)
Version:
$Revision$
Author:
Patrice Lamarque
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected T
    underlying BaseUIForm

    Fields inherited from class org.exoplatform.webui.event.EventListener

    RESULT_OK
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    execute(org.exoplatform.webui.event.Event<T> event)
     
    <C extends org.exoplatform.webui.core.UIComponent>
    C
     
    getLabel(String labelID)
     
    protected void
    info(String messageKey)
    Sends a info message to ui and ignore ajax update on Portlets
    protected void
    info(String messageKey, boolean ignoreAJAXUpdateOnPortlets)
    Sends an info message to ui
    protected void
    info(String messageKey, String arg)
     
    protected void
    info(String messageKey, String[] args)
     
    protected void
    info(String messageKey, String[] args, boolean ignoreAJAXUpdateOnPortlets)
    Sends a ninfo message to ui
    abstract void
    onEvent(org.exoplatform.webui.event.Event<T> event, T component, String objectId)
     
    protected <C extends org.exoplatform.webui.core.UIComponent>
    C
    openPopup(org.exoplatform.webui.core.UIContainer parent, Class<C> componentType, int width, int height)
     
    protected <C extends org.exoplatform.webui.core.UIComponent>
    C
    openPopup(org.exoplatform.webui.core.UIContainer parent, Class<C> componentType, String popupId, int width, int height)
    Opens a popup and creates a component into it.
    void
     
    protected void
     
    protected void
    throwWarning(String message, String... args)
    Throws a MessageException in warning level
    protected void
    warning(String messageKey)
    Sends a warning message to ui and ignore ajax update on Portlets
    protected void
    warning(String messageKey, boolean ignoreAJAXUpdateOnPortlets)
    Sends a warning message to ui
    protected void
    warning(String messageKey, String arg)
     
    protected void
    warning(String messageKey, String[] args)
     
    protected void
    warning(String messageKey, String[] args, boolean ignoreAJAXUpdateOnPortlets)
    Sends a parameterized warning to ui
    protected void
    warning(String messageKey, String arg, boolean ignoreAJAXUpdateOnPortlets)
    Sends a parameterized warning to ui

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • component

      protected T extends BaseUIForm component
      underlying BaseUIForm
  • Constructor Details

    • BaseEventListener

      public BaseEventListener()
  • Method Details

    • execute

      public void execute(org.exoplatform.webui.event.Event<T> event) throws Exception
      Specified by:
      execute in class org.exoplatform.webui.event.EventListener<T extends BaseUIForm>
      Throws:
      Exception
    • onEvent

      public abstract void onEvent(org.exoplatform.webui.event.Event<T> event, T component, String objectId) throws Exception
      Throws:
      Exception
    • refresh

      public void refresh()
    • info

      protected void info(String messageKey)
      Sends a info message to ui and ignore ajax update on Portlets
      Parameters:
      messageKey - resource bundle key for the message
    • info

      protected void info(String messageKey, String arg)
    • info

      protected void info(String messageKey, String[] args)
    • info

      protected void info(String messageKey, boolean ignoreAJAXUpdateOnPortlets)
      Sends an info message to ui
      Parameters:
      messageKey - resource bundle key for the message
      ignoreAJAXUpdateOnPortlets - as there is need to update only UI components of portal (ie: the components outside portlet windows) are updated by AJAX.
    • info

      protected void info(String messageKey, String[] args, boolean ignoreAJAXUpdateOnPortlets)
      Sends a ninfo message to ui
      Parameters:
      messageKey - resource bundle key for the message
      args - arguments of the message
      ignoreAJAXUpdateOnPortlets - as there is need to update only UI components of portal (ie: the components outside portlet windows) are updated by AJAX.
    • warning

      protected void warning(String messageKey)
      Sends a warning message to ui and ignore ajax update on Portlets
      Parameters:
      messageKey - resource bundle key for the message
    • warning

      protected void warning(String messageKey, String arg)
    • warning

      protected void warning(String messageKey, String[] args)
    • warning

      protected void warning(String messageKey, boolean ignoreAJAXUpdateOnPortlets)
      Sends a warning message to ui
      Parameters:
      messageKey - resource bundle key for the message
      ignoreAJAXUpdateOnPortlets - as there is need to update only UI components of portal (ie: the components outside portlet windows) are updated by AJAX.
    • warning

      protected void warning(String messageKey, String[] args, boolean ignoreAJAXUpdateOnPortlets)
      Sends a parameterized warning to ui
      Parameters:
      messageKey -
      args - arguments of the message
      ignoreAJAXUpdateOnPortlets - as there is need to update only UI components of portal (ie: the components outside portlet windows) are updated by AJAX.
    • warning

      protected void warning(String messageKey, String arg, boolean ignoreAJAXUpdateOnPortlets)
      Sends a parameterized warning to ui
      Parameters:
      messageKey -
      arg - argument of the message
      ignoreAJAXUpdateOnPortlets - as there is need to update only UI components of portal (ie: the components outside portlet windows) are updated by AJAX.
    • throwWarning

      protected void throwWarning(String message, String... args) throws org.exoplatform.webui.exception.MessageException
      Throws a MessageException in warning level
      Parameters:
      message -
      args -
      Throws:
      org.exoplatform.webui.exception.MessageException
    • throwWarning

      protected void throwWarning(String message) throws org.exoplatform.webui.exception.MessageException
      Throws:
      org.exoplatform.webui.exception.MessageException
      See Also:
    • openPopup

      protected <C extends org.exoplatform.webui.core.UIComponent> C openPopup(org.exoplatform.webui.core.UIContainer parent, Class<C> componentType, String popupId, int width, int height) throws Exception
      Opens a popup and creates a component into it.
      Parameters:
      parent - parent above whch the popup should be open
      componentType - type of the component to open in the popup
      popupId - id for the popup
      width - popup width
      height - popup height
      Returns:
      the component inside the popup
      Throws:
      Exception
    • openPopup

      protected <C extends org.exoplatform.webui.core.UIComponent> C openPopup(org.exoplatform.webui.core.UIContainer parent, Class<C> componentType, int width, int height) throws Exception
      Throws:
      Exception
      See Also:
    • getLabel

      public String getLabel(String labelID)
      See Also:
    • getChildById

      public <C extends org.exoplatform.webui.core.UIComponent> C getChildById(String id)
      See Also:
      • UIContainer.getChildById(String)