[#ui-event-classes]
= UI Event Classes

:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR  CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
:page-partial:


UI events are broadcast on the xref:refguide:applib:index/services/eventbus/EventBusService.adoc[EventBusService] as the result of rendering a domain object.

They allow subscribers to change various presentation aspects of the rendered object.

Note that if the domain object defines its own layout preferences (for example, a xref:refguide:applib-methods:ui-hints.adoc#title[title()] supporting method) then these will take precedence.



.UI Event Classes
[cols="2m,2a,2a,2m", options="header"]
|===

|API
|Event class defined by xref:refguide:applib:index/annotation/DomainObjectLayout.adoc[@DomainObjectLayout]
|Published when
|Overridden by


|xref:refguide:applib:index/events/ui/TitleUiEvent.adoc[TitleUiEvent]
|xref:refguide:applib:index/annotation/DomainObjectLayout.adoc#titleUiEvent[titleUiEvent()]
|\... rendering the title for a domain object.
|xref:refguide:applib-methods:ui-hints.adoc#title[title()] +
xref:refguide:applib:index/annotation/Title.adoc[@Title]



|xref:refguide:applib:index/events/ui/IconUiEvent.adoc[IconUiEvent]
|xref:refguide:applib:index/annotation/DomainObjectLayout.adoc#iconUiEvent[iconUiEvent()]
|\... rendering an icon for a domain object.
|xref:refguide:applib-methods:ui-hints.adoc#iconName[iconName()]


|xref:refguide:applib:index/events/ui/CssClassUiEvent.adoc[CssClassUiEvent]
|xref:refguide:applib:index/annotation/DomainObjectLayout.adoc#cssClassUiEvent[cssClassUiEvent()]
|\... obtaining a CSS class hint for a domain object.
|xref:refguide:applib-methods:ui-hints.adoc#cssClass[cssClass()]

|xref:refguide:applib:index/events/ui/LayoutUiEvent.adoc[LayoutUiEvent]
|xref:refguide:applib:index/annotation/DomainObjectLayout.adoc#layoutUiEvent[layoutUiEvent()]
|\... obtain an alternative layout for a domain object.
|xref:refguide:applib-methods:ui-hints.adoc#layout[layout()]

|===




