Class Composite
- java.lang.Object
-
- com.vaadin.server.AbstractClientConnector
-
- com.vaadin.ui.AbstractComponent
-
- com.vaadin.ui.Composite
-
- All Implemented Interfaces:
ContextClickEvent.ContextClickNotifier,MethodEventSource,ClientConnector,Sizeable,Connector,Component,HasComponents,Serializable,Iterable<Component>
- Direct Known Subclasses:
Tree
public class Composite extends AbstractComponent implements HasComponents
Composite allows creating new UI components by composition of existing server-side components.A composite is created by extending the Composite class and setting the composition root component using
setCompositionRoot(Component).The composition root itself can contain more components. The advantage of wrapping it in a composite is that the details of the composition root, such as its public API, are hidden from the users of the composite.
A composite itself does not contribute to the DOM in any way (contrary to
CustomComponentwhich adds a<div>to the DOM.- Since:
- 8.1
- Author:
- Vaadin Ltd.
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
-
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
Component.ErrorEvent, Component.Event, Component.Focusable, Component.Listener
-
Nested classes/interfaces inherited from interface com.vaadin.ui.HasComponents
HasComponents.ComponentAttachDetachNotifier, HasComponents.ComponentAttachEvent, HasComponents.ComponentAttachListener, HasComponents.ComponentDetachEvent, HasComponents.ComponentDetachListener
-
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable
Sizeable.Unit
-
-
Field Summary
-
Fields inherited from class com.vaadin.ui.AbstractComponent
DESIGN_ATTR_PLAIN_TEXT
-
Fields inherited from interface com.vaadin.server.Sizeable
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
-
-
Constructor Summary
Constructors Constructor Description Composite()Constructs a new empty composite.Composite(AbstractComponent compositionRoot)Constructs a new composite containing the given component.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddStyleName(String style)Adds one or more style names to this component.voidbeforeClientResponse(boolean initial)Called before the shared state and RPC invocations are sent to the client.StringgetCaption()Gets the caption of the component.ErrorMessagegetComponentError()Gets the component's error message.protected ComponentgetCompositionRoot()Returns the composition root.StringgetDebugId()StringgetDescription()Gets the components description, used in tooltips and can be displayed directly in certain other components such as forms.ErrorMessagegetErrorMessage()Gets the error message for this component.floatgetHeight()Gets the height of the object.Sizeable.UnitgetHeightUnits()Gets the height property units.ResourcegetIcon()Gets the icon resource of the component.StringgetId()Gets currently set debug identifier.StringgetPrimaryStyleName()Gets the primary style name of the component.protected CompositeStategetState()Returns the shared state bean with information to be sent from the server to the client.protected CompositeStategetState(boolean markAsDirty)Returns the shared state for this connector.StringgetStyleName()Gets all user-defined CSS style names of a component.floatgetWidth()Gets the width of the object.Sizeable.UnitgetWidthUnits()Gets the width property units.booleanisCaptionAsHtml()Checks whether captions are rendered as HTMLbooleanisEnabled()Tests whether the component is enabled or not.Iterator<Component>iterator()Gets an iterator to the collection of contained components.voidremoveStyleName(String style)Removes one or more style names from component.voidsetCaption(String caption)Sets the caption of the component.voidsetCaptionAsHtml(boolean captionAsHtml)Sets whether the caption is rendered as HTML.voidsetComponentError(ErrorMessage componentError)Sets the component's error message.protected voidsetCompositionRoot(Component compositionRoot)Sets the component contained in the composite.voidsetDebugId(String id)voidsetDescription(String description)Sets the component's description.voidsetDescription(String description, ContentMode mode)Sets the component's description using given contentmode.voidsetEnabled(boolean enabled)Enables or disables the component.voidsetHeight(float height, Sizeable.Unit unit)Sets the height of the object.voidsetHeight(String height)Sets the height of the component using String presentation.voidsetHeightUndefined()Clears any defined height.voidsetIcon(Resource icon)Sets the component's icon.voidsetId(String id)Adds an unique id for component that is used in the client-side for testing purposes.voidsetPrimaryStyleName(String style)Changes the primary style name of the component.voidsetSizeFull()Sets the size to 100% x 100%.voidsetSizeUndefined()Clears any size settings.voidsetStyleName(String style)Sets one or more user-defined style names of the component, replacing any previous user-defined styles.voidsetStyleName(String style, boolean add)Adds or removes a style name.voidsetWidth(float width, Sizeable.Unit unit)Sets the width of the object.voidsetWidth(String width)Sets the width of the component using String presentation.voidsetWidthUndefined()Clears any defined width.-
Methods inherited from class com.vaadin.ui.AbstractComponent
addContextClickListener, addListener, addShortcutListener, attach, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCustomAttributes, getData, getLocale, getParent, isConnectorEnabled, isOrHasAncestor, isReadOnly, isRequiredIndicatorVisible, isResponsive, isVisible, readDesign, removeContextClickListener, removeListener, removeShortcutListener, setData, setHeightFull, setLocale, setParent, setReadOnly, setRequiredIndicatorVisible, setResponsive, setVisible, setWidthFull, writeDesign
-
Methods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstate
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
-
Methods inherited from interface com.vaadin.ui.Component
addListener, addStyleNames, attach, getLocale, getParent, getUI, isVisible, readDesign, removeListener, removeStyleNames, setParent, setVisible, writeDesign
-
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface com.vaadin.server.Sizeable
setHeightFull, setWidthFull
-
-
-
-
Constructor Detail
-
Composite
public Composite()
Constructs a new empty composite.Use
setCompositionRoot(Component)to define the contents of the composite.
-
Composite
public Composite(AbstractComponent compositionRoot)
Constructs a new composite containing the given component.- Parameters:
compositionRoot- the root of the composition component tree. It must not be null.
-
-
Method Detail
-
getCompositionRoot
protected Component getCompositionRoot()
Returns the composition root.- Returns:
- the Component Composition root.
-
setCompositionRoot
protected void setCompositionRoot(Component compositionRoot)
Sets the component contained in the composite.You must set the composition root to a non-null value before the component can be used. It cannot be changed.
- Parameters:
compositionRoot- the root of the composition component tree.
-
iterator
public Iterator<Component> iterator()
Description copied from interface:HasComponentsGets an iterator to the collection of contained components. Using this iterator it is possible to step through all components contained in this container.The iterator is typically unmodifiable, and calls to
Iterator.remove()throw an exception.- Specified by:
iteratorin interfaceHasComponents- Specified by:
iteratorin interfaceIterable<Component>- Returns:
- the component iterator.
-
getState
protected CompositeState getState()
Description copied from class:AbstractComponentReturns the shared state bean with information to be sent from the server to the client. Subclasses should override this method and set any relevant fields of the state returned by super.getState().- Overrides:
getStatein classAbstractComponent- Returns:
- updated component shared state
-
getState
protected CompositeState getState(boolean markAsDirty)
Description copied from class:AbstractClientConnectorReturns the shared state for this connector.- Overrides:
getStatein classAbstractComponent- Parameters:
markAsDirty- true if the connector should automatically be marked dirty, false otherwise- Returns:
- The shared state for this connector. Never null.
- See Also:
AbstractClientConnector.getState()
-
beforeClientResponse
public void beforeClientResponse(boolean initial)
Description copied from interface:ClientConnectorCalled before the shared state and RPC invocations are sent to the client. Gives the connector an opportunity to set computed/dynamic state values or to invoke last minute RPC methods depending on other component features.- Specified by:
beforeClientResponsein interfaceClientConnector- Overrides:
beforeClientResponsein classAbstractComponent- Parameters:
initial-trueif the client-side connector will be created and initialized after this method has been invoked.falseif there is already an initialized client-side connector.
-
getStyleName
public String getStyleName()
Description copied from interface:ComponentGets all user-defined CSS style names of a component. If the component has multiple style names defined, the return string is a space-separated list of style names. Built-in style names defined in Vaadin or GWT are not returned.The style names are returned only in the basic form in which they were added; each user-defined style name shows as two CSS style class names in the rendered HTML: one as it was given and one prefixed with the component-specific style name. Only the former is returned.
- Specified by:
getStyleNamein interfaceComponent- Overrides:
getStyleNamein classAbstractComponent- Returns:
- the style name or a space-separated list of user-defined style names of the component
- See Also:
Component.setStyleName(String),Component.addStyleName(String),Component.removeStyleName(String)
-
setStyleName
public void setStyleName(String style)
Description copied from interface:ComponentSets one or more user-defined style names of the component, replacing any previous user-defined styles. Multiple styles can be specified as a space-separated list of style names. The style names must be valid CSS class names and should not conflict with any built-in style names in Vaadin or GWT.Label label = new Label("This text has a lot of style"); label.setStyleName("myonestyle myotherstyle");Each style name will occur in two versions: one as specified and one that is prefixed with the style name of the component. For example, if you have a
Buttoncomponent and give it "mystyle" style, the component will have both "mystyle" and "v-button-mystyle" styles. You could then style the component either with:.myonestyle {background: blue;}or
.v-button-myonestyle {background: blue;}It is normally a good practice to use
addStyleName()rather than this setter, as different software abstraction layers can then add their own styles without accidentally removing those defined in other layers.- Specified by:
setStyleNamein interfaceComponent- Overrides:
setStyleNamein classAbstractComponent- Parameters:
style- the new style or styles of the component as a space-separated list- See Also:
Component.getStyleName(),Component.addStyleName(String),Component.removeStyleName(String)
-
setStyleName
public void setStyleName(String style, boolean add)
Description copied from interface:ComponentAdds or removes a style name. Multiple styles can be specified as a space-separated list of style names. If theaddparameter is true, the style name is added to the component. If theaddparameter is false, the style name is removed from the component.Functionally this is equivalent to using
Component.addStyleName(String)orComponent.removeStyleName(String)- Specified by:
setStyleNamein interfaceComponent- Parameters:
style- the style name to be added or removedadd-trueto add the given style,falseto remove it- See Also:
Component.addStyleName(String),Component.removeStyleName(String)
-
addStyleName
public void addStyleName(String style)
Description copied from interface:ComponentAdds one or more style names to this component. Multiple styles can be specified as a space-separated list of style names. The style name will be rendered as a HTML class name, which can be used in a CSS definition.Label label = new Label("This text has style"); label.addStyleName("mystyle");Each style name will occur in two versions: one as specified and one that is prefixed with the style name of the component. For example, if you have a
Buttoncomponent and give it "mystyle" style, the component will have both "mystyle" and "v-button-mystyle" styles. You could then style the component either with:.mystyle {font-style: italic;}or
.v-button-mystyle {font-style: italic;}- Specified by:
addStyleNamein interfaceComponent- Overrides:
addStyleNamein classAbstractComponent- Parameters:
style- the new style to be added to the component- See Also:
Component.getStyleName(),Component.setStyleName(String),Component.removeStyleName(String)
-
removeStyleName
public void removeStyleName(String style)
Description copied from interface:ComponentRemoves one or more style names from component. Multiple styles can be specified as a space-separated list of style names.The parameter must be a valid CSS style name. Only user-defined style names added with
addStyleName()orsetStyleName()can be removed; built-in style names defined in Vaadin or GWT can not be removed.- Specified by:
removeStyleNamein interfaceComponent- Overrides:
removeStyleNamein classAbstractComponent- Parameters:
style- the style name or style names to be removed- See Also:
Component.getStyleName(),Component.setStyleName(String),Component.addStyleName(String)
-
getPrimaryStyleName
public String getPrimaryStyleName()
Description copied from interface:ComponentGets the primary style name of the component. SeeComponent.setPrimaryStyleName(String)for a better description of the primary stylename.- Specified by:
getPrimaryStyleNamein interfaceComponent- Overrides:
getPrimaryStyleNamein classAbstractComponent- Returns:
- the primary style name
-
setPrimaryStyleName
public void setPrimaryStyleName(String style)
Description copied from interface:ComponentChanges the primary style name of the component.The primary style name identifies the component when applying the CSS theme to the Component. By changing the style name all CSS rules targeted for that style name will no longer apply, and might result in the component not working as intended.
To preserve the original style of the component when changing to a new primary style you should make your new primary style inherit the old primary style using the SASS @include directive. See more in the SASS tutorials.
- Specified by:
setPrimaryStyleNamein interfaceComponent- Overrides:
setPrimaryStyleNamein classAbstractComponent- Parameters:
style- The new primary style name
-
setEnabled
public void setEnabled(boolean enabled)
Description copied from interface:ComponentEnables or disables the component. The user can not interact with disabled components, which are shown with a style that indicates the status, usually shaded in light gray color. Components are enabled by default.Button enabled = new Button("Enabled"); enabled.setEnabled(true); // The default layout.addComponent(enabled); Button disabled = new Button("Disabled"); disabled.setEnabled(false); layout.addComponent(disabled);- Specified by:
setEnabledin interfaceComponent- Overrides:
setEnabledin classAbstractComponent- Parameters:
enabled- a boolean value specifying if the component should be enabled or not
-
isEnabled
public boolean isEnabled()
Description copied from interface:ComponentTests whether the component is enabled or not. A user can not interact with disabled components. Disabled components are rendered in a style that indicates the status, usually in gray color. Children of a disabled component are also disabled. Components are enabled by default.As a security feature, all updates for disabled components are blocked on the server-side.
Note that this method only returns the status of the component and does not take parents into account. Even though this method returns true the component can be disabled to the user if a parent is disabled.
- Specified by:
isEnabledin interfaceComponent- Overrides:
isEnabledin classAbstractComponent- Returns:
trueif the component and its parent are enabled,falseotherwise.- See Also:
VariableOwner.isEnabled()
-
getWidth
public float getWidth()
Description copied from interface:SizeableGets the width of the object. Negative number implies unspecified size (terminal is free to set the size).- Specified by:
getWidthin interfaceSizeable- Overrides:
getWidthin classAbstractComponent- Returns:
- width of the object in units specified by widthUnits property.
-
getHeight
public float getHeight()
Description copied from interface:SizeableGets the height of the object. Negative number implies unspecified size (terminal is free to set the size).- Specified by:
getHeightin interfaceSizeable- Overrides:
getHeightin classAbstractComponent- Returns:
- height of the object in units specified by heightUnits property.
-
getWidthUnits
public Sizeable.Unit getWidthUnits()
Description copied from interface:SizeableGets the width property units.- Specified by:
getWidthUnitsin interfaceSizeable- Overrides:
getWidthUnitsin classAbstractComponent- Returns:
- units used in width property.
-
getHeightUnits
public Sizeable.Unit getHeightUnits()
Description copied from interface:SizeableGets the height property units.- Specified by:
getHeightUnitsin interfaceSizeable- Overrides:
getHeightUnitsin classAbstractComponent- Returns:
- units used in height property.
-
setHeight
public void setHeight(String height)
Description copied from interface:SizeableSets the height of the component using String presentation. String presentation is similar to what is used in Cascading Style Sheets. Size can be length or percentage of available size. The empty string ("") or null will unset the height and set the units to pixels. See CSS specification for more details.- Specified by:
setHeightin interfaceSizeable- Overrides:
setHeightin classAbstractComponent- Parameters:
height- in CSS style string representation
-
setWidth
public void setWidth(float width, Sizeable.Unit unit)Description copied from interface:SizeableSets the width of the object. Negative number implies unspecified size (terminal is free to set the size).- Specified by:
setWidthin interfaceSizeable- Overrides:
setWidthin classAbstractComponent- Parameters:
width- the width of the object.unit- the unit used for the width.
-
setHeight
public void setHeight(float height, Sizeable.Unit unit)Description copied from interface:SizeableSets the height of the object. Negative number implies unspecified size (terminal is free to set the size).- Specified by:
setHeightin interfaceSizeable- Overrides:
setHeightin classAbstractComponent- Parameters:
height- the height of the object.unit- the unit used for the width.
-
setWidth
public void setWidth(String width)
Description copied from interface:SizeableSets the width of the component using String presentation. String presentation is similar to what is used in Cascading Style Sheets. Size can be length or percentage of available size. The empty string ("") or null will unset the width and set the units to pixels. See CSS specification for more details.- Specified by:
setWidthin interfaceSizeable- Overrides:
setWidthin classAbstractComponent- Parameters:
width- in CSS style string representation, null or empty string to reset
-
setSizeFull
public void setSizeFull()
Description copied from interface:SizeableSets the size to 100% x 100%.- Specified by:
setSizeFullin interfaceSizeable- Overrides:
setSizeFullin classAbstractComponent
-
setSizeUndefined
public void setSizeUndefined()
Description copied from interface:SizeableClears any size settings.- Specified by:
setSizeUndefinedin interfaceSizeable- Overrides:
setSizeUndefinedin classAbstractComponent
-
setWidthUndefined
public void setWidthUndefined()
Description copied from interface:SizeableClears any defined width.- Specified by:
setWidthUndefinedin interfaceSizeable- Overrides:
setWidthUndefinedin classAbstractComponent
-
setHeightUndefined
public void setHeightUndefined()
Description copied from interface:SizeableClears any defined height.- Specified by:
setHeightUndefinedin interfaceSizeable- Overrides:
setHeightUndefinedin classAbstractComponent
-
setId
public void setId(String id)
Description copied from interface:ComponentAdds an unique id for component that is used in the client-side for testing purposes. Keeping identifiers unique is the responsibility of the programmer.- Specified by:
setIdin interfaceComponent- Overrides:
setIdin classAbstractComponent- Parameters:
id- An alphanumeric id
-
getId
public String getId()
Description copied from interface:ComponentGets currently set debug identifier.- Specified by:
getIdin interfaceComponent- Overrides:
getIdin classAbstractComponent- Returns:
- current id, null if not set
-
setDebugId
public void setDebugId(String id)
- Overrides:
setDebugIdin classAbstractComponent
-
getDebugId
public String getDebugId()
- Overrides:
getDebugIdin classAbstractComponent
-
getCaption
public String getCaption()
Description copied from interface:ComponentGets the caption of the component.See
Component.setCaption(String)for a detailed description of the caption.- Specified by:
getCaptionin interfaceComponent- Overrides:
getCaptionin classAbstractComponent- Returns:
- the caption of the component or
nullif the caption is not set. - See Also:
Component.setCaption(String)
-
setCaption
public void setCaption(String caption)
Description copied from interface:ComponentSets the caption of the component.A caption is an explanatory textual label accompanying a user interface component, usually shown above, left of, or inside the component. Icon (see
setIcon()is closely related to caption and is usually displayed horizontally before or after it, depending on the component and the containing layout.The caption can usually also be given as the first parameter to a constructor, though some components do not support it.
RichTextArea area = new RichTextArea(); area.setCaption("You can edit stuff here"); area.setValue("<h1>Helpful Heading</h1>" + "<p>All this is for you to edit.</p>");The contents of a caption are automatically quoted, so no raw HTML can be rendered in a caption. The validity of the used character encoding, usually UTF-8, is not checked.
The caption of a component is, by default, managed and displayed by the layout component or component container in which the component is placed. For example, the
VerticalLayoutcomponent shows the captions left-aligned above the contained components, while theFormLayoutcomponent shows the captions on the left side of the vertically laid components, with the captions and their associated components left-aligned in their own columns. TheCustomComponentdoes not manage the caption of its composition root, so if the root component has a caption, it will not be rendered. Some components, such asButtonandPanel, manage the caption themselves and display it inside the component.- Specified by:
setCaptionin interfaceComponent- Overrides:
setCaptionin classAbstractComponent- Parameters:
caption- the new caption for the component. If the caption isnull, no caption is shown and it does not normally take any space
-
setCaptionAsHtml
public void setCaptionAsHtml(boolean captionAsHtml)
Description copied from class:AbstractComponentSets whether the caption is rendered as HTML.If set to true, the captions are rendered in the browser as HTML and the developer is responsible for ensuring no harmful HTML is used. If set to false, the caption is rendered in the browser as plain text.
The default is false, i.e. to render that caption as plain text.
- Overrides:
setCaptionAsHtmlin classAbstractComponent- Parameters:
captionAsHtml- true if the captions are rendered as HTML, false if rendered as plain text
-
isCaptionAsHtml
public boolean isCaptionAsHtml()
Description copied from class:AbstractComponentChecks whether captions are rendered as HTMLThe default is false, i.e. to render that caption as plain text.
- Overrides:
isCaptionAsHtmlin classAbstractComponent- Returns:
- true if the captions are rendered as HTML, false if rendered as plain text
-
getIcon
public Resource getIcon()
Description copied from interface:ComponentGets the icon resource of the component.See
Component.setIcon(Resource)for a detailed description of the icon.- Specified by:
getIconin interfaceComponent- Overrides:
getIconin classAbstractComponent- Returns:
- the icon resource of the component or
nullif the component has no icon - See Also:
Component.setIcon(Resource)
-
setIcon
public void setIcon(Resource icon)
Description copied from class:AbstractComponentSets the component's icon.- Specified by:
setIconin interfaceComponent- Overrides:
setIconin classAbstractComponent- Parameters:
icon- the icon to be shown with the component's caption.- See Also:
Component.getIcon(),Component.setCaption(String)
-
getDescription
public String getDescription()
Description copied from interface:ComponentGets the components description, used in tooltips and can be displayed directly in certain other components such as forms. The description can be used to briefly describe the state of the component to the user. The description string may contain certain XML tags:
Tag Description Example <b> bold bold text <i> italic italic text <u> underlined underlined text <br> linebreak N/A <ul>
<li>item1
<li>item1
</ul>item list - item1
- item2
These tags may be nested.
- Specified by:
getDescriptionin interfaceComponent- Overrides:
getDescriptionin classAbstractComponent- Returns:
- component's description
String
-
setDescription
public void setDescription(String description)
Description copied from class:AbstractComponentSets the component's description. SeeAbstractComponent.getDescription()for more information on what the description is.- Overrides:
setDescriptionin classAbstractComponent- Parameters:
description- the new description string for the component.- See Also:
AbstractComponent.setDescription(String, ContentMode)
-
setDescription
public void setDescription(String description, ContentMode mode)
Description copied from class:AbstractComponentSets the component's description using given contentmode. SeeAbstractComponent.getDescription()for more information on what the description is.If the content
modeis ContentMode.HTML the description is displayed as HTML in tooltips or directly in certain components so care should be taken to avoid creating the possibility for HTML injection and possibly XSS vulnerabilities.- Overrides:
setDescriptionin classAbstractComponent- Parameters:
description- the new description string for the component.mode- the content mode for the description
-
getErrorMessage
public ErrorMessage getErrorMessage()
Description copied from class:AbstractComponentGets the error message for this component.- Overrides:
getErrorMessagein classAbstractComponent- Returns:
- ErrorMessage containing the description of the error state of the component or null, if the component contains no errors. Extending classes should override this method if they support other error message types such as validation errors or buffering errors. The returned error message contains information about all the errors.
-
getComponentError
public ErrorMessage getComponentError()
Description copied from class:AbstractComponentGets the component's error message.- Overrides:
getComponentErrorin classAbstractComponent- Returns:
- the component's error message.
-
setComponentError
public void setComponentError(ErrorMessage componentError)
Description copied from class:AbstractComponentSets the component's error message. The message may contain certain XML tags, for more information seeErrorMessage.- Overrides:
setComponentErrorin classAbstractComponent- Parameters:
componentError- the newErrorMessageof the component.
-
-