com.esri.adf.web.data.results
Class ResultNodeContent

java.lang.Object
  extended by com.esri.adf.web.data.TocNodeContent
      extended by com.esri.adf.web.data.results.ResultNodeContent
All Implemented Interfaces:
Serializable

public class ResultNodeContent
extends TocNodeContent

A TOC content implementation for result view. It is an internal implementation class, user generally does not directly access this class.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.esri.adf.web.data.TocNodeContent
disabled
 
Constructor Summary
ResultNodeContent(ResultNode result, WebResultsToc toc, boolean topLevelNode)
          Instantiates an object of ResultNodeContent.
 
Method Summary
 List<javax.faces.model.SelectItem> getContextMenuItems()
          The list of javax.faces.model.SelectItem objects representing each item of this node's context menu.
 ResultNode getResult()
          Gets the result node of this content.
 String getText()
          Returns the text displayed on the node.
 void handleContextMenuEvent(String contextMenuItemValue, TocEvent args)
          Handles the context menu event occuring at a node.
 void handleNodeEvent(TocEvent args)
          Handles the event which occurs at a content node.
 boolean isSelected()
          Returns an indicator if the node is selected.
 boolean isUrl()
          Returns an indicator if the content is a URL.
 
Methods inherited from class com.esri.adf.web.data.TocNodeContent
getImageUrl, handleCheckedEvent, handleExpandCollapseEvent, isCheckable, isChecked, isDisabled, setChecked, setDisabled, setImageUrl, setText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultNodeContent

public ResultNodeContent(ResultNode result,
                         WebResultsToc toc,
                         boolean topLevelNode)
Instantiates an object of ResultNodeContent.

Parameters:
result - the node to add content
toc - the result TOC object associated with this content.
topLevelNode - set to true if it is a top level node.
Method Detail

getContextMenuItems

public List<javax.faces.model.SelectItem> getContextMenuItems()
Description copied from class: TocNodeContent
The list of javax.faces.model.SelectItem objects representing each item of this node's context menu. This default implementation returns null.

Overrides:
getContextMenuItems in class TocNodeContent
Returns:
a List of javax.faces.model.SelectItem objects

handleContextMenuEvent

public void handleContextMenuEvent(String contextMenuItemValue,
                                   TocEvent args)
                            throws Exception
Description copied from class: TocNodeContent
Handles the context menu event occuring at a node. The method should handle the event according to the contextMenuItemValue parameter. This parameter is based on the context menu items generated by the getContextMenuItems() method.

Overrides:
handleContextMenuEvent in class TocNodeContent
Parameters:
contextMenuItemValue - the value of the context menu item to be processed
args - the TocEvent
Throws:
Exception

handleNodeEvent

public void handleNodeEvent(TocEvent args)
                     throws Exception
Description copied from class: TocNodeContent
Handles the event which occurs at a content node. The TocNode delegates event handling for node content operations to this method, typically when the node is clicked.

Specified by:
handleNodeEvent in class TocNodeContent
Parameters:
args - the TocEvent
Throws:
Exception

getText

public String getText()
Description copied from class: TocNodeContent
Returns the text displayed on the node.

Specified by:
getText in class TocNodeContent
Returns:
String- the text

isSelected

public boolean isSelected()
Description copied from class: TocNodeContent
Returns an indicator if the node is selected.

Overrides:
isSelected in class TocNodeContent
Returns:
boolean- if true, the node is selected. The default is false.

isUrl

public boolean isUrl()
Description copied from class: TocNodeContent
Returns an indicator if the content is a URL.

Overrides:
isUrl in class TocNodeContent
Returns:
boolean- if true, the content is a URL. The default is false.

getResult

public ResultNode getResult()
Gets the result node of this content.