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
FieldsModifier and TypeFieldDescriptionprotected booleanprotected org.exoplatform.services.log.LogFields inherited from class org.exoplatform.webui.form.UIForm
ACTION, SUBCOMPONENT_IDFields inherited from class org.exoplatform.webui.core.UIComponent
AJAX_ASYNC, config, OBJECTID, UICOMPONENT, uiparent, USE_WEBUI_RESOURCES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidGet a label for this form.getLabel(ResourceBundle res, String id) getUIFormRichtextInput(String name) getUIForumFilter(String name) Get a value from the app resource bundle.protected voidSends a info message to ui and ignore ajax update on Portletsprotected voidSends an info message to uiprotected voidprotected voidprotected voidSends a ninfo message to uibooleanprotected <T extends org.exoplatform.webui.core.UIComponent>
Tprotected <T extends org.exoplatform.webui.core.UIComponent>
Tprotected <T extends org.exoplatform.webui.core.UIComponent>
Tprotected <T extends org.exoplatform.webui.core.UIComponent>
Tprotected <T extends org.exoplatform.webui.core.UIComponent>
TopenPopup(org.exoplatform.webui.core.UIContainer parent, Class<T> componentType, int width, int height) protected <T extends org.exoplatform.webui.core.UIComponent>
TopenPopup(org.exoplatform.webui.core.UIContainer parent, Class<T> componentType, String popupId, int width, int height) Opens a popup and creates a component into it.voidsetAddColonInLabel(boolean isAddColonInLabel) protected voidthrowWarning(String message) protected voidthrowWarning(String message, String... args) Throws a MessageException in warning levelprotected voidSends a warning message to ui and ignore ajax update on Portletsprotected voidSends a warning message to uiprotected voidprotected voidprotected voidSends a parameterized warning to uiMethods 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, urlMethods 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, setRenderedChildrenOfTypesMethods 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
-
Field Details
-
log
protected org.exoplatform.services.log.Log log -
isAddColonInLabel
protected boolean isAddColonInLabel
-
-
Constructor Details
-
BaseUIForm
public BaseUIForm()
-
-
Method Details
-
i18n
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
Get a label for this form. Delegates to the getLabel() method but avoid throwing a method- Overrides:
getLabelin classorg.exoplatform.webui.form.UIForm- Parameters:
labelID-- Returns:
- the value for the current locale in the app resource bundle, labelID otherwise
-
getLabel
- Overrides:
getLabelin classorg.exoplatform.webui.form.UIForm
-
isAddColonInLabel
public boolean isAddColonInLabel() -
setAddColonInLabel
public void setAddColonInLabel(boolean isAddColonInLabel) -
getUIFormScrollSelectBox
-
getUIFormRichtextInput
-
getUIForumFilter
-
info
Sends a info message to ui and ignore ajax update on Portlets- Parameters:
messageKey- resource bundle key for the message
-
info
-
info
-
info
Sends an info message to ui- Parameters:
messageKey- resource bundle key for the messageignoreAJAXUpdateOnPortlets- as there is need to update only UI components of portal (ie: the components outside portlet windows) are updated by AJAX.
-
info
Sends a ninfo message to ui- Parameters:
messageKey- resource bundle key for the messageargs- arguments of the messageignoreAJAXUpdateOnPortlets- as there is need to update only UI components of portal (ie: the components outside portlet windows) are updated by AJAX.
-
warning
Sends a warning message to ui and ignore ajax update on Portlets- Parameters:
messageKey- resource bundle key for the message
-
warning
-
warning
-
warning
Sends a warning message to ui- Parameters:
messageKey- resource bundle key for the messageignoreAJAXUpdateOnPortlets- as there is need to update only UI components of portal (ie: the components outside portlet windows) are updated by AJAX.
-
warning
Sends a parameterized warning to ui- Parameters:
messageKey-args- arguments of the messageignoreAJAXUpdateOnPortlets- 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
- 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 opencomponentType- type of the component to open in the popuppopupId- id for the popupwidth- popup widthheight- 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
- Throws:
Exception
-