com.sapportals.htmlb

Class Document

java.lang.Object
  extended bycom.sapportals.htmlb.Component
      extended bycom.sapportals.htmlb.Container
          extended bycom.sapportals.htmlb.Document

public class Document
extends Container

The outer document control. Note that this control may not actually render anything, e.g. if it is used in a Portal environment where this wrapper is not required.

Copyright 2004 SAP AG


Field Summary
static String UI_ID
           
static int VAR_BEGIN
           
static int VAR_BODYBEGIN
           
static int VAR_BODYBEGININCLUDES
           
static int VAR_BODYEND
           
static int VAR_BODYENDINCLUDES
           
static int VAR_DOCBEGIN
           
static int VAR_DOCEND
           
static int VAR_DOCTYPE
           
static int VAR_END
           
static int VAR_HEAD
           
static int VAR_HEADBEGIN
           
static int VAR_HEADEND
           
static int VAR_HEADINCLUDES
           
 
Fields inherited from class com.sapportals.htmlb.Container
elements
 
Constructor Summary
Document(String title)
          construct a new Document.
 
Method Summary
 void addHeadResource(ResourceType type, String key, Object data)
          add a head include to the document
 HashSet get508Texts()
          returns the texts which are needed on client side
 String getDocumentId()
          gets the id of this document
 String getElementId(Component c)
           
 String getHeadRawText()
          gets the raw text to be inserted in the document head.
 HashSet getHoverMenus()
          returns the hover menus for rendering, internal use only
 Includes getIncludes()
          get the includes for this document, i.e.
 Includes getJsIncludes()
           
 String getNewElementId()
          get a new String ID for an element of this document.
 HashSet getStandardTexts()
          returns the texts which are needed on client side
 String getTitle()
          get the title of this document
 String getUI()
          get an identification String for the renderer that is unique across all supported components.
 void register508Text(String key)
          register 508 Texts which are needed on client side
 void registerHoverMenu(HoverMenu hoverMenu)
          register the hover menu, internal use only hover menus within one page should be collected before they'll be rendered, for saving performance
 void registerJavaScript(String rendererId, IPageContext rendererContext)
          register the javascript file, internal use only
 void registerStandardText(String key)
          register standard texts which are needed on client side
 void render(int selector, IPageContext rendererContext)
          render an aspect of the component using the current context.
 void setDocumentId(String documentId)
          sets the id of this document
 void setHeadRawText(String headRawText)
          sets the raw text to be inserted in the document head.
 void setIncludes(Includes includes)
          set the includes for this document, i.e.
 void setTitle(String title)
          set the title of this document
 
Methods inherited from class com.sapportals.htmlb.Container
addComponent, addRawText, addText, getChildCount, iterator, preRender, removeComponent
 
Methods inherited from class com.sapportals.htmlb.Component
getEncodedIdForForm, getId, getParent, initFromPageContext, initFromShortId, initializeFromId, isJsObjectNeeded, render, renderAsString, requiresForm, setId, setJsObjectNeeded, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UI_ID

public static final String UI_ID
See Also:
Constant Field Values

VAR_BEGIN

public static final int VAR_BEGIN
See Also:
Constant Field Values

VAR_END

public static final int VAR_END
See Also:
Constant Field Values

VAR_HEADINCLUDES

public static final int VAR_HEADINCLUDES
See Also:
Constant Field Values

VAR_BODYBEGININCLUDES

public static final int VAR_BODYBEGININCLUDES
See Also:
Constant Field Values

VAR_BODYENDINCLUDES

public static final int VAR_BODYENDINCLUDES
See Also:
Constant Field Values

VAR_DOCBEGIN

public static final int VAR_DOCBEGIN
See Also:
Constant Field Values

VAR_DOCEND

public static final int VAR_DOCEND
See Also:
Constant Field Values

VAR_HEADBEGIN

public static final int VAR_HEADBEGIN
See Also:
Constant Field Values

VAR_HEADEND

public static final int VAR_HEADEND
See Also:
Constant Field Values

VAR_BODYBEGIN

public static final int VAR_BODYBEGIN
See Also:
Constant Field Values

VAR_BODYEND

public static final int VAR_BODYEND
See Also:
Constant Field Values

VAR_HEAD

public static final int VAR_HEAD
See Also:
Constant Field Values

VAR_DOCTYPE

public static final int VAR_DOCTYPE
See Also:
Constant Field Values
Constructor Detail

Document

public Document(String title)
construct a new Document. This shouldn't be called directly. You should use createDocument() or createFormDocument() defined in IPageContext.

Parameters:
title - the title for the document.
Method Detail

getNewElementId

public String getNewElementId()
get a new String ID for an element of this document. Elements are simply numbered starting with 0.

Application developers should not need this method.

Returns:
a String containing a new ID

getElementId

public String getElementId(Component c)

getUI

public String getUI()
get an identification String for the renderer that is unique across all supported components.

Specified by:
getUI in class Component
Returns:
"Document"

getTitle

public String getTitle()
get the title of this document

Returns:
the title

setTitle

public void setTitle(String title)
set the title of this document


getHeadRawText

public String getHeadRawText()
gets the raw text to be inserted in the document head. Note: it is not guaranteed that this will produce any output for every possible environment

Returns:
raw text to be included in the head of the document

setHeadRawText

public void setHeadRawText(String headRawText)
sets the raw text to be inserted in the document head. Note: it is not guaranteed that this will produce any output for every possible environment

Parameters:
headRawText - raw text to be included in the head of the document

getDocumentId

public String getDocumentId()
gets the id of this document

Returns:
the id of this document

setDocumentId

public void setDocumentId(String documentId)
sets the id of this document

Parameters:
documentId - the id of this document

getIncludes

public Includes getIncludes()
get the includes for this document, i.e. JavaScript or StyleSheet includes.

Returns:
the includes for this document

getJsIncludes

public Includes getJsIncludes()

setIncludes

public void setIncludes(Includes includes)
set the includes for this document, i.e. JavaScript or StyleSheet includes.

Parameters:
includes - the includes for this document

addHeadResource

public void addHeadResource(ResourceType type,
                            String key,
                            Object data)
add a head include to the document


registerHoverMenu

public void registerHoverMenu(HoverMenu hoverMenu)
register the hover menu, internal use only hover menus within one page should be collected before they'll be rendered, for saving performance


getHoverMenus

public HashSet getHoverMenus()
returns the hover menus for rendering, internal use only


register508Text

public void register508Text(String key)
register 508 Texts which are needed on client side


get508Texts

public HashSet get508Texts()
returns the texts which are needed on client side


registerStandardText

public void registerStandardText(String key)
register standard texts which are needed on client side


getStandardTexts

public HashSet getStandardTexts()
returns the texts which are needed on client side


render

public void render(int selector,
                   IPageContext rendererContext)
render an aspect of the component using the current context. This method can be used by components that do not produce an atomic HTML code.

Overrides:
render in class Container
Parameters:
selector - the aspect to render.
rendererContext - the context in which to render.

registerJavaScript

public void registerJavaScript(String rendererId,
                               IPageContext rendererContext)
register the javascript file, internal use only



Copyright 2006 SAP AG Complete Copyright Notice