com.cc.framework.ui.control
Class MenuContext

java.lang.Object
  extended bycom.cc.framework.ui.control.MenuContext

public final class MenuContext
extends java.lang.Object

MenuContext Every JSP can define one MenuContext

Since:
1.0
Version:
$Revision: 1.12 $
Author:
Gernot Schulz

Field Summary
private  java.lang.String filter
          Additional filter to filter MenuItems not needed
private  java.lang.String path
          The current MenuPath
 
Constructor Summary
private MenuContext()
          Constructor An Instance of this Class only can be created with the Method getContext()
 
Method Summary
 boolean filter(java.lang.String itemFilter)
          Helper to check if a menu item matches a filter expression.
static MenuContext getContext(javax.servlet.jsp.PageContext pageContext)
          Gets the actual menu context from the request.
static MenuContext getContext(javax.servlet.ServletRequest request)
          Gets the actual menu context from the request.
 java.lang.String getFilter()
          Returns the filter.
 java.lang.String getPath()
          Returns the path.
 boolean isSelected(java.lang.String itemPath)
          Helper to check if a menu item is included in the actual path
 void setFilter(java.lang.String filter)
          Sets the filter.
 void setPath(java.lang.String path)
          Sets the path.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

path

private java.lang.String path
The current MenuPath


filter

private java.lang.String filter
Additional filter to filter MenuItems not needed

Constructor Detail

MenuContext

private MenuContext()
Constructor An Instance of this Class only can be created with the Method getContext()

Method Detail

getContext

public static MenuContext getContext(javax.servlet.jsp.PageContext pageContext)
Gets the actual menu context from the request. If the context did not exist, it will be created

Parameters:
pageContext - PageContext
Returns:
MenuContext

getContext

public static MenuContext getContext(javax.servlet.ServletRequest request)
Gets the actual menu context from the request. If the context did not exist, it will be created

Parameters:
request - ServletRequest
Returns:
MenuContext

isSelected

public boolean isSelected(java.lang.String itemPath)
Helper to check if a menu item is included in the actual path

Parameters:
itemPath - Path
Returns:
boolean

filter

public boolean filter(java.lang.String itemFilter)
Helper to check if a menu item matches a filter expression.

Parameters:
itemFilter - The filter expression.
Returns:
boolean

getFilter

public java.lang.String getFilter()
Returns the filter.

Returns:
String

getPath

public java.lang.String getPath()
Returns the path.

Returns:
String

setFilter

public void setFilter(java.lang.String filter)
Sets the filter.

Parameters:
filter - The filter to set

setPath

public void setPath(java.lang.String path)
Sets the path.

Parameters:
path - The path to set

toString

public java.lang.String toString()
See Also:
Object.toString()


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.