Package org.openbravo.client.kernel
Interface Component
-
- All Known Implementing Classes:
AccountCancelledEmailBody
,ApplicationComponent
,ApplicationDynamicComponent
,ApplicationMenuComponent
,AttachmentWindowComponent
,BaseComponent
,BaseTemplateComponent
,DataSourceComponent
,HeartBeatPopUpComponent
,I18NComponent
,MainLayoutComponent
,MyOpenbravoComponent
,MyOpenbravoWidgetComponent
,NavigationBarComponent
,NewUserEmailBody
,OAuth2LoginButtonGenerator
,OBTreeGridComponent
,OBTreeReferenceComponent
,OBViewFormComponent
,OBViewGridComponent
,OBViewTab
,ParameterWindowComponent
,PortalEmailBody
,PropertiesComponent
,SelectorComponent
,SessionDynamicResourceComponent
,SessionDynamicTemplateComponent
,StandardWindowComponent
,StaticResourceComponent
,StyleSheetResourceComponent
,TypesComponent
,UIDefinitionController
,UserInfoComponent
,ViewComponent
public interface Component
A component can be anything from a visualization of a single field to a full ui with forms and grids, it can also be just a java-script component which provides logic but no user interface (for example a data source). All components have in common that they have a String representation which can be loaded and executed by the browser. This means practically that a component is expressed in java-script. A component has a distinct id which consists of several parts:- the id of the module which provides the view
- the type of component (for example, selector, grid, etc.)
- the database id (or other unique identifier) of the component
- a version number which is basically a string used to support client side caching of components
- Author:
- mtaal
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
generate()
Generates the content of the component which is sent to the client for execution/rendering.String
getContentType()
String
getETag()
An ETag is a hash-like string which is used to determine if content has changed since the last request for the content.String
getId()
Date
getLastModified()
Module
getModule()
boolean
isInDevelopment()
boolean
isJavaScriptComponent()
-
-
-
Method Detail
-
generate
String generate()
Generates the content of the component which is sent to the client for execution/rendering.- Returns:
- the generated javascript which is send back to the client
-
getId
String getId()
- Returns:
- the id of the component, see the id description in the root of this class.
-
getLastModified
Date getLastModified()
- Returns:
- the last modified date of any data element used to generate the response, if null is returned then the current date/time is assumed.
-
getETag
String getETag()
An ETag is a hash-like string which is used to determine if content has changed since the last request for the content. See this link for more information. Note for language specific components the etag has to encode the language (id) also! See (OBContext.getLanguage()
) to get the current language.- Returns:
- a unique hash for the content generated
-
getModule
Module getModule()
- Returns:
- the module providing this component
-
getContentType
String getContentType()
- Returns:
- the content type passed in the response header, for example: application/javascript;charset=UTF-8
-
isJavaScriptComponent
boolean isJavaScriptComponent()
- Returns:
- true if the generated output is javascript
-
isInDevelopment
boolean isInDevelopment()
- Returns:
- true if the component's module or a module of a subcomponent is in development
- See Also:
Module.isInDevelopment()
-
-