BEA Systems, Inc.

com.bea.console.utils
Class NavTreeExtensionEvent

java.lang.Object
  extended by com.bea.netuix.nf.events.UIEvent
      extended by com.bea.netuix.servlets.controls.AbstractEvent
          extended by com.bea.netuix.servlets.controls.portlet.events.PortletEvent
              extended by com.bea.console.utils.NavTreeExtensionEvent
All Implemented Interfaces:
Serializable

public class NavTreeExtensionEvent
extends com.bea.netuix.servlets.controls.portlet.events.PortletEvent

This class represents an event that is sent to a listener in the navigation tree portlet. The listener adds or replaces nodes in the navigation tree based on information in this event.

Invoke the constructors for this class from an implementation of NavTreeExtensionBacking.getTreeExtension(PageBackingContext, String). A portal control invokes this method to add itself to the navigation tree. The PageBackingContext and String values that it passes can be used in the constructors for this class.

See Also:
com.bea.netuix.servlets.controls.page.PageBackingContext, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.bea.netuix.servlets.controls.AbstractEvent
com.bea.netuix.servlets.controls.AbstractEvent.Manager
 
Field Summary
static int APPEND_ACTION
          Adds a node to the navigation tree.
static int REPLACE_ACTION
          Replaces a node in the navigation tree.
 
Fields inherited from class com.bea.netuix.servlets.controls.AbstractEvent
debug
 
Constructor Summary
NavTreeExtensionEvent(String pageLabel, String url)
          Convenience constructor that adds a node or node tree to the end of the navigation tree.
NavTreeExtensionEvent(String pageLabel, String url, String parentPath, TreeNode childNodes)
          Convenience constructor that appends a node or node tree in a specified location.
NavTreeExtensionEvent(String pageLabel, String url, String parentPath, TreeNode childNodes, int ACTION)
          Constructs a new NavTreeExtensionEvent that can append or replace a node or node tree in a specified location.
 
Method Summary
 int getAction()
          Indicates whether the navigation tree extension adds to the navigation tree or replaces an existing node.
 String getExtensionUrl()
          Returns a string representation of the default URL to the portal page that this event represents.
 String getPageLabel()
          Returns a string representing the pageLabel or definitionLabel of the page that this event represents.
 TreeNode getParent()
          Returns the parent TreeNode for the extension that this event represents.
 String getParentPath()
          Returns a String that describes the path to the parent node in the navigation tree for the extension that this event represents.
 void setAction(int action)
          Specifies whether the navigation tree extension adds to the navigation tree or replaces an existing node.
 void setExtensionUrl(String extensionUrl)
          Sets the URL to the page that this event represents.
 void setPageLabel(String pageLabel)
          Sets the pageLabel for this extesion.
 void setParent(TreeNode parent)
          Sets the parent TreeNode for the extension that this event represents.
 void setParentPath(String parentPath)
          Sets the path to a parent node in the navigation tree for the extension that this event represents.
 
Methods inherited from class com.bea.netuix.servlets.controls.portlet.events.PortletEvent
addGlobalListener, getEventManager, getPayload, removeGlobalListener, setPayload, toString
 
Methods inherited from class com.bea.netuix.servlets.controls.AbstractEvent
addGlobalListener, getEventManager, removeGlobalListener
 
Methods inherited from class com.bea.netuix.nf.events.UIEvent
addGlobalListener, getGlobalListeners, removeGlobalListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

APPEND_ACTION

public static int APPEND_ACTION
Adds a node to the navigation tree.


REPLACE_ACTION

public static int REPLACE_ACTION
Replaces a node in the navigation tree.

Constructor Detail

NavTreeExtensionEvent

public NavTreeExtensionEvent(String pageLabel,
                             String url,
                             String parentPath,
                             TreeNode childNodes,
                             int ACTION)

Constructs a new NavTreeExtensionEvent that can append or replace a node or node tree in a specified location.

The pageLabel parameter specifies the value of a portal control's definitionLabel attribute. You can use PageBackingContext.getDefinitionLabel() to get this value for the PageBackingContext instance that was passed as a parameter to the NavTreeExtensionBacking.getTreeExtension() method. Or you can specify a string.

The url parameter specifies the URL to a portal control. You can use the String that was passed as a parameter to the NavTreeExtensionBacking.getTreeExtension() method. Or you can specify the following value:
?_nfpb=true&_pageLabel=definitionLabel
where definitionLabel specifies the value of a portal control's definitionLabel attribute.

The parentPath parameter specifies the name of the node to which you want to append or that you want to replace. Use / (slash) to represent the root of the navigation tree and / to separate levels of the tree hierarchy. For example, if you want your node or node tree to display at the top level, specify /. If you want your node to display as a child of Environments, or to replace Environments, specify /Environments.

The ACTION parameter indicates whether you append to or replace the nodes that you named in the parentPath parameter. This class provides fields that you can use as the value of this parameter.

Parameters:
pageLabel - The definitionLabel of a page, this will be used as the node id
url - A URL that links the node to a page
parentPath - The location in which to add or replace the TreeNode
childNodes - The TreeNode object to add to the navigation tree
ACTION - The action desired (APPEND|INSERT)
See Also:
com.bea.netuix.servlets.controls.page.PageBackingContext

NavTreeExtensionEvent

public NavTreeExtensionEvent(String pageLabel,
                             String url,
                             String parentPath,
                             TreeNode childNodes)

Convenience constructor that appends a node or node tree in a specified location.

The pageLabel parameter specifies the value of a portal control's definitionLabel attribute. You can use PageBackingContext.getDefinitionLabel() to get this value for the PageBackingContext instance that was passed as a parameter to the NavTreeExtensionBacking.getTreeExtension() method. Or you can specify a string.

The url parameter specifies the URL to a portal control. You can use the String that was passed as a parameter to the NavTreeExtensionBacking.getTreeExtension() method. Or you can specify the following value:
?_nfpb=true&_pageLabel=definitionLabel
where definitionLabel specifies the value of a portal control's definitionLabel attribute.

The parentPath parameter specifies the name of the node to which you want to append. Use / (slash) to represent the root of the navigation tree and / to separate levels of the tree hierarchy. For example, if you want your node or node tree to display at the top level, specify /. If you want your node to display as a child of Environments, specify /Environments.

Parameters:
pageLabel - The definitionLabel of a page, this will be used as the node id
url - A URL that links the node to a page
parentPath - The location in which to add the TreeNode
childNodes - The TreeNode object to add to the navigation tree
See Also:
com.bea.netuix.servlets.controls.page.PageBackingContext

NavTreeExtensionEvent

public NavTreeExtensionEvent(String pageLabel,
                             String url)

Convenience constructor that adds a node or node tree to the end of the navigation tree.

The pageLabel parameter specifies the value of a portal control's definitionLabel attribute. You can use PageBackingContext.getDefinitionLabel() to get this value for the PageBackingContext instance that was passed as a parameter to the NavTreeExtensionBacking.getTreeExtension() method. Or you can specify a string.

The url parameter specifies the URL to a portal control. You can use the String that was passed as a parameter to the NavTreeExtensionBacking.getTreeExtension() method. Or you can specify the following value:
?_nfpb=true&_pageLabel=definitionLabel
where definitionLabel specifies the value of a portal control's definitionLabel attribute.

See Also:
com.bea.netuix.servlets.controls.page.PageBackingContext
Method Detail

getParentPath

public String getParentPath()

Returns a String that describes the path to the parent node in the navigation tree for the extension that this event represents.

Returns:
parentPath The path to the parent node.

setParentPath

public void setParentPath(String parentPath)

Sets the path to a parent node in the navigation tree for the extension that this event represents.

Parameters:
parentPath - A string representing the path to the parent.

getParent

public TreeNode getParent()

Returns the parent TreeNode for the extension that this event represents. Each navigation tree extension can have only one parent.

Returns:
parent The TreeNode object representing the extension node parent.

setParent

public void setParent(TreeNode parent)

Sets the parent TreeNode for the extension that this event represents.

Parameters:
parent - A TreeNode representing the parent extension node.

getPageLabel

public String getPageLabel()

Returns a string representing the pageLabel or definitionLabel of the page that this event represents.

Returns:
A String representing the pageLabel or definitionLabel

setPageLabel

public void setPageLabel(String pageLabel)

Sets the pageLabel for this extesion. This in many cases is set automatically for you unless you are creating a custom navigation tree extension.

Parameters:
pageLabel - A string representing the pageLabel or definitionLabel

getExtensionUrl

public String getExtensionUrl()

Returns a string representation of the default URL to the portal page that this event represents. This URL can be used in hyperlinks to allow the user to navigate to this page. Note, this is only the default URL. You can provide your own URLs in the constructor for the TreeNode of new nodes.

Returns:
extensionURL A String representation of the URL to the page.

setExtensionUrl

public void setExtensionUrl(String extensionUrl)

Sets the URL to the page that this event represents.

Parameters:
extensionUrl - A string representation of the URL.

getAction

public int getAction()

Indicates whether the navigation tree extension adds to the navigation tree or replaces an existing node.

Returns:
An integer representing either an APPEND_ACTION or REPLACE_ACTION

setAction

public void setAction(int action)

Specifies whether the navigation tree extension adds to the navigation tree or replaces an existing node. Use one of the following values:

Parameters:
action - An integer representing the action the extension is to take when applying the new nodes to the navigation tree.

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs100
Copyright 2006 BEA Systems Inc.