You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2015/06/05 13:56:18 UTC

[10/51] [abbrv] isis git commit: ISIS-1133: fixing references, breaking out annotation pages for each attribute (for more consistent cross-referencing).

http://git-wip-us.apache.org/repos/asf/isis/blob/2af3ad9a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_domainEvent.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_domainEvent.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_domainEvent.adoc
new file mode 100644
index 0000000..b33da5a
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_domainEvent.adoc
@@ -0,0 +1,166 @@
+[[_ug_reference-annotations_manpage-Action_domainEvent]]
+= domainEvent()
+: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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+Every interaction with a domain object action causes multiple events to be fired, in the following phases:
+
+* hide phase: to check that the action is visible (has not been hidden)
+* disable phase: to check that the action is usable (has not been disabled)
+* validate phase: to check that the action's arguments are valid
+* pre-execute phase: before the invocation of the action
+* post-execute: after the invocation of the action
+
+
+Subscribers subscribe through the xref:_ug_reference-services-api_manpage-EventBusService[`EventBusService`] using either link:https://github.com/google/guava[Guava] or link:http://www.axonframework.org/[Axon Framework] annotations and can influence each of these phases.
+
+By default the event raised is `ActionDomainEvent.Default`. For example:
+
+[source,java]
+----
+public class ToDoItem {
+    ...
+    @Action()
+    public ToDoItem completed() { ... }
+}
+----
+
+
+This attribute allows a custom subclass to be declared.
+
+[NOTE]
+====
+This attribute replaces the deprecated `@ActionInteraction` annotation.
+====
+
+For example:
+
+[source,java]
+----
+public class ToDoItem {
+    public static class CompletedEvent extends AbstractActionDomainEvent {
+        private static final long serialVersionUID = 1L;
+        public CompletedEvent(
+                final ToDoItem source,
+                final Identifier identifier,
+                final Object... arguments) {
+            super("completed", source, identifier, arguments);
+        }
+    }
+    @Action(domainEvent=CompletedEvent.class)
+    public ToDoItem completed() { ... }
+}
+----
+
+The benefit is that subscribers can be more targetted as to the events that they subscribe to.
+
+
+
+
+== Subscribers
+
+Subscribers (which must be domain services) subscribe using either the Guava API or (if the xref:_ug_reference-services-api_manpage-EventBusService[`EventBusService`] has been appropriately configured) using the AxonFramework API.
+
+Subscribers can be either coarse-grained (if they subscribe to the top-level event type):
+
+[source,java]
+----
+@DomainService
+public class SomeSubscriber {
+    @Programmatic
+    @com.google.common.eventbus.Subscribe
+    public void on(ActionInteractionEvent ev) {
+        ...
+    }
+}
+----
+
+or can be fine-grained by subscribing to specific event subtypes:
+
+[source,java]
+----
+@DomainService
+public class SomeSubscriber {
+    @Programmatic
+    @com.google.common.eventbus.Subscribe
+    public void on(ToDoItem.CompletedEvent ev) {
+        ...
+    }
+}
+----
+
+[NOTE]
+====
+If the AxonFramework is being used, replace `@com.google.common.eventbus.Subscribe` for `@org.axonframework.eventhandling.annotation.EventHandler`.
+====
+
+
+The subscriber's method is called (up to) 5 times:
+
+* whether to veto visibility (hide)
+* whether to veto usability (disable)
+* whether to veto execution (validate)
+* steps to perform prior to the action being invoked.
+* steps to perform after the action has been invoked.
+
+The subscriber can distinguish these by calling `ev.getEventPhase()`. Thus the general form is:
+
+[source,java]
+----
+@Programmatic
+@com.google.common.eventbus.Subscribe
+public void on(ActionInteractionEvent ev) {
+    switch(ev.getPhase()) {
+        case HIDE:
+            ...
+            break;
+        case DISABLE:
+            ...
+            break;
+        case VALIDATE:
+            ...
+            break;
+        case EXECUTING:
+            ...
+            break;
+        case EXECUTED:
+            ...
+            break;
+    }
+}
+----
+
+Vetoing is performed by calling the appropriate method on the event:
+
+* To hide: +
++
+`ev.hide()` or `ev.veto("")`
+
+* To disable: +
++
+`ev.disable("...")` or `ev.veto("...")`
+
+* To invalidate: +
+
+`ev.invalidate("...")` or `ev.veto("...")`
+
+It is also possible to abort the transaction during the executing or executed
+phases by throwing an exception. If the exception is a subtype of `RecoverableException`
+then the exception will be rendered as a user-friendly warning (eg Growl/toast)
+rather than an error.
+
+
+
+
+== Raising events programmatically.
+
+Normally events are only raised for interactions through the UI. However, events can be raised programmatically by
+wrapping the target object using the xref:_ug_reference-services-api_manpage-WrapperFactory[`WrapperFactory`] domain service.
+
+
+
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/2af3ad9a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_hidden.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_hidden.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_hidden.adoc
new file mode 100644
index 0000000..c5d6fea
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_hidden.adoc
@@ -0,0 +1,38 @@
+[[_ug_reference-annotations_manpage-Action_hidden]]
+= `hidden()`
+: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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+
+Actions can be hidden at the domain-level, indicating that they are not visible to the end-user.
+
+For example:
+
+[source,java]
+----
+public class Customer {
+    @Action(hidden=EVERYWHERE)
+    public void updateStatus() { ... }
+    ...
+}
+----
+
+The only value that currently makes sense is `EVERYWHERE` (or its synonym `ANYWHERE`).
+
+
+
+[TIP]
+====
+It is also possible to use `@ActionLayout` or link:../../components/viewers/wicket/dynamic-layouts.html[dynamic layouts] such that the action can be hidden at the view layer. Both options are provided with a view that in the future the view-layer semantics may be under the control of (expert) users, whereas domain-layer semantics should never be overridden or modified by the user.
+====
+
+[NOTE]
+====
+For actions of domain services the visibility is dependent upon its xref:_ug_reference-annotations_manpage-DomainService_nature[`@DomainService#nature()`] and also on whether it is contributed (as per `ActionLayout#contributed()`).
+====
+
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/2af3ad9a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_invokeOn.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_invokeOn.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_invokeOn.adoc
new file mode 100644
index 0000000..fbfa116
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_invokeOn.adoc
@@ -0,0 +1,65 @@
+[[_ug_reference-annotations_manpage-Action_invokeOn]]
+= `invokeOn()`
+: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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+
+The `invokeOn` attribute indicates whether the an action can be invoked on a single object (the default) and/or on many objects in a collection.
+
+[NOTE]
+====
+This attribute replaces the deprecated `@Bulk` annotation.
+====
+
+For example:
+
+[source,java]
+----
+public class ToDoItem {
+    ...
+    @Action(invokeOn=InvokeOn.OBJECT_AND_COLLECTION)
+    public void markAsCompleted() {
+        setCompleted(true);
+    }
+}
+----
+
+
+Actions to be invoked on collection (currently) have a number of constraints.  It:
+
+* must take no arguments
+* cannot be hidden (any annotations or supporting methods to that effect will be ignored)
+* cannot be disabled (any annotations or supporting methods to that effect will be ignored).
+
+The example given above is probably ok, because `setCompleted()` is most likely idempotent. However, if the action also called some other method, then we should add a guard.
+
+For example, rather than:
+
+[source,java]
+----
+    @Action(invokeOn=InvokeOn.OBJECT_AND_COLLECTION)
+    public void markAsCompleted() {
+        setCompleted(true);
+        todoTotalizer.incrementNumberCompleted();
+    }
+----
+
+the action should instead be written:
+
+[source,java]
+----
+    @Action(invokeOn=InvokeOn.OBJECT_AND_COLLECTION)
+    public void markAsCompleted() {
+        if(isCompleted()) {
+            return;
+        }
+        setCompleted(true);
+        todoTotalizer.incrementNumberCompleted();
+    }
+----
+
+
+Note also that this attribute has no meaning if annotated on an action of a domain service.

http://git-wip-us.apache.org/repos/asf/isis/blob/2af3ad9a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_publishing.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_publishing.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_publishing.adoc
new file mode 100644
index 0000000..5b1698c
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_publishing.adoc
@@ -0,0 +1,57 @@
+[[_ug_reference-annotations_manpage-Action_publishing]]
+= Publishing
+: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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+
+Publishing (to the registered implementation of a xref:_ug_reference-services-spi_manpage-PublishingService[`PublishingService`]) is managed by the `publishing()` and `publishingPayloadFactory()` attributes.
+
+[NOTE]
+====
+The following attributes replace the deprecated `@PublishedAction` annotation.
+====
+
+
+
+== `publishing()`
+
+This attribute indicates whether the action invocation should be published to the xref:_ug_reference-services-spi_manpage-PublishingService[`PublishingService`].
+
+The default is `AS_CONFIGURED`, meaning that the configuration property `isis.services.publish.actions` is used to determine the whether the action is published:
+
+* `all` - all actions are published
+* `ignoreSafe` (or `ignoreQueryOnly`) - actions with safe (read-only) semantics are ignored, but actions which may modify data are not ignored
+* `none` - no actions are published
+
+If there is no setting in `isis.properties` then publishing is automatically enabled.
+
+This default can be overridden on an action-by-action basis; if `publishing()` is set to `ENABLED` then the action is published irrespective of the configured value; if set to `DISABLED` then the action is NOT published irrespective of the configured value.
+
+For example:
+
+[source,java]
+----
+public class Order {
+    @Action(publishing=Publishing.ENABLED)
+    public Invoice generateInvoice(...) { ... }
+}
+----
+
+will be published irrespective of the configured value.
+
+
+
+
+== `publishingPayloadFactory()`
+
+The `publishingPayloadFactory()` specifies the class to use to create the (payload of the) event to be published by the publishing factory.
+Rather than simply broadcast that the action was invoked, the payload factory allows a "fatter" payload to be isntantiated
+that can eagerly push commonly-required information to all subscribers. For at least some subscribers this should avoid
+the necessity to query back for additional information.
+
+
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/2af3ad9a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_restrictTo.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_restrictTo.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_restrictTo.adoc
new file mode 100644
index 0000000..0c96800
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_restrictTo.adoc
@@ -0,0 +1,34 @@
+[[_ug_reference-annotations_manpage-Action_restrictTo]]
+= `restrictTo()`
+: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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+The `restrictTo` attribute specifies whether the action is restricted to prototyping, or is generally available.
+
+[NOTE]
+====
+This attribute replaces the deprecated `@Exploration` and `@Prototype` annotations.
+====
+
+By default there are no restrictions, with the action being available in all environments.
+
+For example:
+
+[source,java]
+----
+public class Customer {
+    public Order placeNewOrder() { ... }
+    public List<Order> listRecentOrders() { ... }
+    @Action(restrictTo=RestrictTo.PROTOTYPING)
+    public List<Order> listAllOrders() { ... }
+    ...
+}
+----
+
+In this case listing all orders probably doesn't make sense for production (there could be thousands or millions), but would be fine in a test or demo system where there are only a handful.
+
+
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/2af3ad9a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_semantics.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_semantics.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_semantics.adoc
new file mode 100644
index 0000000..d9a9d7f
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_semantics.adoc
@@ -0,0 +1,38 @@
+[[_ug_reference-annotations_manpage-Action_semantics]]
+= `semantics()`
+: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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+The `semantics()` annotation describes whether the invocation is safe (as no side-effects), is idempotent (may have side-effects but always has the same post-conditions), or is neither safe nor idempotent. If the annotation is missing then the framework assumes non-idempotent.
+
+[NOTE]
+====
+This attribute replaces the deprecated `@QueryOnly` and `Idempotent` annotations and also the `@ActionSemantics` annotation.
+====
+
+For example:
+
+[source,java]
+----
+public class Customer {
+    @Action(semantics=SemanticsOf.SAFE)
+    public CreditRating checkCredit() { ... }
+
+    @Action(semantics=SemanticsOf.IDEMPOTENT)
+    public void changeOfAddress(Address address) { ... }
+
+    @Action(semantics=SemanticsOf.NON_IDEMPOTENT)
+    public Order placeNewOrder() { ... }
+    ...
+}
+----
+
+[TIP]
+====
+The annotation was introduced for the Restful Objects viewer in order that action invocations could be made available using either HTTP GET, PUT or POST (respectively). It is now also used in core runtime's in-built concurrency checking; the invocation of a safe action does not perform a concurrency check, whereas non-safe actions do perform a concurrency check.
+====
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/2af3ad9a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_typeOf.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_typeOf.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_typeOf.adoc
new file mode 100644
index 0000000..11ec860
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Action_typeOf.adoc
@@ -0,0 +1,29 @@
+[[_ug_reference-annotations_manpage-Action_typeOf]]
+= `typeOf()`
+: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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+Specifies the type-of the elements returned by the action (returning a collection), when for whatever reason the type cannot be inferred from the generic type, or to provide a hint about the actual run-time (as opposed to compile-time) type.
+
+[NOTE]
+====
+This attribute replaces the deprecated `@TypeOf` annotation.
+====
+
+For example:
+
+[source,java]
+----
+public void AccountService {
+    @Action(typeOf=Customer.class)
+    public List errantAccounts() {
+        return CustomerRepo.allNewCustomers();
+    }
+    ...
+}
+----
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/2af3ad9a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Collection.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Collection.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Collection.adoc
index 4a7927b..60add47 100644
--- a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Collection.adoc
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Collection.adoc
@@ -18,27 +18,27 @@ The table below summarizes the annotation's attributes.
 | Description
 
 
-|xref:__a_id_reference_annotations_manpage_collection_a_code_domainevent_code[`domainEvent()`]
+|xref:_ug_reference-annotations_manpage-Collection_domainEvent[`domainEvent()`]
 |
 |
 
 
-|xref:__a_id_reference_annotations_manpage_collection_a_code_editing_code[`editing()`]
+|xref:_ug_reference-annotations_manpage-Collection_editing[`editing()`]
 |
 |
 
 
-|xref:__a_id_reference_annotations_manpage_collection_a_code_hidden_code[`hidden()`]
+|xref:_ug_reference-annotations_manpage-Collection_hidden[`hidden()`]
 |
 |
 
 
-|xref:__a_id_reference_annotations_manpage_collection_a_code_notpersisted_code[`notPersisted()`]
+|xref:_ug_reference-annotations_manpage-Collection_notPersisted[`notPersisted()`]
 |
 |
 
 
-|xref:__a_id_reference_annotations_manpage_collection_a_code_typeof_code[`typeOf()`]
+|xref:_ug_reference-annotations_manpage-Collection_typeOf[`typeOf()`]
 |
 |
 
@@ -48,480 +48,12 @@ The table below summarizes the annotation's attributes.
 
 
 
-== anchor:reference-annotations_manpage-Collection[]`domainEvent()`
+include::_ug_reference-annotations_manpage-Collection_domainEvent.adoc[leveloffset=+1]
+include::_ug_reference-annotations_manpage-Collection_editing.adoc[leveloffset=+1]
+include::_ug_reference-annotations_manpage-Collection_hidden.adoc[leveloffset=+1]
+include::_ug_reference-annotations_manpage-Collection_notPersisted.adoc[leveloffset=+1]
+include::_ug_reference-annotations_manpage-Collection_typeOf.adoc[leveloffset=+1]
 
-IMPORTANT: WIP ... this section
 
-[WARNING]
-====
-The Wicket viewer does NOT support collection modification; instead write a pair of actions to add to/remove from the collection.
 
-However, it _is_ possible to fire collection interaction events using the wrapper factory; see below for more details.
-====
-
-
-The `@CollectionInteraction` annotation applies to domain entity collections, allowing subscribers to optionally veto, validate or otherwise perform tasks before or after the collection has been added to/removed from.
-
-Subscribers subscribe through the xref:__a_id_reference_services_api_manpage_a_code_eventbusservice_code[`EventBusService`] using Guava annotations.
-
-By default the event raised is `CollectionInteractionEvent.Default`. For example:
-
-[source,java]
-----
-public class ToDoItem {
-    ...
-    @CollectionInteraction
-    public SortedSet<ToDoItem> getDependencies() { ... }
-}
-----
-
-Optionally a subclass can be declared:
-
-[source,java]
-----
-public class ToDoItem {
-
-    public static class DependenciesChangedEvent extends CollectionInteractionEvent<ToDoItem, ToDoItem> {
-        private static final long serialVersionUID = 1L;
-        public DependenciesChangedEvent(ToDoItem source, Identifier identifier, Of of, ToDoItem value) {
-            super(source, identifier, of, value);
-        }
-    }
-
-}
-----
-
-The `of` field indicates if the collection is being accessed, added to or removed from.
-
-
-=== Subscribers
-
-Subscribers (which must be domain services) subscribe using the Guava API.
-Subscribers can be either coarse-grained (if they subscribe to the top-level event type):
-
-[source,java]
-----
-@DomainService
-public class SomeSubscriber {
-
-    @Programmatic
-    @com.google.common.eventbus.Subscribe
-    public void on(CollectionInteractionEvent ev) {
-
-        ...
-    }
-
-}
-----
-
-or can be fine-grained by subscribing to specific event subtypes:
-
-[source,java]
-----
-@DomainService
-public class SomeSubscriber {
-
-    @Programmatic
-    @com.google.common.eventbus.Subscribe
-    public void on(ToDoItem.DependenciesChangedEvent ev) {
-
-        ...
-    }
-
-}
-----
-
-The subscriber's method is called (up to) 5 times:
-
-* whether to veto visibility (hide)
-* whether to veto usability (disable)
-* whether to veto execution (validate)
-* steps to perform prior to the property being modified
-* steps to perform after the property has been modified.
-
-The subscriber can distinguish these by calling `ev.getPhase()`. Thus the general form is:
-
-[source,java]
-----
-    @Programmatic
-    @com.google.common.eventbus.Subscribe
-    public void on(CollectionInteractionEvent ev) {
-
-    switch(ev.getPhase()) {
-        case HIDE:
-            ...
-            break;
-        case DISABLE:
-            ...
-            break;
-        case VALIDATE:
-            ...
-            break;
-        case EXECUTING:
-            ...
-            break;
-        case EXECUTED:
-            ...
-            break;
-    }
-}
-----
-
-Vetoing is performed by calling the appropriate method on the event:
-
-*
-
-To hide:
-
-ev.hide()
-
-*
-
-To disable:
-
-ev.disable("…");
-
-*
-
-To invalidate:
-
-ev.invalidate("…");
-
-It is also possible to abort the transaction during the executing or executed
-phases by throwing an exception. If the exception is a subtype of `RecoverableException`
-then the exception will be rendered as a user-friendly warning (eg Growl/toast)
-rather than an error.
-
-
-=== Raising events programmatically.
-
-Normally events are only raised for interactions through the UI. However, events can be raised programmatically by
-wrapping the target object using the link:../services/wrapper-factory.html[Wrapper Factory] service.
-
-
-[NOTE]
-====
-domain events can also be raised for actions and properties.
-====
-
-
-
-
-
-
-
-
-== anchor:reference-annotations_manpage-Collection[]`editing()`
-
-IMPORTANT: WIP ... this section
-
-[NOTE]
-====
-Fully supported by: Wicket viewer; other viewers do not yet support the `where` attribute.
-====
-
-The `@Disabled` annotation means that the member cannot be used in any instance of the class. When applied to the property it means that the user may not modify the value of that property (though it may still be modified programmatically). When applied to an action method, it means that the user cannot invoke that method.
-
-For example:
-
-[source,java]
-----
-public class Customer {
-    @Disabled
-    public void assessCreditWorthiness() { ... }
-
-    @Disabled
-    public int getInitialCreditRating(){ ... }
-    public void setInitialCreditRating(int initialCreditRating) { ... }
-}
-----
-
-Note that if an action is marked as `@Disabled`, it will be shown on the
-user interface but cannot ever be invoked. The only possible reason we
-can think to do this is during prototyping, to indicate an action that
-is still to be developed. If a method is intended for programmatic use,
-but not intended ever to be invoked directly by a user, then it should
-be marked as `@Hidden` instead.
-
-This annotation can also take two parameter indicating where (in the UI)
-it is to be disabled, and when (in the object's lifecycle) it is to be
-disabled. For example:
-
-[source,java]
-----
-public class Customer {
-    (when=When.UNTIL_PERSISTED)
-    public void assessCreditWorthiness() { ... }
-}
-----
-
-would disable the action until the object has been saved. And:
-
-[source,java]
-----
-public class Customer {
-    (where=Where.PARENTED_TABLES)
-    public void getFirstName() { ... }
-}
-----
-
-would disable the property in parented tables but not in regular object
-forms (though note: this would only be used by viewers that provide
-in-table editing capability).
-
-The acceptable values for the `where` parameter are:
-
-* `Where.ANYWHERE` +
-+
-The member should be disabled everywhere.
-
-* `Where.OBJECT_FORMS` +
-+
-The member should be disabled when displayed within an object form.
-For most viewers, this applies to property and collection members,
-not actions.
-
-* `Where.PARENTED_TABLES` +
-+
-The member should be disabled when displayed as a column of a table
-within a parent object's collection. For most (all?) viewers, this
-will have meaning only if applied to a property member.
-
-* `Where.STANDALONE_TABLES` +
-+
-The member should be disabled when displayed as a column of a table
-showing a standalone list of objects, for example as returned by a
-repository query. For most (all?) viewers, this will have meaning
-only if applied to a property member.
-
-* `Where.ALL_TABLES` +
-+
-The member should be disabled when displayed as a column of a table,
-either an object's * collection or a standalone list. This combines
-`PARENTED_TABLES` and `STANDALONE_TABLES`
-
-* `Where.NOWHERE` +
-+
-Has no meaning for the `@Disabled` annotation (though is used by the
-`@Hidden` annotation which also uses the `Where` enum<!--, see ?-->).
-
-The acceptable values for the `when` parameter are:
-
-* `When.ALWAYS` +
-+
-The member should be disabled at all times.
-
-* `When.NEVER` +
-+
-The member should never be disabled (unless disabled through some
-other mechanism, for example an imperative disableXxx() supporting
-method)..
-
-* `When.ONCE_PERSISTED` +
-+
-The member should be enabled for transient objects, but disabled for
-persisted objects.
-
-* `When.UNTIL_PERSISTED` +
-+
-The member should be disabled for transient objects, but enabled for
-persisted objects.
-
-By default the annotated property or action is always disabled (ie
-defaults to `Where.ANYWHERE`, `When.ALWAYS`).
-
-
-
-
-
-
-
-
-
-== anchor:reference-annotations_manpage-Collection[]`hidden()`
-
-IMPORTANT: WIP ... this section
-
-The `@Hidden` annotation indicates that the member (property, collection or action) to which it is applied should never be visible to the user. It can also be applied to service types (it has no effect if applied to entities or values).
-
-For example:
-
-[source,java]
-----
-public class Customer {
-    @Hidden
-    public int getInternalId() { ... }
-
-    @Hidden
-    public void updateStatus() { ... }
-    ...
-}
-----
-
-Or, applied to a service:
-
-[source,java]
-----
-@Hidden
-public class EmailService {
-    public void sendEmail(...) { ... }
-    ...
-}
-----
-
-This annotation can also take a parameters indicating where and when it
-is to be hidden. For example:
-
-[source,java]
-----
-public class Customer {
-    @Hidden(when=When.ONCE_PERSISTED)
-    public int getInternalId() { ... }
-    ...
-}
-----
-
-would show the `Id` until the object has been saved, and then would hide
-it. And:
-
-[source,java]
-----
-public class Customer {
-    @Hidden(where=Where.ALL_TABLES)
-    public int getDateOfBirth() { ... }
-    ...
-}
-----
-
-would suppress the `dateOfBirth` property of a Customer from all tables.
-
-The acceptable values for the `where` parameter are:
-
-* `Where.ANYWHERE` +
-+
-The member should be hidden everywhere.
-
-* `Where.OBJECT_FORMS` +
-+
-The member should be hidden when displayed within an object form.
-For most viewers, this applies to property and collection members,
-not actions.
-
-* `Where.PARENTED_TABLES` +
-+
-The member should be hidden when displayed as a column of a table
-within a parent object's collection. For most (all?) viewers, this
-will have meaning only if applied to a property member.
-
-* `Where.STANDALONE_TABLES` +
-+
-The member should be hidden when displayed as a column of a table
-showing a standalone list of objects, for example as returned by a
-repository query. For most (all?) viewers, this will have meaning
-only if applied to a property member.
-
-* `Where.ALL_TABLES` +
-+
-The member should be /hidden when displayed as a column of a table,
-either an object's * collection or a standalone list. This combines
-`PARENTED_TABLES` and `STANDALONE_TABLES`.
-
-* `Where.NOWHERE` +
-+
-Acts as an override if a member would normally be hidden as a result
-of some other convention. For example, if a property is annotated
-with `@Title` <!--(see ?)-->, then normally this should be hidden from all
-tables. Additionally annotating with `@Hidden(where=Where.NOWHERE)`
-overrides this.
-
-The acceptable values for the `when` parameter are:
-
-* `When.ALWAYS` +
-+
-The member should be hidden at all times.
-
-* `When.NEVER` +
-+
-The member should never be hidden (unless disabled through some
-other mechanism, for example an imperative disableXxx() supporting
-method)..
-
-* `When.ONCE_PERSISTED` +
-+
-The member should be visible for transient objects, but hidden for
-persisted objects.
-
-* `When.UNTIL_PERSISTED` +
-+
-The member should be hidden for transient objects, but visible for
-persisted objects.
-
-By default the annotated property or action is always hidden (ie
-defaults to `Where.ANYWHERE`, `When.ALWAYS`).
-
-
-
-
-
-
-== anchor:reference-annotations_manpage-Collection[]`notPersisted()`
-
-IMPORTANT: WIP ... this section
-
-The `@NotPersisted` annotation indicates that the property is not to be
-persisted.
-
-
-[TIP]
-====
-In many cases the same thing can be achieved simply by providing the property with a 'getter' but no 'setter'.
-====
-
-For example:
-
-[source,java]
-----
-public class Order {
-
-    @NotPersisted
-    public Order getPreviousOrder() {...}
-    public void setPreviousOrder(Order previousOrder) {...}
-
-    ...
-}
-----
-
-
-
-
-
-
-
-
-
-== anchor:reference-annotations_manpage-Collection[]`typeOf()`
-
-IMPORTANT: WIP ... this section
-
-
-The `@TypeOf` annotation is used to specify the type of elements in a collection, when for whatever reason it is not possible to use generics.
-
-[NOTE]
-====
-Given that Apache Isis only supports Java 1.7 and later, it's not that obvious what such a reason might be...
-====
-
-
-For example:
-
-[source,java]
-----
-public void AccountService {
-    @TypeOf(Customer.class)
-    public List errantAccounts() {
-        return CustomerDatabase.allNewCustomers();
-    }
-    ...
-}
-----
 

http://git-wip-us.apache.org/repos/asf/isis/blob/2af3ad9a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout.adoc
index f79eed2..d2302e9 100644
--- a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout.adoc
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout.adoc
@@ -19,22 +19,22 @@ The table below summarizes the annotation's attributes.
 | Description
 
 
-|xref:__a_id_reference_annotations_manpage_collectionlayout_a_code_cssclass_code[`cssClass()`]
+|xref:_ug_reference-annotations_manpage-CollectionLayout_cssClass[`cssClass()`]
 |
 |the css class that a collection should have, to allow more targetted styling in `application.css`
 
 
-|xref:__a_id_reference_annotations_manpage_collectionlayout_a_code_describedas_code[`describedAs()`]
+|xref:_ug_reference-annotations_manpage-CollectionLayout_describedAs[`describedAs()`]
 |
 |description of this collection, eg to be rendered in a tooltip.
 
 
-|xref:__a_id_reference_annotations_manpage_collectionlayout_a_code_hidden_code[`hidden()`]
+|xref:_ug_reference-annotations_manpage-CollectionLayout_hidden[`hidden()`]
 |
 |indicates where in the UI the collection should _not_ be visible in the UI (only NOWHERE or EVERWHERE/ANYWHERE)
 
 
-|xref:__a_id_reference_annotations_manpage_collectionlayout_a_named[named()]
+|xref:_ug_reference-annotations_manpage-CollectionLayout_named[named()]
 |
 |the name of this collection (overriding the name derived from its name in code)
 
@@ -44,17 +44,17 @@ The table below summarizes the annotation's attributes.
 |whether to HTML escape the name of this property.
 
 
-|xref:__a_id_reference_annotations_manpage_collectionlayout_a_code_paged_code[`paged()`]
+|xref:_ug_reference-annotations_manpage-CollectionLayout_paged[`paged()`]
 |
 |the page size for instances of this class when rendered within a table.
 
 
-|xref:__a_id_reference_annotations_manpage_collectionlayout_a_code_render_code[`render()`]
+|xref:_ug_reference-annotations_manpage-CollectionLayout_render[`render()`]
 |
 |that the rendering of a collection should be performed LAZILY or EAGERLY
 
 
-|xref:__a_id_reference_annotations_manpage_collectionlayout_a_code_sortedby_code[`sortedBy()`]
+|xref:_ug_reference-annotations_manpage-CollectionLayout_sortedBy[`sortedBy()`]
 |
 |indicates that the elements in a ({@link java.util.SortedSet}) collection should be sorted according to a different order than the natural sort order, as defined by the specified `Comparator`.
 
@@ -87,435 +87,15 @@ public class ToDoItem {
 
 
 
+include::_ug_reference-annotations_manpage-CollectionLayout_cssClass.adoc[leveloffset=+1]
+include::_ug_reference-annotations_manpage-CollectionLayout_describedAs.adoc[leveloffset=+1]
+include::_ug_reference-annotations_manpage-CollectionLayout_hidden.adoc[leveloffset=+1]
+include::_ug_reference-annotations_manpage-CollectionLayout_named.adoc[leveloffset=+1]
+include::_ug_reference-annotations_manpage-CollectionLayout_paged.adoc[leveloffset=+1]
+include::_ug_reference-annotations_manpage-CollectionLayout_render.adoc[leveloffset=+1]
+include::_ug_reference-annotations_manpage-CollectionLayout_sortedBy.adoc[leveloffset=+1]
 
 
-== anchor:reference-annotations_manpage-CollectionLayout[]`cssClass()`
-
-IMPORTANT: WIP ... this section
-
-
-The `CssClass` annotation applies to object and also to any object member
-(property, collection or action). It is used by the Wicket viewer as a UI hint
-to render specified CSS classes around the representation of the element.
-
-Application-specific CSS can then be used to target and adjust the UI representation
-of that particular element.
-
-For example:
-
-[source,java]
-----
-@CssClass("x-main")
-public class ToDoItem { ... }
-----
-
-or
-
-[source,java]
-----
-public class ToDoItem {
-
-    @CssClass("x-key")
-    public LocalDate getDueBy() { ... }
-
-}
-----
-
-=== Alternatives (`.layout.json`)
-
-As an alternative to using the `@CssClass` annotation, the `.layout.json`
-link:../../components/viewers/wicket/dynamic-layouts.html[dynamic layout file]
-can be specified, eg:
-
-[source,javascript]
-----
-{
-    "span": 6,
-    "memberGroups": {
-        "Priority": {
-            "members": {
-                ...
-                "dueBy": {
-                    "cssClass": { "value": "x-key" }
-                }
-                ....
-            }
-        },
-        ...
-    }
-}
-----
-
-Note that this (currently) only supports class members, not classes
-
-
-[NOTE]
-====
-The similar link:./CssClassFa-deprecated.html[CssClassFa] annotation is also used as a hint to apply CSS, but in particular to allow http://fortawesome.github.io/Font-Awesome/icons/[Font Awesome icons] to be rendered on action butotns or as the icon for classes.
-====
-
-
-
-
-
-
-
-== anchor:reference-annotations_manpage-CollectionLayout[]`describedAs()`
-
-IMPORTANT: WIP ... this section
-
-The `@DescribedAs` annotation is used to provide a short description of
-something that features on the user interface. How this description is
-used will depend upon the viewing mechanism - but it may be thought of
-as being like a 'tool tip'.
-
-Descriptions may be provided for objects, members (properties,
-collections and actions), and for individual parameters within an action
-method. `@DescribedAs` therefore works in a very similar manner to
-`@Named` <!--(see ?)-->.
-
-
-
-For example:
-
-[source,java]
-----
-public class Customer {
-    @DescribedAs("The name that the customer has indicated that they wish to be " +
-                 "addressed as (e.g. Johnny rather than Jonathan)")
-    public String getFirstName() { ... }
-}
-----
-
-
-
-
-== anchor:reference-annotations_manpage-CollectionLayout[]`hidden()`
-
-IMPORTANT: WIP ... this section
-
-
-The `@Hidden` annotation indicates that the member (property, collection
-or action) to which it is applied should never be visible to the user.
-It can also be applied to service types (it has no effect if applied to
-entities or values).
-
-For example:
-
-[source,java]
-----
-public class Customer {
-    @Hidden
-    public int getInternalId() { ... }
-
-    @Hidden
-    public void updateStatus() { ... }
-    ...
-}
-----
-
-Or, applied to a service:
-
-[source,java]
-----
-@Hidden
-public class EmailService {
-    public void sendEmail(...) { ... }
-    ...
-}
-----
-
-This annotation can also take a parameters indicating where and when it
-is to be hidden. For example:
-
-[source,java]
-----
-public class Customer {
-    @Hidden(when=When.ONCE_PERSISTED)
-    public int getInternalId() { ... }
-    ...
-}
-----
-
-would show the `Id` until the object has been saved, and then would hide
-it. And:
-
-[source,java]
-----
-public class Customer {
-    @Hidden(where=Where.ALL_TABLES)
-    public int getDateOfBirth() { ... }
-    ...
-}
-----
-
-would suppress the `dateOfBirth` property of a Customer from all tables.
-
-The acceptable values for the `where` parameter are:
-
-* `Where.ANYWHERE` +
-+
-The member should be hidden everywhere.
-
-* `Where.OBJECT_FORMS` +
-+
-The member should be hidden when displayed within an object form.
-For most viewers, this applies to property and collection members,
-not actions.
-
-* `Where.PARENTED_TABLES` +
-+
-The member should be hidden when displayed as a column of a table
-within a parent object's collection. For most (all?) viewers, this
-will have meaning only if applied to a property member.
-
-* `Where.STANDALONE_TABLES` +
-+
-The member should be hidden when displayed as a column of a table
-showing a standalone list of objects, for example as returned by a
-repository query. For most (all?) viewers, this will have meaning
-only if applied to a property member.
-
-* `Where.ALL_TABLES` +
-+
-The member should be /hidden when displayed as a column of a table,
-either an object's * collection or a standalone list. This combines
-`PARENTED_TABLES` and `STANDALONE_TABLES`.
-
-* `Where.NOWHERE` +
-+
-Acts as an override if a member would normally be hidden as a result
-of some other convention. For example, if a property is annotated
-with `@Title` <!--(see ?)-->, then normally this should be hidden from all
-tables. Additionally annotating with `@Hidden(where=Where.NOWHERE)`
-overrides this.
-
-The acceptable values for the `when` parameter are:
-
-* `When.ALWAYS` +
-+
-The member should be hidden at all times.
-
-* `When.NEVER` +
-+
-The member should never be hidden (unless disabled through some
-other mechanism, for example an imperative disableXxx() supporting
-method)..
-
-* `When.ONCE_PERSISTED` +
-+
-The member should be visible for transient objects, but hidden for
-persisted objects.
-
-* `When.UNTIL_PERSISTED` +
-+
-The member should be hidden for transient objects, but visible for
-persisted objects.
-
-By default the annotated property or action is always hidden (ie
-defaults to `Where.ANYWHERE`, `When.ALWAYS`).
-
-
-
-
-
-
-
-
-== anchor:reference-annotations_manpage-CollectionLayout[]Named
-
-By default, the name of a class member (a property, collection or action) presented to the user is derived, reflectively, from the name of the member defined in the program code. To specify a different name use the `@Named `annotation immediately before the member declaration.
-
-[TIP]
-====
-Generally speaking it is better to rename the property, collection or action. The only common case where `@Named` is common is to rename parameters for built-in value types. Even here though a custom value type can be defined using `@Value` so that the value type is used as the parameter name. `@Named` may also be used if the name needs punctuation or other symbols in the name presented to the user.
-====
-
-
-
-=== named()
-
-IMPORTANT: WIP ... this section
-
-
-The `@Named` annotation is used when you want to specify the way
-something is named on the user interface i.e. when you do not want to
-use the name generated automatically by the system. It can be applied to
-objects, members (properties, collections, and actions) and to
-parameters within an action method.
-
-
-
-For example:
-
-[source,java]
-----
-public class Customer {
-
-    public String getFirstName() { ... }
-
-    public String getSurname() { ... }
-
-    public CreditRating getCreditRating() { ... }
-}
-----
-
-Note that the framework provides a separate and more powerful mechanism
-for internationalisation.
-
-
-=== namedEscaped()
-
-IMPORTANT: WIP ... this section
-
-
-
-
-
-
-
-== anchor:reference-annotations_manpage-CollectionLayout[]`paged()`
-
-IMPORTANT: WIP ... this section
-
-
-This annotation is used to indicate that parented and/or standalone
-collections should be paginated.
-
-When annotated on a collection, `@Paged` indicates the page size of a
-parented collection. When annotated on a type, `@Paged` indicates the page
-size of a standalone collection.
-
-For example:
-
-[source,java]
-----
-@Paged(30)
-public class Order {
-
-    @Paged(15)
-    public List<LineItem> getDetails() {...}
-}
-----
-
-This indicates a page size of 15 for parented collections, and a page
-size of 30 for standalone collections.
-
-When omitting a parameter value or omitting the annotation completely,
-the configured defaults in `isis.properties` will be used.
-
-For example:
-
-[source,ini]
-----
-isis.viewers.paged.standalone=20
-isis.viewers.paged.parented=5
-----
-
-This indicates a page size of 5 for parented collections and a page size
-of 20 for standalone collections.
-
-
-
-
-
-
-
-
-
-== anchor:reference-annotations_manpage-CollectionLayout[]`render()`
-
-IMPORTANT: WIP ... this section
-
-
-The `@Render` annotation is a hint for properties and collections to
-indicate that a value property should be rendered lazily (rather than
-eagerly, as usual), or that a reference property or collection should be
-rendered eagerly (rather than lazily, as usual).
-
-Viewers can use this to present the property/collection in an
-appropriate manner:
-
-*
-
-an `Order`'s `lineItems` collection might initially be rendered expanded
-form so that the user could see a list of line items immediately
-when the order is rendered. This is the most common use case.
-
-*
-
-a (reference) property of type `Address` might show the details of the
-referenced `Address` in a box
-
-At the same time, an object store might use this to defer lazy loading
-of values that represent blobs or clobs.
-
-For example:
-
-[source,java]
-----
-public class Order {
-    @Render(Type.EAGERLY)
-    public List<LineItem> getDetails() { ... }
-
-    ...
-}
-----
-
-For properties and collections there is some similarity between this
-concept and that of eager-loading as supported by some object stores.
-Indeed, some object stores may choose use their own specific annotations
-(eg a JDO default fetch group) in order to infer this semantic.
-
-
-
-
-
-
-
-== anchor:reference-annotations_manpage-CollectionLayout[]`sortedBy()`
-
-IMPORTANT: WIP ... this section
-
-
-The `@SortedBy` annotation is an instruction hint for (`SortedSet`) collections to use the specified comparator rather than the natural ordering of the entity
-(as would usually be the case).
-
-For example, this is taken from the Isis addons example https://github.com/isisaddons/isis-app-todoapp/[todoapp] (not ASF):
-
-[source,java]
-----
-public class ToDoItem implements Comparable<ToDoItem> {
-
-    ...
-    public static class DependenciesComparator implements Comparator<ToDoItem> {
-        @Override
-        public int compare(ToDoItem p, ToDoItem q) {
-            return ORDERING_BY_DESCRIPTION
-                    .compound(Ordering.<ToDoItem>natural())
-                    .compare(p, q);
-        }
-    }
-
-    ...
-    @SortedBy(DependenciesComparator.class)
-    public SortedSet<ToDoItem> getDependencies() { ... }
-
-    public int compareTo(final ToDoItem other) {
-        return ORDERING_BY_COMPLETE
-                .compound(ORDERING_BY_DUE_BY)
-                .compound(ORDERING_BY_DESCRIPTION)
-                .compare(this, other);
-    }
-    ...
-}
-----
-
-When the `dependencies` collection is rendered, the elements are sorted by the `description` property first:
-
-![](images/sortedby-dependencies.png)
-
-Without this annotation, the order would have been inverted (because the natural ordering places items not completed before those items that have been completed.
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/2af3ad9a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_cssClass.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_cssClass.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_cssClass.adoc
new file mode 100644
index 0000000..5e2b61e
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_cssClass.adoc
@@ -0,0 +1,77 @@
+[[_ug_reference-annotations_manpage-CollectionLayout_cssClass]]
+= `cssClass()`
+: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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+IMPORTANT: WIP ... this section
+
+
+The `CssClass` annotation applies to object and also to any object member
+(property, collection or action). It is used by the Wicket viewer as a UI hint
+to render specified CSS classes around the representation of the element.
+
+Application-specific CSS can then be used to target and adjust the UI representation
+of that particular element.
+
+For example:
+
+[source,java]
+----
+@CssClass("x-main")
+public class ToDoItem { ... }
+----
+
+or
+
+[source,java]
+----
+public class ToDoItem {
+
+    @CssClass("x-key")
+    public LocalDate getDueBy() { ... }
+
+}
+----
+
+
+
+== Alternatives (`.layout.json`)
+
+As an alternative to using the `@CssClass` annotation, the `.layout.json`
+link:../../components/viewers/wicket/dynamic-layouts.html[dynamic layout file]
+can be specified, eg:
+
+[source,javascript]
+----
+{
+    "span": 6,
+    "memberGroups": {
+        "Priority": {
+            "members": {
+                ...
+                "dueBy": {
+                    "cssClass": { "value": "x-key" }
+                }
+                ....
+            }
+        },
+        ...
+    }
+}
+----
+
+Note that this (currently) only supports class members, not classes
+
+
+[NOTE]
+====
+The similar link:./CssClassFa-deprecated.html[CssClassFa] annotation is also used as a hint to apply CSS, but in particular to allow http://fortawesome.github.io/Font-Awesome/icons/[Font Awesome icons] to be rendered on action butotns or as the icon for classes.
+====
+
+
+
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/2af3ad9a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_describedAs.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_describedAs.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_describedAs.adoc
new file mode 100644
index 0000000..a8faf07
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_describedAs.adoc
@@ -0,0 +1,31 @@
+[[_ug_reference-annotations_manpage-CollectionLayout_describedAs]]
+= `describedAs()`
+: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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+IMPORTANT: WIP ... this section
+
+The `@DescribedAs` annotation is used to provide a short description of
+something that features on the user interface. How this description is
+used will depend upon the viewing mechanism - but it may be thought of
+as being like a 'tool tip'.
+
+Descriptions may be provided for objects, members (properties,
+collections and actions), and for individual parameters within an action
+method. `@DescribedAs` therefore works in a very similar manner to
+`@Named` <!--(see ?)-->.
+
+
+
+For example:
+
+[source,java]
+----
+public class Customer {
+    @DescribedAs("The name that the customer has indicated that they wish to be " +
+                 "addressed as (e.g. Johnny rather than Jonathan)")
+    public String getFirstName() { ... }
+}
+----

http://git-wip-us.apache.org/repos/asf/isis/blob/2af3ad9a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_hidden.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_hidden.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_hidden.adoc
new file mode 100644
index 0000000..4d74bea
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_hidden.adoc
@@ -0,0 +1,132 @@
+[[_ug_reference-annotations_manpage-CollectionLayout_hidden]]
+= `hidden()`
+: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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+IMPORTANT: WIP ... this section
+
+
+The `@Hidden` annotation indicates that the member (property, collection
+or action) to which it is applied should never be visible to the user.
+It can also be applied to service types (it has no effect if applied to
+entities or values).
+
+For example:
+
+[source,java]
+----
+public class Customer {
+    @Hidden
+    public int getInternalId() { ... }
+
+    @Hidden
+    public void updateStatus() { ... }
+    ...
+}
+----
+
+Or, applied to a service:
+
+[source,java]
+----
+@Hidden
+public class EmailService {
+    public void sendEmail(...) { ... }
+    ...
+}
+----
+
+This annotation can also take a parameters indicating where and when it
+is to be hidden. For example:
+
+[source,java]
+----
+public class Customer {
+    @Hidden(when=When.ONCE_PERSISTED)
+    public int getInternalId() { ... }
+    ...
+}
+----
+
+would show the `Id` until the object has been saved, and then would hide
+it. And:
+
+[source,java]
+----
+public class Customer {
+    @Hidden(where=Where.ALL_TABLES)
+    public int getDateOfBirth() { ... }
+    ...
+}
+----
+
+would suppress the `dateOfBirth` property of a Customer from all tables.
+
+The acceptable values for the `where` parameter are:
+
+* `Where.ANYWHERE` +
++
+The member should be hidden everywhere.
+
+* `Where.OBJECT_FORMS` +
++
+The member should be hidden when displayed within an object form.
+For most viewers, this applies to property and collection members,
+not actions.
+
+* `Where.PARENTED_TABLES` +
++
+The member should be hidden when displayed as a column of a table
+within a parent object's collection. For most (all?) viewers, this
+will have meaning only if applied to a property member.
+
+* `Where.STANDALONE_TABLES` +
++
+The member should be hidden when displayed as a column of a table
+showing a standalone list of objects, for example as returned by a
+repository query. For most (all?) viewers, this will have meaning
+only if applied to a property member.
+
+* `Where.ALL_TABLES` +
++
+The member should be /hidden when displayed as a column of a table,
+either an object's * collection or a standalone list. This combines
+`PARENTED_TABLES` and `STANDALONE_TABLES`.
+
+* `Where.NOWHERE` +
++
+Acts as an override if a member would normally be hidden as a result
+of some other convention. For example, if a property is annotated
+with `@Title` <!--(see ?)-->, then normally this should be hidden from all
+tables. Additionally annotating with `@Hidden(where=Where.NOWHERE)`
+overrides this.
+
+The acceptable values for the `when` parameter are:
+
+* `When.ALWAYS` +
++
+The member should be hidden at all times.
+
+* `When.NEVER` +
++
+The member should never be hidden (unless disabled through some
+other mechanism, for example an imperative disableXxx() supporting
+method)..
+
+* `When.ONCE_PERSISTED` +
++
+The member should be visible for transient objects, but hidden for
+persisted objects.
+
+* `When.UNTIL_PERSISTED` +
++
+The member should be hidden for transient objects, but visible for
+persisted objects.
+
+By default the annotated property or action is always hidden (ie
+defaults to `Where.ANYWHERE`, `When.ALWAYS`).
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/2af3ad9a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_named.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_named.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_named.adoc
new file mode 100644
index 0000000..a6c6843
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_named.adoc
@@ -0,0 +1,58 @@
+[[_ug_reference-annotations_manpage-CollectionLayout_named]]
+= Named
+: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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+By default, the name of a class member (a property, collection or action) presented to the user is derived, reflectively, from the name of the member defined in the program code. To specify a different name use the `@Named `annotation immediately before the member declaration.
+
+[TIP]
+====
+Generally speaking it is better to rename the property, collection or action. The only common case where `@Named` is common is to rename parameters for built-in value types. Even here though a custom value type can be defined using `@Value` so that the value type is used as the parameter name. `@Named` may also be used if the name needs punctuation or other symbols in the name presented to the user.
+====
+
+
+
+== named()
+
+IMPORTANT: WIP ... this section
+
+
+The `@Named` annotation is used when you want to specify the way
+something is named on the user interface i.e. when you do not want to
+use the name generated automatically by the system. It can be applied to
+objects, members (properties, collections, and actions) and to
+parameters within an action method.
+
+
+
+For example:
+
+[source,java]
+----
+public class Customer {
+
+    public String getFirstName() { ... }
+
+    public String getSurname() { ... }
+
+    public CreditRating getCreditRating() { ... }
+}
+----
+
+Note that the framework provides a separate and more powerful mechanism
+for internationalisation.
+
+
+
+
+== namedEscaped()
+
+IMPORTANT: WIP ... this section
+
+
+
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/2af3ad9a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_paged.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_paged.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_paged.adoc
new file mode 100644
index 0000000..9e64b8f
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_paged.adoc
@@ -0,0 +1,51 @@
+[[_ug_reference-annotations_manpage-CollectionLayout_paged]]
+= `paged()`
+: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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+IMPORTANT: WIP ... this section
+
+
+This annotation is used to indicate that parented and/or standalone
+collections should be paginated.
+
+When annotated on a collection, `@Paged` indicates the page size of a
+parented collection. When annotated on a type, `@Paged` indicates the page
+size of a standalone collection.
+
+For example:
+
+[source,java]
+----
+@Paged(30)
+public class Order {
+
+    @Paged(15)
+    public List<LineItem> getDetails() {...}
+}
+----
+
+This indicates a page size of 15 for parented collections, and a page
+size of 30 for standalone collections.
+
+When omitting a parameter value or omitting the annotation completely,
+the configured defaults in `isis.properties` will be used.
+
+For example:
+
+[source,ini]
+----
+isis.viewers.paged.standalone=20
+isis.viewers.paged.parented=5
+----
+
+This indicates a page size of 5 for parented collections and a page size
+of 20 for standalone collections.
+
+
+
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/2af3ad9a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_render.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_render.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_render.adoc
new file mode 100644
index 0000000..3118d52
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_render.adoc
@@ -0,0 +1,49 @@
+[[_ug_reference-annotations_manpage-CollectionLayout_render]]
+= `render()`
+: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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+
+IMPORTANT: WIP ... this section
+
+
+The `@Render` annotation is a hint for properties and collections to
+indicate that a value property should be rendered lazily (rather than
+eagerly, as usual), or that a reference property or collection should be
+rendered eagerly (rather than lazily, as usual).
+
+Viewers can use this to present the property/collection in an
+appropriate manner:
+
+* an ``Order``'s `lineItems` collection might initially be rendered expanded
+form so that the user could see a list of line items immediately
+when the order is rendered. This is the most common use case.
+
+* a (reference) property of type `Address` might show the details of the
+referenced `Address` in a box
+
+At the same time, an object store might use this to defer lazy loading
+of values that represent blobs or clobs.
+
+For example:
+
+[source,java]
+----
+public class Order {
+    @Render(Type.EAGERLY)
+    public List<LineItem> getDetails() { ... }
+
+    ...
+}
+----
+
+For properties and collections there is some similarity between this
+concept and that of eager-loading as supported by some object stores.
+Indeed, some object stores may choose use their own specific annotations
+(eg a JDO default fetch group) in order to infer this semantic.
+
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/2af3ad9a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_sortedBy.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_sortedBy.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_sortedBy.adoc
new file mode 100644
index 0000000..669bbed
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-CollectionLayout_sortedBy.adoc
@@ -0,0 +1,53 @@
+[[_ug_reference-annotations_manpage-CollectionLayout_sortedBy]]
+= `sortedBy()`
+: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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+
+IMPORTANT: WIP ... this section
+
+
+The `@SortedBy` annotation is an instruction hint for (`SortedSet`) collections to use the specified comparator rather than the natural ordering of the entity
+(as would usually be the case).
+
+For example, this is taken from the Isis addons example https://github.com/isisaddons/isis-app-todoapp/[todoapp] (not ASF):
+
+[source,java]
+----
+public class ToDoItem implements Comparable<ToDoItem> {
+
+    ...
+    public static class DependenciesComparator implements Comparator<ToDoItem> {
+        @Override
+        public int compare(ToDoItem p, ToDoItem q) {
+            return ORDERING_BY_DESCRIPTION
+                    .compound(Ordering.<ToDoItem>natural())
+                    .compare(p, q);
+        }
+    }
+
+    ...
+    @SortedBy(DependenciesComparator.class)
+    public SortedSet<ToDoItem> getDependencies() { ... }
+
+    public int compareTo(final ToDoItem other) {
+        return ORDERING_BY_COMPLETE
+                .compound(ORDERING_BY_DUE_BY)
+                .compound(ORDERING_BY_DESCRIPTION)
+                .compare(this, other);
+    }
+    ...
+}
+----
+
+When the `dependencies` collection is rendered, the elements are sorted by the `description` property first:
+
+![](images/sortedby-dependencies.png)
+
+Without this annotation, the order would have been inverted (because the natural ordering places items not completed before those items that have been completed.
+
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/2af3ad9a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Collection_domainEvent.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Collection_domainEvent.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Collection_domainEvent.adoc
new file mode 100644
index 0000000..93db66e
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Collection_domainEvent.adoc
@@ -0,0 +1,168 @@
+[[_ug_reference-annotations_manpage-Collection_domainEvent]]
+= `domainEvent()`
+: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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+IMPORTANT: WIP ... this section
+
+[WARNING]
+====
+The Wicket viewer does NOT support collection modification; instead write a pair of actions to add to/remove from the collection.
+
+However, it _is_ possible to fire collection interaction events using the wrapper factory; see below for more details.
+====
+
+
+The `@CollectionInteraction` annotation applies to domain entity collections, allowing subscribers to optionally veto, validate or otherwise perform tasks before or after the collection has been added to/removed from.
+
+Subscribers subscribe through the xref:_ug_reference-services-api_manpage-EventBusService[`EventBusService`] using Guava annotations.
+
+By default the event raised is `CollectionInteractionEvent.Default`. For example:
+
+[source,java]
+----
+public class ToDoItem {
+    ...
+    @CollectionInteraction
+    public SortedSet<ToDoItem> getDependencies() { ... }
+}
+----
+
+Optionally a subclass can be declared:
+
+[source,java]
+----
+public class ToDoItem {
+
+    public static class DependenciesChangedEvent extends CollectionInteractionEvent<ToDoItem, ToDoItem> {
+        private static final long serialVersionUID = 1L;
+        public DependenciesChangedEvent(ToDoItem source, Identifier identifier, Of of, ToDoItem value) {
+            super(source, identifier, of, value);
+        }
+    }
+
+}
+----
+
+The `of` field indicates if the collection is being accessed, added to or removed from.
+
+
+
+
+
+== Subscribers
+
+Subscribers (which must be domain services) subscribe using the Guava API.
+Subscribers can be either coarse-grained (if they subscribe to the top-level event type):
+
+[source,java]
+----
+@DomainService
+public class SomeSubscriber {
+
+    @Programmatic
+    @com.google.common.eventbus.Subscribe
+    public void on(CollectionInteractionEvent ev) {
+
+        ...
+    }
+
+}
+----
+
+or can be fine-grained by subscribing to specific event subtypes:
+
+[source,java]
+----
+@DomainService
+public class SomeSubscriber {
+
+    @Programmatic
+    @com.google.common.eventbus.Subscribe
+    public void on(ToDoItem.DependenciesChangedEvent ev) {
+
+        ...
+    }
+
+}
+----
+
+The subscriber's method is called (up to) 5 times:
+
+* whether to veto visibility (hide)
+* whether to veto usability (disable)
+* whether to veto execution (validate)
+* steps to perform prior to the property being modified
+* steps to perform after the property has been modified.
+
+The subscriber can distinguish these by calling `ev.getPhase()`. Thus the general form is:
+
+[source,java]
+----
+    @Programmatic
+    @com.google.common.eventbus.Subscribe
+    public void on(CollectionInteractionEvent ev) {
+
+    switch(ev.getPhase()) {
+        case HIDE:
+            ...
+            break;
+        case DISABLE:
+            ...
+            break;
+        case VALIDATE:
+            ...
+            break;
+        case EXECUTING:
+            ...
+            break;
+        case EXECUTED:
+            ...
+            break;
+    }
+}
+----
+
+Vetoing is performed by calling the appropriate method on the event:
+
+*
+
+To hide:
+
+ev.hide()
+
+*
+
+To disable:
+
+ev.disable("…");
+
+*
+
+To invalidate:
+
+ev.invalidate("…");
+
+It is also possible to abort the transaction during the executing or executed
+phases by throwing an exception. If the exception is a subtype of `RecoverableException`
+then the exception will be rendered as a user-friendly warning (eg Growl/toast)
+rather than an error.
+
+
+
+
+== Raising events programmatically.
+
+Normally events are only raised for interactions through the UI. However, events can be raised programmatically by
+wrapping the target object using the link:../services/wrapper-factory.html[Wrapper Factory] service.
+
+
+[NOTE]
+====
+domain events can also be raised for actions and properties.
+====
+
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/2af3ad9a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Collection_editing.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Collection_editing.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Collection_editing.adoc
new file mode 100644
index 0000000..9d7ef3b
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Collection_editing.adoc
@@ -0,0 +1,130 @@
+[[_ug_reference-annotations_manpage-Collection_editing]]
+= `editing()`
+: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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+IMPORTANT: WIP ... this section
+
+[NOTE]
+====
+Fully supported by: Wicket viewer; other viewers do not yet support the `where` attribute.
+====
+
+The `@Disabled` annotation means that the member cannot be used in any instance of the class. When applied to the property it means that the user may not modify the value of that property (though it may still be modified programmatically). When applied to an action method, it means that the user cannot invoke that method.
+
+For example:
+
+[source,java]
+----
+public class Customer {
+    @Disabled
+    public void assessCreditWorthiness() { ... }
+
+    @Disabled
+    public int getInitialCreditRating(){ ... }
+    public void setInitialCreditRating(int initialCreditRating) { ... }
+}
+----
+
+Note that if an action is marked as `@Disabled`, it will be shown on the
+user interface but cannot ever be invoked. The only possible reason we
+can think to do this is during prototyping, to indicate an action that
+is still to be developed. If a method is intended for programmatic use,
+but not intended ever to be invoked directly by a user, then it should
+be marked as `@Hidden` instead.
+
+This annotation can also take two parameter indicating where (in the UI)
+it is to be disabled, and when (in the object's lifecycle) it is to be
+disabled. For example:
+
+[source,java]
+----
+public class Customer {
+    (when=When.UNTIL_PERSISTED)
+    public void assessCreditWorthiness() { ... }
+}
+----
+
+would disable the action until the object has been saved. And:
+
+[source,java]
+----
+public class Customer {
+    (where=Where.PARENTED_TABLES)
+    public void getFirstName() { ... }
+}
+----
+
+would disable the property in parented tables but not in regular object
+forms (though note: this would only be used by viewers that provide
+in-table editing capability).
+
+The acceptable values for the `where` parameter are:
+
+* `Where.ANYWHERE` +
++
+The member should be disabled everywhere.
+
+* `Where.OBJECT_FORMS` +
++
+The member should be disabled when displayed within an object form.
+For most viewers, this applies to property and collection members,
+not actions.
+
+* `Where.PARENTED_TABLES` +
++
+The member should be disabled when displayed as a column of a table
+within a parent object's collection. For most (all?) viewers, this
+will have meaning only if applied to a property member.
+
+* `Where.STANDALONE_TABLES` +
++
+The member should be disabled when displayed as a column of a table
+showing a standalone list of objects, for example as returned by a
+repository query. For most (all?) viewers, this will have meaning
+only if applied to a property member.
+
+* `Where.ALL_TABLES` +
++
+The member should be disabled when displayed as a column of a table,
+either an object's * collection or a standalone list. This combines
+`PARENTED_TABLES` and `STANDALONE_TABLES`
+
+* `Where.NOWHERE` +
++
+Has no meaning for the `@Disabled` annotation (though is used by the
+`@Hidden` annotation which also uses the `Where` enum<!--, see ?-->).
+
+The acceptable values for the `when` parameter are:
+
+* `When.ALWAYS` +
++
+The member should be disabled at all times.
+
+* `When.NEVER` +
++
+The member should never be disabled (unless disabled through some
+other mechanism, for example an imperative disableXxx() supporting
+method)..
+
+* `When.ONCE_PERSISTED` +
++
+The member should be enabled for transient objects, but disabled for
+persisted objects.
+
+* `When.UNTIL_PERSISTED` +
++
+The member should be disabled for transient objects, but enabled for
+persisted objects.
+
+By default the annotated property or action is always disabled (ie
+defaults to `Where.ANYWHERE`, `When.ALWAYS`).
+
+
+
+
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/2af3ad9a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Collection_hidden.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Collection_hidden.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Collection_hidden.adoc
new file mode 100644
index 0000000..b907e9f
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Collection_hidden.adoc
@@ -0,0 +1,129 @@
+[[_ug_reference-annotations_manpage-Collection_hidden]]
+= `hidden()`
+: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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+
+IMPORTANT: WIP ... this section
+
+The `@Hidden` annotation indicates that the member (property, collection or action) to which it is applied should never be visible to the user. It can also be applied to service types (it has no effect if applied to entities or values).
+
+For example:
+
+[source,java]
+----
+public class Customer {
+    @Hidden
+    public int getInternalId() { ... }
+
+    @Hidden
+    public void updateStatus() { ... }
+    ...
+}
+----
+
+Or, applied to a service:
+
+[source,java]
+----
+@Hidden
+public class EmailService {
+    public void sendEmail(...) { ... }
+    ...
+}
+----
+
+This annotation can also take a parameters indicating where and when it
+is to be hidden. For example:
+
+[source,java]
+----
+public class Customer {
+    @Hidden(when=When.ONCE_PERSISTED)
+    public int getInternalId() { ... }
+    ...
+}
+----
+
+would show the `Id` until the object has been saved, and then would hide
+it. And:
+
+[source,java]
+----
+public class Customer {
+    @Hidden(where=Where.ALL_TABLES)
+    public int getDateOfBirth() { ... }
+    ...
+}
+----
+
+would suppress the `dateOfBirth` property of a Customer from all tables.
+
+The acceptable values for the `where` parameter are:
+
+* `Where.ANYWHERE` +
++
+The member should be hidden everywhere.
+
+* `Where.OBJECT_FORMS` +
++
+The member should be hidden when displayed within an object form.
+For most viewers, this applies to property and collection members,
+not actions.
+
+* `Where.PARENTED_TABLES` +
++
+The member should be hidden when displayed as a column of a table
+within a parent object's collection. For most (all?) viewers, this
+will have meaning only if applied to a property member.
+
+* `Where.STANDALONE_TABLES` +
++
+The member should be hidden when displayed as a column of a table
+showing a standalone list of objects, for example as returned by a
+repository query. For most (all?) viewers, this will have meaning
+only if applied to a property member.
+
+* `Where.ALL_TABLES` +
++
+The member should be /hidden when displayed as a column of a table,
+either an object's * collection or a standalone list. This combines
+`PARENTED_TABLES` and `STANDALONE_TABLES`.
+
+* `Where.NOWHERE` +
++
+Acts as an override if a member would normally be hidden as a result
+of some other convention. For example, if a property is annotated
+with `@Title` <!--(see ?)-->, then normally this should be hidden from all
+tables. Additionally annotating with `@Hidden(where=Where.NOWHERE)`
+overrides this.
+
+The acceptable values for the `when` parameter are:
+
+* `When.ALWAYS` +
++
+The member should be hidden at all times.
+
+* `When.NEVER` +
++
+The member should never be hidden (unless disabled through some
+other mechanism, for example an imperative disableXxx() supporting
+method)..
+
+* `When.ONCE_PERSISTED` +
++
+The member should be visible for transient objects, but hidden for
+persisted objects.
+
+* `When.UNTIL_PERSISTED` +
++
+The member should be hidden for transient objects, but visible for
+persisted objects.
+
+By default the annotated property or action is always hidden (ie
+defaults to `Where.ANYWHERE`, `When.ALWAYS`).
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/2af3ad9a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Collection_notPersisted.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Collection_notPersisted.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Collection_notPersisted.adoc
new file mode 100644
index 0000000..f101ee9
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-Collection_notPersisted.adoc
@@ -0,0 +1,34 @@
+[[_ug_reference-annotations_manpage-Collection_notPersisted]]
+= `notPersisted()`
+: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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+
+IMPORTANT: WIP ... this section
+
+The `@NotPersisted` annotation indicates that the property is not to be
+persisted.
+
+
+[TIP]
+====
+In many cases the same thing can be achieved simply by providing the property with a 'getter' but no 'setter'.
+====
+
+For example:
+
+[source,java]
+----
+public class Order {
+
+    @NotPersisted
+    public Order getPreviousOrder() {...}
+    public void setPreviousOrder(Order previousOrder) {...}
+
+    ...
+}
+----
+