com.sapportals.htmlb

Class Includes

java.lang.Object
  extended bycom.sapportals.htmlb.Component
      extended bycom.sapportals.htmlb.Includes

public class Includes
extends Component

This class is not used directly. An appropriate Includes element is constructed by the IPageContext when you create a Document.

Copyright 2004 SAP AG


Field Summary
static String UI_ID
           
static int VAR_BODYBEGIN
           
static int VAR_BODYEND
           
static int VAR_HEAD
           
 
Constructor Summary
Includes()
          create a new Includes component.
 
Method Summary
 void addBodyBeginResource(ResourceType type, String key, Object data)
          add a specific resource to the begin of the body
 void addBodyBeginResource(ResourceType type, String key, Object data, String optionalAttributes)
          add a specific resource to the begin of the body
 void addBodyEndResource(ResourceType type, String key, Object data)
          add a specific resource to the end of the body
 void addBodyEndResource(ResourceType type, String key, Object data, String optionalAttributes)
          add a specific resource to the begin of the body
 void addHeadResource(ResourceType type, String key, Object data)
          add a specific resource to the document head
 void addHeadResource(ResourceType type, String key, Object data, String optionalAttributes)
          add a specific resource to the document head
 List getBodyBeginList()
          get a List of all resources for the begin of the document body
 List getBodyEndList()
          get a List of all resources for the end of the document body
 List getHeadList()
          get a List of all resources for the document head
 String getUI()
          get a identification String for the renderer that is unique across all supported components.
 boolean hasHeadResource(ResourceType type, String key)
          checks if a given resource is within the document head
 void render(int selector, IPageContext rendererContext)
          render an aspect of the component using the current context.
 
Methods inherited from class com.sapportals.htmlb.Component
getEncodedIdForForm, getId, getParent, initFromPageContext, initFromShortId, initializeFromId, isJsObjectNeeded, preRender, 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_HEAD

public static final int VAR_HEAD
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
Constructor Detail

Includes

public Includes()
create a new Includes component.

Method Detail

addHeadResource

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

Parameters:
type - the type of the resource
key - a key identifying the resource
data - the Resource data

addHeadResource

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

Parameters:
type - the type of the resource
key - a key identifying the resource
data - the Resource data
optionalAttributes - optional attributes for HTML rendering

addBodyBeginResource

public void addBodyBeginResource(ResourceType type,
                                 String key,
                                 Object data)
add a specific resource to the begin of the body

Parameters:
type - the type of the resource
key - a key identifying the resource
data - the Resource data

addBodyBeginResource

public void addBodyBeginResource(ResourceType type,
                                 String key,
                                 Object data,
                                 String optionalAttributes)
add a specific resource to the begin of the body

Parameters:
type - the type of the resource
key - a key identifying the resource
data - the Resource data
optionalAttributes - optional attributes for HTML rendering

addBodyEndResource

public void addBodyEndResource(ResourceType type,
                               String key,
                               Object data)
add a specific resource to the end of the body

Parameters:
type - the type of the resource
key - a key identifying the resource
data - the Resource data

addBodyEndResource

public void addBodyEndResource(ResourceType type,
                               String key,
                               Object data,
                               String optionalAttributes)
add a specific resource to the begin of the body

Parameters:
type - the type of the resource
key - a key identifying the resource
data - the Resource data
optionalAttributes - optional attributes for HTML rendering

getHeadList

public List getHeadList()
get a List of all resources for the document head

Returns:
a list of the resources

getBodyBeginList

public List getBodyBeginList()
get a List of all resources for the begin of the document body

Returns:
a list of the resources

getBodyEndList

public List getBodyEndList()
get a List of all resources for the end of the document body

Returns:
a list of the resources

getUI

public String getUI()
Description copied from class: Component
get a identification String for the renderer that is unique across all supported components. E.g. you could simply return the class name of the component class. The reason for using a separate method and not some internal reflection method is that you can more easily extend the functionality or your Component class without having to rewrite the view class.

Specified by:
getUI in class Component
Returns:
a unique identification string for this Component

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.

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

hasHeadResource

public boolean hasHeadResource(ResourceType type,
                               String key)
checks if a given resource is within the document head

Parameters:
type - the type of the resource
key - a key identifying the resource


Copyright 2006 SAP AG Complete Copyright Notice