Class BaseUIForm

java.lang.Object
org.exoplatform.webui.core.UIComponent
org.exoplatform.webui.core.UIContainer
org.exoplatform.webui.form.UIForm
org.exoplatform.forum.common.webui.BaseUIForm

public class BaseUIForm extends org.exoplatform.webui.form.UIForm
Base UIForm class that brings several convenience methods for UI operations ( i18n, messages, popups,...)
Version:
$Revision$
Author:
Patrice Lamarque
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.exoplatform.webui.core.UIContainer

    org.exoplatform.webui.core.UIContainer.SelectTabActionListener
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
     
    protected org.exoplatform.services.log.Log
     

    Fields inherited from class org.exoplatform.webui.form.UIForm

    ACTION, SUBCOMPONENT_ID

    Fields inherited from class org.exoplatform.webui.core.UIComponent

    AJAX_ASYNC, config, OBJECTID, UICOMPONENT, uiparent, USE_WEBUI_RESOURCES
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    getLabel(String labelID)
    Get a label for this form.
     
     
     
     
    i18n(String key)
    Get a value from the app resource bundle.
    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
    boolean
     
    protected <T extends org.exoplatform.webui.core.UIComponent>
    T
    openPopup(Class<T> componentType, int width)
     
    protected <T extends org.exoplatform.webui.core.UIComponent>
    T
    openPopup(Class<T> componentType, int width, int height)
     
    protected <T extends org.exoplatform.webui.core.UIComponent>
    T
    openPopup(Class<T> componentType, String popupId, int width)
     
    protected <T extends org.exoplatform.webui.core.UIComponent>
    T
    openPopup(Class<T> componentType, String popupId, int width, int height)
     
    protected <T extends org.exoplatform.webui.core.UIComponent>
    T
    openPopup(org.exoplatform.webui.core.UIContainer parent, Class<T> componentType, int width, int height)
     
    protected <T extends org.exoplatform.webui.core.UIComponent>
    T
    openPopup(org.exoplatform.webui.core.UIContainer parent, Class<T> componentType, String popupId, int width, int height)
    Opens a popup and creates a component into it.
    void
    setAddColonInLabel(boolean isAddColonInLabel)
     
    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

    Methods inherited from class org.exoplatform.webui.form.UIForm

    addUIComponentInput, addUIFormInput, addUIFormInput, begin, end, event, event, event, getActions, getSubmitAction, getUICheckBoxInput, getUIComponentName, getUIFormCheckBoxInput, getUIFormDateTimeInput, getUIFormInputInfo, getUIFormSelectBox, getUIFormTextAreaInput, getUIInput, getUIStringInput, invokeGetBindingBean, invokeSetBindingBean, isMultipart, processRender, renderField, renderField, reset, setActions, setMultiPart, setSubmitAction, url

    Methods inherited from class org.exoplatform.webui.core.UIContainer

    addChild, addChild, findComponentById, findComponentOfType, findFirstComponentOfType, getChild, getChild, getChildById, getChildren, hasChildren, removeChild, removeChildById, renderChild, renderChild, renderChild, renderChild, renderChildren, renderChildren, renderUIComponent, replaceChild, replaceChild, setChildren, setRenderedChild, setRenderedChild, setRenderedChildrenOfTypes

    Methods inherited from class org.exoplatform.webui.core.UIComponent

    broadcast, buildModelObject, createEvent, createUIComponent, createUIComponent, createUIComponent, doAsync, event, getAncestorOfType, getApplicationComponent, getComponentConfig, getId, getName, getParent, getTemplate, getTemplateResourceResolver, isRendered, loadConfirmMesssage, processAction, processDecode, renderEventURL, setComponentConfig, setComponentConfig, setId, setParent, setRendered, setRenderSibling, url, url

    Methods inherited from class java.lang.Object

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

    • log

      protected org.exoplatform.services.log.Log log
    • isAddColonInLabel

      protected boolean isAddColonInLabel
  • Constructor Details

    • BaseUIForm

      public BaseUIForm()
  • Method Details

    • i18n

      public String i18n(String key)
      Get a value from the app resource bundle.
      Returns:
      the value for the current locale or the key of the application resource bundle if the key was not found
    • getLabel

      public String getLabel(String labelID)
      Get a label for this form. Delegates to the getLabel() method but avoid throwing a method
      Overrides:
      getLabel in class org.exoplatform.webui.form.UIForm
      Parameters:
      labelID -
      Returns:
      the value for the current locale in the app resource bundle, labelID otherwise
    • getLabel

      public String getLabel(ResourceBundle res, String id)
      Overrides:
      getLabel in class org.exoplatform.webui.form.UIForm
    • isAddColonInLabel

      public boolean isAddColonInLabel()
    • setAddColonInLabel

      public void setAddColonInLabel(boolean isAddColonInLabel)
    • getUIFormScrollSelectBox

      public UIFormScrollSelectBox getUIFormScrollSelectBox(String name)
    • getUIFormRichtextInput

      public UIFormRichtextInput getUIFormRichtextInput(String name)
    • getUIForumFilter

      public UIForumFilter getUIForumFilter(String name)
    • 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.
    • 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 <T extends org.exoplatform.webui.core.UIComponent> T openPopup(Class<T> componentType, String popupId, int width, int height) throws Exception
      Throws:
      Exception
    • openPopup

      protected <T extends org.exoplatform.webui.core.UIComponent> T openPopup(Class<T> componentType, int width, int height) throws Exception
      Throws:
      Exception
    • openPopup

      protected <T extends org.exoplatform.webui.core.UIComponent> T openPopup(Class<T> componentType, int width) throws Exception
      Throws:
      Exception
    • openPopup

      protected <T extends org.exoplatform.webui.core.UIComponent> T openPopup(Class<T> componentType, String popupId, int width) throws Exception
      Throws:
      Exception
    • openPopup

      protected <T extends org.exoplatform.webui.core.UIComponent> T openPopup(org.exoplatform.webui.core.UIContainer parent, Class<T> componentType, String popupId, int width, int height) throws Exception
      Opens a popup and creates a component into it.
      Type Parameters:
      T - type of the component to display in the popup
      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 <T extends org.exoplatform.webui.core.UIComponent> T openPopup(org.exoplatform.webui.core.UIContainer parent, Class<T> componentType, int width, int height) throws Exception
      Throws:
      Exception
      See Also:
    • cancelChildPopupAction

      protected void cancelChildPopupAction() throws Exception
      Throws:
      Exception