com.cc.framework.ui.control
Class MenuButtonControl

java.lang.Object
  extended bycom.cc.framework.ui.control.Control
      extended bycom.cc.framework.ui.control.ButtonControl
          extended bycom.cc.framework.ui.control.MenuButtonControl
All Implemented Interfaces:
AccessControlled, ActionBehavior, ButtonStateModel, ClientHandler, MenuButtonStateModel, java.io.Serializable, StateModel

public class MenuButtonControl
extends ButtonControl
implements MenuButtonStateModel

Menu Button Control. The Menu Button has an associated popup menu from which the user can select the action the menu button will trigger. The current action is stored in the menu buttons state model

Version:
$Revision: 1.2 $
Author:
Harald Schulz
See Also:
Serialized Form

Field Summary
private  MenuButtonDataModel dataModel
          DataModel
private static long serialVersionUID
          Serial Version UID
 
Fields inherited from class com.cc.framework.ui.control.ButtonControl
 
Fields inherited from class com.cc.framework.ui.control.Control
log
 
Fields inherited from interface com.cc.framework.ui.model.StateModel
PROP_CONTROL
 
Constructor Summary
MenuButtonControl()
          Constructor
MenuButtonControl(MenuButtonDesignModel designModel)
          Constructor
 
Method Summary
 MenuItem[] getContent()
          Returns the Content
 DataModel getDataModel()
          Returns the data model of the Control
 ImageMap getImageMap()
          Returns the ImageMap
 java.lang.String getPopupId()
           
 void onLoadMenu(ControlRequestContext ctx, java.lang.String menuId)
          Loads the specified menu and returns the menu as an XML stream.
 void reset()
          Resets the actual state of a control to the initial state
 void setDataModel(MenuButtonDataModel dataModel)
          Sets the controls data model
 
Methods inherited from class com.cc.framework.ui.control.ButtonControl
filter, getBase, getButtonStyle, getButtonType, getDesignModel, getSrc, getStateModel, getTarget, getText, setDesignModel
 
Methods inherited from class com.cc.framework.ui.control.Control
addButton, allowAjaxRendering, execute, execute, execute, execute, execute, execute, execute, getAction, getAjaxId, getButtons, getControlName, getDesignRules, getFrameworkString, getHandler, getHandlers, getHeight, getHelp, getId, getLocaleName, getName, getPermission, getPrincipal, getProperty, getRunAt, getStyle, getStyleClass, getStyleId, getSummary, getTabIndex, getTooltip, getTransaction, getUniqueStyleId, getWidth, isAjaxEnabled, isDisabled, isFormElement, markDirty, onHelp, setAjaxAttribute, setHandler, setPrincipal, setValue, show, showButton, synchronizeState, synchronizeState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.cc.framework.ui.model.StateModel
synchronizeState
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

dataModel

private MenuButtonDataModel dataModel
DataModel

Constructor Detail

MenuButtonControl

public MenuButtonControl()
Constructor


MenuButtonControl

public MenuButtonControl(MenuButtonDesignModel designModel)
Constructor

Parameters:
designModel - the Design Model of the control
Method Detail

reset

public void reset()
Description copied from interface: StateModel
Resets the actual state of a control to the initial state

Specified by:
reset in interface StateModel
Overrides:
reset in class ButtonControl
See Also:
StateModel.reset()

getDataModel

public DataModel getDataModel()
Description copied from class: Control
Returns the data model of the Control

Overrides:
getDataModel in class ButtonControl
See Also:
Control.getDataModel()

setDataModel

public void setDataModel(MenuButtonDataModel dataModel)
Sets the controls data model

Parameters:
dataModel - Data Model

getContent

public MenuItem[] getContent()
Returns the Content

Returns:
MenuItemDesignModel

getImageMap

public ImageMap getImageMap()
Returns the ImageMap

Returns:
ImageMap

getPopupId

public java.lang.String getPopupId()
Returns:
the id of the popup menu

onLoadMenu

public void onLoadMenu(ControlRequestContext ctx,
                       java.lang.String menuId)
                throws java.lang.Exception
Loads the specified menu and returns the menu as an XML stream.

Parameters:
ctx - ControlRequestContext
menuId - the id of the menu to load
Throws:
java.lang.Exception - is thrown when an error occurs


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