public class

LayoutContext

extends Object
java.lang.Object
   ↳ com.microstrategy.web.tags.LayoutContext

Class Overview

The LayoutContext class holds the information required by the layout rendering methods to generate dynamic contents.

Summary

Public Constructors
LayoutContext(Transform trans, Transformable data)
Constructs a LayoutContext object with the specified transform and transformable objects.
LayoutContext(Transform trans, Transformable data, boolean excludeStaticTags)
Constructs a LayoutContext object with the specified transform and transformable objects.
Public Methods
void addList(String key, List list)
Caches a List of values with the specified key.
void addObjectInfo(String key, BaseObjectInfo o)
Caches an object for further reference with the specified key.
boolean excludeStaticTags()
Returns a boolean value indicating whether to exclude the static contents while rendering the layout source.
Block getBlock()
Get the top block on the Block stack.
BlockContext getBlockContext()
Returns the BlockContext associated with this layout.
int getBlockSize()
BlockTarget getBlockTarget()
Block getLastPoppedBlock()
Returns the last block that was popped off of the Block stack.
List getList(String key)
Returns the cached list of values through the specified key.
BaseObjectInfo getObjectInfo(String key)
Returns the cached base object through the specified key.
Block getRootBlock(int index)
Returns the ith root Block.
Block getRootBlock(String rootBlockName)
Returns the root Block with a specified name.
Transform getTransform()
Returns the Transform object.
Transformable getTransformable()
Returns the Transformable object.
Block popBlock()
Pops the top block off of the Block stack.
BlockTarget popBlockTarget()
void pushBlock(Block block)
Pushes a Block instance into the current Block stack.
void pushBlockTarget(BlockTarget pathTarget)
void removeList(String key)
Removes the cached list through the specified key.
void removeObjectInfo(String key)
Removes the cached base object through the specified key.
void setBlockContext(BlockContext blockContext)
Sets the BlockContext associated with this layout.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public LayoutContext (Transform trans, Transformable data)

Constructs a LayoutContext object with the specified transform and transformable objects. It is equivalent to call the overloaded constructor LayoutContext(trans, data, false).

Parameters
trans a Transform instance.
data a Transformable instance.

public LayoutContext (Transform trans, Transformable data, boolean excludeStaticTags)

Constructs a LayoutContext object with the specified transform and transformable objects. If the parameter excludeStaticTags is true, the rendering method should discard any static contents defined in the layout but only generate dynamic contents.

Parameters
trans a Transform instance.
data a Transformable instance.
excludeStaticTags true to exclude static contents defined in the layout XHTML source.

Public Methods

public void addList (String key, List list)

Caches a List of values with the specified key.

Parameters
key the key to retrieve the cached list of values.
list a list of values.

public void addObjectInfo (String key, BaseObjectInfo o)

Caches an object for further reference with the specified key.

Parameters
key the key to retrieve the cached list of values.
o the object to be cached.

public boolean excludeStaticTags ()

Returns a boolean value indicating whether to exclude the static contents while rendering the layout source.

Returns
  • true to exclude the static contents.

public Block getBlock ()

Get the top block on the Block stack. This block is not removed from the stack--only returned.

Returns
  • The current top of the Block stack.

public BlockContext getBlockContext ()

Returns the BlockContext associated with this layout.

Returns

public int getBlockSize ()

public BlockTarget getBlockTarget ()

public Block getLastPoppedBlock ()

Returns the last block that was popped off of the Block stack.

Returns
  • The last Block that was popped off of the Block stack.
See Also

public List getList (String key)

Returns the cached list of values through the specified key. Null is returned if there is no such a list with the named key.

Parameters
key the key used to retrieve the cached values
Returns
  • a List of values cached.

public BaseObjectInfo getObjectInfo (String key)

Returns the cached base object through the specified key. Null is returned if there is no such an object with the named key.

Parameters
key the key used to retrieve the object
Returns
  • a Object with the specified key as the id.

public Block getRootBlock (int index)

Returns the ith root Block.

Parameters
index The index of the "root" Block to return.
Returns
Throws
IndexOutOfBoundsException

public Block getRootBlock (String rootBlockName)

Returns the root Block with a specified name.

Parameters
rootBlockName The name of the root Block to return.
Returns
  • The Block whose name is matched.

public Transform getTransform ()

Returns the Transform object.

Returns
  • the Transform object.

public Transformable getTransformable ()

Returns the Transformable object.

Returns
  • the Transformable object.

public Block popBlock ()

Pops the top block off of the Block stack.

Returns
  • The top Block which was popped off of the stack.

public BlockTarget popBlockTarget ()

public void pushBlock (Block block)

Pushes a Block instance into the current Block stack. If it is the first block added, it is considered a "root" Block (and can be later retrieved via getRootBlock(int).

Parameters
block The Block to add to the current Block stack.

public void pushBlockTarget (BlockTarget pathTarget)

public void removeList (String key)

Removes the cached list through the specified key.

Parameters
key the key used to look up for the cached list.

public void removeObjectInfo (String key)

Removes the cached base object through the specified key.

Parameters
key the key used to look up for the cached object.

public void setBlockContext (BlockContext blockContext)

Sets the BlockContext associated with this layout.

Parameters
blockContext The BlockContext object associated with this layout.