public class

ComponentBlock

extends Object
java.lang.Object
   ↳ com.microstrategy.web.beans.ComponentBlock

Class Overview

This class represents a component block generated for partial update request. A ComponentBlock consists of a set of name/value pairs, HTML content (if the component needs to update itself) and a list of child ComponentBlocks (if the component has sub components to update) ComponentBlock renders itself into JSON stream. If child ComponentsBlocks are present it will just render the children array as the value of the COMPONENTS property; if it's child-less it will render the HTML content as the value of the CONTENT property.

Summary

Public Constructors
ComponentBlock(String id, MarkupOutput out)
Creates a new ComponentBlock object.
Public Methods
void addChildBlock(ComponentBlock bl)
Add a child ComponentBlock to the children list
void addErrorInfo(String error)
Append more error information to the ComponentBlock instance.
List<ComponentBlock> getChildBlocks()
Returns the list of child ComponentBlocks.
MarkupOutput getContent()
Returns the MarkupOutput instance that holds the HTML content
boolean hasChildBlocks()
Return a flag indicating whether this instance has children ComponentBlock(s) or not
void serializeInto(MarkupOutput out, BlockContext bContext)
This method is called when a ComponentBlock needs to serialize itself.
void setErrorInfo(StringBuffer error)
Set error information on the ComponentBlock instance.
BlockProperty setOrCreateProperty(String propName, String propType, Object propValue)
Sets a property (creating it, if necessary) to a specific value.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ComponentBlock (String id, MarkupOutput out)

Creates a new ComponentBlock object.

Public Methods

public void addChildBlock (ComponentBlock bl)

Add a child ComponentBlock to the children list

Parameters
bl child ComponentBlock

public void addErrorInfo (String error)

Append more error information to the ComponentBlock instance.

Parameters
error the error information that needs to be added

public List<ComponentBlock> getChildBlocks ()

Returns the list of child ComponentBlocks.

Returns

public MarkupOutput getContent ()

Returns the MarkupOutput instance that holds the HTML content

Returns

public boolean hasChildBlocks ()

Return a flag indicating whether this instance has children ComponentBlock(s) or not

Returns
  • boolean true if has children false if child-less

public void serializeInto (MarkupOutput out, BlockContext bContext)

This method is called when a ComponentBlock needs to serialize itself. If child ComponentsBlocks are present it will render the children array as the value of the COMPONENTS property; if it's child-less it will render the HTML content as the value of the CONTENT property.

Parameters
out the MarkupOutput instance that will hold the serialization result
bContext the BlockContext object that will be used for the Block instance to render itself

public void setErrorInfo (StringBuffer error)

Set error information on the ComponentBlock instance.

Parameters
error the StringBuffer with error information that needs to be set

public BlockProperty setOrCreateProperty (String propName, String propType, Object propValue)

Sets a property (creating it, if necessary) to a specific value.

Parameters
propName The name of the property to set.
propType The type of the property.
propValue The value of the property.
Returns