com.cc.framework.ui.control
Class MessageControl

java.lang.Object
  extended bycom.cc.framework.ui.control.Control
      extended bycom.cc.framework.ui.control.MessageControl
All Implemented Interfaces:
AccessControlled, ActionBehavior, ClientHandler, MessageStateModel, java.io.Serializable, StateModel

public class MessageControl
extends Control
implements MessageStateModel

The Message Control

Since:
1.0
Version:
$Revision: 1.17 $
Author:
Harald Schulz
See Also:
Serialized Form

Field Summary
private  MessageDataModel dataModel
          The data model
private  MessageDesignModel designModel
          The design model
private static long serialVersionUID
          Serial Version UID
 
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
MessageControl()
          Constructor for MessageTag
 
Method Summary
 boolean filter()
          Returns if the filter is activated (default=true).
 java.lang.String getCaption()
          Returns the caption
 DataModel getDataModel()
          Returns the data model of the Control
 ControlDesignModel getDesignModel()
          Returns the design model of the control
 java.lang.String getDetail()
          Returns the detail
 Message[] getFilteredMessages()
          Returns a list of messages that is filtered to the controls severity
 java.lang.String getFormId()
          Returns the form id
 ImageModel getImage()
          Returns the image for the frames title
 InnerFrame[] getInnerFrames(java.lang.Object layoutHint)
          Retrieves a list of inner frames that are matching the given layout hint
 Message[] getMessages()
          Returns the messages
 Severity getSeverity()
          Returns the severity
 StateModel getStateModel()
          Returns the state model of the control
 void reset()
          Resets the actual state of a control to the initial state
 void setDataModel(MessageDataModel dataModel)
          Sets the data model
 void setDesignModel(MessageDesignModel designModel)
          Sets the design model
 boolean showButton(ControlButton button)
          This Method is called by the Painter before rendering a Button.
 int size()
          Returns the number of messages
 
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, 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 MessageDataModel dataModel
The data model


designModel

private MessageDesignModel designModel
The design model

Constructor Detail

MessageControl

public MessageControl()
Constructor for MessageTag

Method Detail

getStateModel

public StateModel getStateModel()
Description copied from class: Control
Returns the state model of the control

Specified by:
getStateModel in class Control
Returns:
The state model
See Also:
Control.getStateModel()

getDataModel

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

Specified by:
getDataModel in class Control
Returns:
The data model
See Also:
Control.getDataModel()

getDesignModel

public ControlDesignModel getDesignModel()
Description copied from class: Control
Returns the design model of the control

Specified by:
getDesignModel in class Control
Returns:
The ControlDesignModel
See Also:
Control.getDesignModel()

setDataModel

public void setDataModel(MessageDataModel dataModel)
Sets the data model

Parameters:
dataModel - The data model

setDesignModel

public void setDesignModel(MessageDesignModel designModel)
Sets the design model

Parameters:
designModel - The design model

getFormId

public java.lang.String getFormId()
Returns the form id

Returns:
The form id

getCaption

public java.lang.String getCaption()
Returns the caption

Returns:
The caption

getDetail

public java.lang.String getDetail()
Returns the detail

Returns:
The detail

getMessages

public Message[] getMessages()
Returns the messages

Returns:
Collection of messages

getFilteredMessages

public Message[] getFilteredMessages()
Returns a list of messages that is filtered to the controls severity

Returns:
Filtered Message List

size

public int size()
Returns the number of messages

Returns:
The number of messages

getSeverity

public Severity getSeverity()
Returns the severity

Returns:
The severity

getImage

public ImageModel getImage()
Returns the image for the frames title

Returns:
ImageModel

showButton

public boolean showButton(ControlButton button)
Description copied from class: Control
This Method is called by the Painter before rendering a Button. By overwriting this method a derived class can show or hide buttons.

Overrides:
showButton in class Control
Parameters:
button - ControlButton
Returns:
boolean
See Also:
Control.showButton(com.cc.framework.ui.control.ControlButton)

getInnerFrames

public InnerFrame[] getInnerFrames(java.lang.Object layoutHint)
Retrieves a list of inner frames that are matching the given layout hint

Parameters:
layoutHint - The layout hint that specifies what frames should be selected: AlignmentType.TOP - header frames AlignmentType.BOTTOM - footer frames
Returns:
Frame list

filter

public boolean filter()
Returns if the filter is activated (default=true). This means that all Strings which should be displayed in the HTML page are HTML encoded

Returns:
true if string will be HTML encoded; false otherwise

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
See Also:
StateModel.reset()


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