public abstract class

BlockListElement

extends BlockTarget
java.lang.Object
   ↳ com.microstrategy.web.blocks.BlockTarget
     ↳ com.microstrategy.web.blocks.BlockListElement
Known Direct Subclasses

Class Overview

This class represents a generic element of a List. This is used as a base class for a List or a Block.

Summary

Nested Classes
enum BlockListElement.ListAction This enumeration defines the types of actions that may be associated with a BlockListElement when it is added to a BlockList. 
[Expand]
Inherited Constants
From class com.microstrategy.web.blocks.BlockTarget
Public Methods
BlockListElement.ListAction getListAction()
Returns the specified list action to perform when a Block List Element is added to a list.
String getListElementKey()
Returns the key associated with this list element, if one exists.
Object getListItem()
Returns the "list item" specified for this Block.
void setListAction(BlockListElement.ListAction listAction)
Sets the specified list action to perform when a Block List Element is added to a list.
void setListElementKey(String key)
Sets the key to be associated with this list element.
void setListItem(int listItem)
Sets the "list item" to a numeric index.
void setListItem(String key)
Sets the "list item" to either a numeric index or a key.
[Expand]
Inherited Methods
From class com.microstrategy.web.blocks.BlockTarget
From class java.lang.Object

Public Methods

public BlockListElement.ListAction getListAction ()

Returns the specified list action to perform when a Block List Element is added to a list.

Returns

public String getListElementKey ()

Returns the key associated with this list element, if one exists.

Returns
  • The key for this list element, or null if none exists.

public Object getListItem ()

Returns the "list item" specified for this Block. Only valid when the Block is in a "list context", a "list item" specifies the existing element that an "insert", "add" or "replace" operation is relative to. If a numeric index was specified, then this method returns an Integer. Otherwise, it returns the (String) key specified.

Returns
  • Either an Integer or a String, if it was specified. Otherwise, it is null.

public void setListAction (BlockListElement.ListAction listAction)

Sets the specified list action to perform when a Block List Element is added to a list.

Parameters
listAction A value from the BlockListElement.ListAction enumeration.

public void setListElementKey (String key)

Sets the key to be associated with this list element. This key is used to associate an identifier with a specific index in the containing BlockList. Note that changing the key has no effect after a list element has been added to a list.

Parameters
key The key used to identify this "slot" in the BlockList.

public void setListItem (int listItem)

Sets the "list item" to a numeric index.

Parameters
listItem The numeric index to use with an "add", "insert" or "replace" operation.

public void setListItem (String key)

Sets the "list item" to either a numeric index or a key. It tries to parse the string as an integer. If valid, an Integer is created. Otherwise, the String is used as the key of the item.

Parameters
key Either a number or key, saved as a String.