== Events


: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.


Note:

* In order for the lifecycle events to fire (`persisting`, `loaded` etc) the class must be annotated using `@DomainObject` (even if no attributes on that annotation are set).
* Similarly, for UI events to fire (`title`, `icon` etc) the class must be annotated using `@DomainObjectLayout` (even if no attributes on that annotation are set).
* Similarly, for domain events to fire (`title`, `icon` etc) the action/property/collection must be annotated using the appropriate `@XxxLayout` (even if no attributes on that annotation are set).


== Non-editable Objects

The `causeway.applib.annotation.domain-object.editing` configuration property determines whether properties can be edited or not.
By default it is _disabled_:

[source,ini]
----
causeway.applib.annotation.domain-object.editing=false
----
We recommend leaving this at its default, and only selectively enabling property editing where there are likely to be no business rules, such as "notes" or "comments" properties.
Doing so will help drive out the underlying business operations (processes and procedures) that require objects to change; these can then be captured as actions.
