com.arsdigita.bebop
Class PageErrorDisplay

java.lang.Object
  extended bycom.arsdigita.bebop.Completable
      extended bycom.arsdigita.bebop.SimpleComponent
          extended bycom.arsdigita.bebop.List
              extended bycom.arsdigita.bebop.PageErrorDisplay
All Implemented Interfaces:
BebopConstants, Cloneable, Component, Lockable
Direct Known Subclasses:
FormErrorDisplay

public class PageErrorDisplay
extends List

Displays validation errors for the page. These might have occured due to validation listeners on some state parameters within the page.

Version:
$Id: //core-platform/dev/src/com/arsdigita/bebop/PageErrorDisplay.java#9 $
Author:
Stanislav Freidin

Nested Class Summary
protected static class PageErrorDisplay.StringIteratorModel
           
 
Field Summary
static String versionId
           
 
Fields inherited from class com.arsdigita.bebop.List
EMPTY_MODEL, HORIZONTAL, SELECT_EVENT, SELECTED, VERTICAL
 
Fields inherited from class com.arsdigita.bebop.SimpleComponent
m_attr
 
Fields inherited from interface com.arsdigita.bebop.util.BebopConstants
BEBOP_BORDER, BEBOP_BOXPANEL, BEBOP_CELL, BEBOP_CHECKBOX, BEBOP_CHECKBOXGROUP, BEBOP_COLUMNPANEL, BEBOP_DATE, BEBOP_DATETIME, BEBOP_DHTMLEDITOR, BEBOP_FORMERRORS, BEBOP_FORMWIDGET, BEBOP_GRIDPANEL, BEBOP_LIST, BEBOP_MULTISELECT, BEBOP_OPTION, BEBOP_PAD, BEBOP_PADFRAME, BEBOP_PANELROW, BEBOP_PORTAL, BEBOP_PORTLET, BEBOP_RADIO, BEBOP_RADIOGROUP, BEBOP_SEG_BODY, BEBOP_SEG_HEADER, BEBOP_SEG_PANEL, BEBOP_SEGMENT, BEBOP_SELECT, BEBOP_TABLE, BEBOP_TABLEBODY, BEBOP_TABLEROW, BEBOP_TEXTAREA
 
Fields inherited from interface com.arsdigita.bebop.Component
BEBOP_XML_NS, CLASS, ID, ON_CLICK, STYLE
 
Constructor Summary
  PageErrorDisplay()
          Constructs a new PageErrorDisplay.
protected PageErrorDisplay(ListModelBuilder builder)
          Constructs a new PageErrorDisplay from the errors supplied by a list model builder.
 
Method Summary
 void generateXML(PageState state, Element parent)
          Generates the XML for this component.
 String getTextColor()
          Gets the HTML color of the error messages.
protected  boolean hasErrors(PageState state)
          Determines if there are errors to display.
 void setTextColor(String c)
          Sets the HTML color of the error messages.
 
Methods inherited from class com.arsdigita.bebop.List
addActionListener, addChangeListener, clearSelection, createChangeListener, fireActionEvent, fireStateChanged, getCellRenderer, getEmptyView, getLayout, getModel, getModelBuilder, getSelectedKey, getSelectionModel, getStateParamsAreRegistered, isSelected, register, removeActionListener, removeChangeListener, respond, setCellRenderer, setEmptyView, setLayout, setListData, setListData, setModelBuilder, setSelectedKey, setSelectionModel, setStateParamsAreRegistered
 
Methods inherited from class com.arsdigita.bebop.SimpleComponent
children, clone, exportAttributes, getAttribute, getClassAttr, getIdAttr, getKey, getMetaDataAttribute, getStyleAttr, hasAttributes, isLocked, isVisible, lock, register, setAttribute, setClassAttr, setIdAttr, setKey, setMetaDataAttribute, setStyleAttr, setVisible
 
Methods inherited from class com.arsdigita.bebop.Completable
addCompletionListener, fireCompletionEvent
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

PageErrorDisplay

public PageErrorDisplay()
Constructs a new PageErrorDisplay.


PageErrorDisplay

protected PageErrorDisplay(ListModelBuilder builder)
Constructs a new PageErrorDisplay from the errors supplied by a list model builder.

Parameters:
builder - the ListModelBuilder that will supply the errors
Method Detail

setTextColor

public void setTextColor(String c)
Sets the HTML color of the error messages.

Parameters:
c - An HTML color, such as "#99CCFF" or "red"

getTextColor

public String getTextColor()
Gets the HTML color of the error messages.

Returns:
the HTML color of the error messages.

hasErrors

protected boolean hasErrors(PageState state)
Determines if there are errors to display.

Parameters:
state - the current page state
Returns:
true if there are any errors to display; false otherwise.

generateXML

public void generateXML(PageState state,
                        Element parent)
Generates the XML for this component. If the state has no errors in it, does not generate any XML.

Specified by:
generateXML in interface Component
Overrides:
generateXML in class List
Parameters:
state - the current page state
parent - the parent XML element
See Also:
ListCellRenderer


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC