Package org.openbravo.client.kernel
Class I18NComponent
- java.lang.Object
-
- org.openbravo.client.kernel.BaseComponent
-
- org.openbravo.client.kernel.BaseTemplateComponent
-
- org.openbravo.client.kernel.SessionDynamicTemplateComponent
-
- org.openbravo.client.kernel.I18NComponent
-
- All Implemented Interfaces:
Component
public class I18NComponent extends SessionDynamicTemplateComponent
Generates the client side javascript holding the labels defined in modules and the labels defined in core which are configured to be forcibly available in the client.- Author:
- mtaal
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
I18NComponent.Label
-
Field Summary
-
Fields inherited from class org.openbravo.client.kernel.BaseTemplateComponent
BASE_QUALIFIER, DATA_PARAMETER
-
Fields inherited from class org.openbravo.client.kernel.BaseComponent
adcs
-
-
Constructor Summary
Constructors Constructor Description I18NComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
generate()
Generates the content of the component which is sent to the client for execution/rendering.String
getId()
Collection<I18NComponent.Label>
getLabels()
Read the labels of all modules except core, first read the default labels from the AD_Message table and then reads the language specific labels.protected String
getTemplateId()
-
Methods inherited from class org.openbravo.client.kernel.SessionDynamicTemplateComponent
getComponentTemplate, getETag
-
Methods inherited from class org.openbravo.client.kernel.BaseTemplateComponent
getData, setComponentTemplate
-
Methods inherited from class org.openbravo.client.kernel.BaseComponent
bypassAuthentication, createComponent, getADCS, getApplicationName, getContentType, getContextUrl, getDependencies, getLastModified, getModule, getModulePackageName, getParameter, getParameterNames, getParameters, getSafeValue, hasParameter, isClassicMode, isInDevelopment, isInDevelopment, isJavaScriptComponent, nullifyModuleCache, setDependencies, setId, setParameters, stripHost
-
-
-
-
Method Detail
-
getId
public String getId()
- Specified by:
getId
in interfaceComponent
- Overrides:
getId
in classBaseComponent
- Returns:
- the id of the component, see the id description in the root of this class.
-
getTemplateId
protected String getTemplateId()
- Specified by:
getTemplateId
in classSessionDynamicTemplateComponent
-
generate
public String generate()
Description copied from interface:Component
Generates the content of the component which is sent to the client for execution/rendering.- Specified by:
generate
in interfaceComponent
- Overrides:
generate
in classBaseTemplateComponent
- Returns:
- the generated javascript which is send back to the client
-
getLabels
public Collection<I18NComponent.Label> getLabels()
Read the labels of all modules except core, first read the default labels from the AD_Message table and then reads the language specific labels.- Returns:
- a collection of labels.
-
-