to.etc.domui.component.layout
Class ErrorPanel

java.lang.Object
  extended by to.etc.domui.dom.css.CssBase
      extended by to.etc.domui.dom.html.NodeBase
          extended by to.etc.domui.dom.html.NodeContainer
              extended by to.etc.domui.dom.html.Div
                  extended by to.etc.domui.component.layout.CaptionedPanel
                      extended by to.etc.domui.component.layout.ErrorPanel
All Implemented Interfaces:
java.lang.Iterable<NodeBase>, IModelBinding, IErrorMessageListener, INodeErrorDelegate, IDraggable, IDropTargetable

public class ErrorPanel
extends CaptionedPanel
implements IErrorMessageListener

This is a CaptionedPanel which captures and displays errors for the tree it is in. This is the default component used by the framework when no other components captures a generated error; in that case the toplevel code catches the error, creates an ErrorPanel component and inserts that as the first node in the page's DOM. This component only changes the look of the CaptionedPanel and adds listeners for the errors.

Author:
Frits Jalvingh Created on Oct 17, 2008

Constructor Summary
ErrorPanel()
          Create a default error panel.
 
Method Summary
 void errorMessageAdded(Page pg, UIMessage m)
          Adds the new error message to this panel, making it visible.
 void errorMessageRemoved(Page pg, UIMessage m)
          Removes the error message from this panel, rendering it invisible.
 void onAddedToPage(Page p)
          When I'm added to a page register myself as an error listener for that page.
 void onRemoveFromPage(Page p)
          When I'm removed from a page I may no longer handle it's errors, so remove myself from the error listener chain.
 
Methods inherited from class to.etc.domui.component.layout.CaptionedPanel
createContent, getContent, getTitleContainer, setContentContainer, setTitle, setTitleContainer
 
Methods inherited from class to.etc.domui.dom.html.Div
afterCreateContent, componentHandleWebAction, fadeIn, fadeIn, fadeOut, getDragHandler, getDropBody, getDropHandler, getDropMode, getReturnPressed, setDragHandler, setDropBody, setDropHandler, setReturnPressed, slideDown, slideUp, tb, visit
 
Methods inherited from class to.etc.domui.dom.html.NodeContainer
add, add, add, addTable, canContain, delegateTo, findChildIndex, forceRebuild, getChild, getChildCount, getChildren, getDeepChild, getDeepChildren, getErrorFence, internalCheckNotDirty, internalClearDelta, internalClearDeltaFully, internalGetOldChildren, internalShelve, internalUnshelve, iterator, moveControlToModel, moveModelToControl, onRefresh, removeAllChildren, removeChild, removeChild, replaceChild, setControlsEnabled, setErrorFence, setErrorFence, setText, setValue
 
Methods inherited from class to.etc.domui.dom.html.NodeBase
$, acceptRequestParameter, addCssClass, addGlobalMessage, appendAfterMe, appendBeforeMe, appendCreateJS, appendJavascript, build, changed, clearFocusRequested, clearGlobalMessage, clearGlobalMessage, clearGlobalMessage, clearMessage, findComponentBundle, getActualID, getClicked, getComponentBundle, getCreateJS, getCssClass, getErrorDelegate, getErrorLocation, getMessage, getOnClickJS, getOnMouseDownJS, getPage, getParent, getParent, getParent, getSharedContext, getSpecialAttribute, getSpecialAttributeList, getTag, getTestID, getTitle, getUserObject, handleDrop, hasCssClass, hasError, internalGetOldParent, internalHasChangedAttributes, internalNeedClickHandler, internalOnClicked, internalSetHasChangedAttributes, internalSetHasChangedAttributes, internalSetTag, isBuilt, isFocusRequested, onBeforeFullRender, onForceRebuild, onHeaderContributors, onShelve, onUnshelve, refresh, remove, removeCssClass, renderJavascriptState, replaceWith, setClicked, setComponentBundle, setCssClass, setErrorDelegate, setErrorLocation, setFocus, setMessage, setOnClickJS, setOnMouseDownJS, setSpecialAttribute, setTestID, setUserObject, stretchHeight, toString
 
Methods inherited from class to.etc.domui.dom.css.CssBase
getBackgroundAttachment, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorderBottomColor, getBorderBottomStyle, getBorderBottomWidth, getBorderLeftColor, getBorderLeftStyle, getBorderLeftWidth, getBorderRightColor, getBorderRightStyle, getBorderRightWidth, getBorderTopColor, getBorderTopStyle, getBorderTopWidth, getBottom, getCachedStyle, getClear, getColor, getDisplay, getFloat, getFontFamily, getFontSize, getFontSizeAdjust, getFontStyle, getFontVariant, getFontWeight, getHeight, getLeft, getLineHeight, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOverflow, getPosition, getRight, getTextAlign, getTop, getTransform, getVerticalAlign, getVisibility, getWidth, getZIndex, internalSetDisplay, setBackgroundAttachment, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBorder, setBorderBottomColor, setBorderBottomStyle, setBorderBottomWidth, setBorderColor, setBorderLeftColor, setBorderLeftStyle, setBorderLeftWidth, setBorderRightColor, setBorderRightStyle, setBorderRightWidth, setBorderStyle, setBorderTopColor, setBorderTopStyle, setBorderTopWidth, setBorderWidth, setBottom, setBottom, setCachedStyle, setClear, setColor, setDisplay, setFloat, setFontFamily, setFontSize, setFontSizeAdjust, setFontStyle, setFontVariant, setFontWeight, setHeight, setLeft, setLeft, setLineHeight, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOverflow, setPosition, setRight, setRight, setTextAlign, setTop, setTop, setTransform, setVerticalAlign, setVisibility, setWidth, setZIndex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ErrorPanel

public ErrorPanel()
Create a default error panel.

Method Detail

onAddedToPage

public void onAddedToPage(Page p)
When I'm added to a page register myself as an error listener for that page.

Overrides:
onAddedToPage in class NodeBase
See Also:
NodeBase.onAddedToPage(to.etc.domui.dom.html.Page)

onRemoveFromPage

public void onRemoveFromPage(Page p)
When I'm removed from a page I may no longer handle it's errors, so remove myself from the error listener chain.

Overrides:
onRemoveFromPage in class NodeBase
See Also:
NodeBase.onRemoveFromPage(to.etc.domui.dom.html.Page)

errorMessageAdded

public void errorMessageAdded(Page pg,
                              UIMessage m)
Adds the new error message to this panel, making it visible.

Specified by:
errorMessageAdded in interface IErrorMessageListener
See Also:
IErrorMessageListener.errorMessageAdded(to.etc.domui.dom.html.Page, to.etc.domui.dom.errors.UIMessage)

errorMessageRemoved

public void errorMessageRemoved(Page pg,
                                UIMessage m)
Removes the error message from this panel, rendering it invisible.

Specified by:
errorMessageRemoved in interface IErrorMessageListener
See Also:
IErrorMessageListener.errorMessageRemoved(to.etc.domui.dom.html.Page, to.etc.domui.dom.errors.UIMessage)