ugfun.adoc - crud

Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/2693c5ce
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/2693c5ce
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/2693c5ce

Branch: refs/heads/wip
Commit: 2693c5ced0ec3c4afcaa38c23906c74ba78dd1a9
Parents: c247c22
Author: Dan Haywood <d...@haywood-associates.co.uk>
Authored: Mon Apr 17 20:46:00 2017 +0200
Committer: Dan Haywood <d...@haywood-associates.co.uk>
Committed: Thu Apr 20 09:09:31 2017 +0100

----------------------------------------------------------------------
 ...building-blocks_events_lifecycle-events.adoc | 10 ++-
 .../main/asciidoc/guides/ugfun/_ugfun_crud.adoc | 24 ++++----
 .../guides/ugfun/_ugfun_crud_deleting.adoc      | 13 ++++
 .../guides/ugfun/_ugfun_crud_finding.adoc       | 60 ++++++++++++++++++
 .../guides/ugfun/_ugfun_crud_instantiating.adoc | 52 ++++++++++++++++
 .../guides/ugfun/_ugfun_crud_persisting.adoc    | 51 +++++++++++++++
 .../asciidoc/guides/ugfun/_ugfun_ui-hints.adoc  |  5 +-
 .../_ugfun_ui-hints_action-icons-and-css.adoc   | 65 ++++++++++++++++----
 ..._ugfun_ui-hints_object-titles-and-icons.adoc | 13 ----
 9 files changed, 252 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/2693c5ce/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_building-blocks_events_lifecycle-events.adoc
----------------------------------------------------------------------
diff --git 
a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_building-blocks_events_lifecycle-events.adoc
 
b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_building-blocks_events_lifecycle-events.adoc
index 5e9d666..13239ea 100644
--- 
a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_building-blocks_events_lifecycle-events.adoc
+++ 
b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_building-blocks_events_lifecycle-events.adoc
@@ -15,12 +15,20 @@ Lifecycle events are _not_ fired for view models.
 
 The lifecycle events supported are:
 
-* object created - just instantiated
+* object created - just instantiated. +
++
+Note that this requires that the object is instantiated using the framework, 
see xref:../ugfun/ugfun.adoc#_ugfun_crud_instantiating[here] for further 
discussion
+
 * updated loaded - just retrieved from the database
+
 * object persisting - object about to be inserted into the database
+
 * object persisted - object just inserted into the database
+
 * object updating - object about to be updated
+
 * object updated - object just updated
+
 * object removing - object about to be deleted from the database
 
 There is no lifecycle event for object creating because the framework doesn't 
know about newly created objects until they have been created; and there is no 
lifecycle event for obejcts removed because it is not valid to "touch" a domain 
entity once deleted.

http://git-wip-us.apache.org/repos/asf/isis/blob/2693c5ce/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_crud.adoc
----------------------------------------------------------------------
diff --git 
a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_crud.adoc 
b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_crud.adoc
index 247deaf..add909f 100644
--- a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_crud.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_crud.adoc
@@ -4,26 +4,24 @@
 :_basedir: ../../
 :_imagesdir: images/
 
-NOTE: FIXME
 
+This chapter shows the idioms for creating, reading, updating and deleting 
xref:../ugfun/ugfun.adoc#_ugfun_building-blocks_types-of-domain-objects_domain-entities[domain
 entities].
 
-## Instantiating and Persisting
+It also shows how to instantiate 
xref:../ugfun/ugfun.adoc#_ugfun_building-blocks_types-of-domain-objects_view-models[view
 models] and how to programmatically instantiate 
xref:../ugfun/ugfun.adoc#_ugfun_building-blocks_types-of-domain-objects_mixins[mixins]
 (useful primarily for 
xref:../ugtst/ugtst.adoc#_ugtst_integ-test-support[integration testing]).
 
-NOTE: FIXME - using ``DomainObjectContainer``'s support for  
xref:../rgsvc/rgsvc.adoc#_rgsvc_api_DomainObjectContainer_object-creation-api[creation]
 and 
xref:../rgsvc/rgsvc.adoc#_rgsvc_api_DomainObjectContainer_object-persistence-api[persistence]
+[NOTE]
+====
+The main domain services used are 
xref:../rgsvc/rgsvc.adoc#_rgsvc_api_RepositoryService[`RepositoryService`] and 
xref:../rgsvc/rgsvc.adoc#_rgsvc_api_FactoryService[`FactoryService`].
+These (and some other services) replace the now deprecated 
xref:../rgsvc/rgsvc.adoc#_rgsvc_api_DomainObjectContainer[`DomainObjectContainer`].
+====
 
-## Finding Objects
 
-NOTE: FIXME - using 
xref:../rgsvc/rgsvc.adoc#_rgsvc_api_DomainObjectContainer_generic-repository-api[`DomainObjectContainer`]
+include::_ugfun_crud_instantiating.adoc[leveloffset=+1]
 
-### Using DataNucleus type-safe queries
+include::_ugfun_crud_persisting.adoc[leveloffset=+1]
 
-NOTE: FIXME - as described 
xref:../rgsvc/rgsvc.adoc#__rgsvc_api_IsisJdoSupport_type-safe-jdoql-queries[here]
-
-
-
-## Deleting Objects
-
-NOTE: FIXME using ``DomainObjectContainer``'s support for  
xref:../rgsvc/rgsvc.adoc#_rgsvc_api_DomainObjectContainer_object-persistence-api[persistence]
+include::_ugfun_crud_finding.adoc[leveloffset=+1]
 
+include::_ugfun_crud_deleting.adoc[leveloffset=+1]
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/2693c5ce/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_crud_deleting.adoc
----------------------------------------------------------------------
diff --git 
a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_crud_deleting.adoc 
b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_crud_deleting.adoc
new file mode 100644
index 0000000..edb0257
--- /dev/null
+++ 
b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_crud_deleting.adoc
@@ -0,0 +1,13 @@
+[[_ugfun_crud_deleting]]
+= Deleting Objects
+: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/
+
+
+
+
+
+
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/2693c5ce/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_crud_finding.adoc
----------------------------------------------------------------------
diff --git 
a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_crud_finding.adoc 
b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_crud_finding.adoc
new file mode 100644
index 0000000..9b542ae
--- /dev/null
+++ 
b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_crud_finding.adoc
@@ -0,0 +1,60 @@
+[[_ugfun_crud_finding]]
+= Finding Objects
+: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/
+
+
+Retrieving domain entities typically requires a JDOQL query defined on the 
domain entity, and a corresponding repository service for that domain entity 
type.
+This repository calls the framework-provided 
xref:../rgsvc/rgsvc.adoc#_rgsvc_api_RepositoryService[`RepositoryService`] to 
actually submit the query.
+
+For example:
+
+[source,java]
+----
+@javax.jdo.annotations.Queries({
+    @javax.jdo.annotations.Query(                       // <1>
+        name = "findByName",                            // <2>
+        value = "SELECT "                               // <3>
+                + "FROM com.mydomain.myapp.Customer "   // <4>
+                + "WHERE name.indexOf(:name) >= 0 ")    // <5>
+})
+...
+public class Customer { ... }
+----
+<1> There may be several `@Query` annotations, nested within a `@Queries` 
annotation) defines queries using JDOQL.
+<2> Defines the name of the query.
+<3> The definition of the query, using JDOQL syntax.
+<4> The fully-qualified class name.
+Must correspond to the class on which the annotation is defined (the framework 
checks this automatically on bootstrapping).
+<5> In this particular query, is an implementation of a LIKE "name%" query.
+
+and
+
+[source,java]
+----
+@DomainService(nature=NatureOfService.DOMAIN)
+public class CustomerRepository {
+
+    public List<Customer> findByName(String name) {
+        return repositoryService.allMatches(            // <1>
+                new QueryDefault<>(Customer.class,      // <2>
+                            "findByName",               // <3>
+                            "name",                     // <4>
+                            name);
+    }
+
+    @javax.inject.Inject
+    RepositoryService repositoryService;
+}
+----
+<1>    The 
xref:../rgsvc/rgsvc.adoc#_rgsvc_api_RepositoryService[`RepositoryService`] is a 
generic facade over the JDO/DataNucleus API.
+<2> Specifies the class that is annotated with @Query
+<3> Corresponds to the `@Query#name()` attribute
+<4> Corresponds to the `:name` parameter in the query JDOQL string
+
+
+== Using DataNucleus type-safe queries
+
+DataNucleus also supports type-safe queries; see 
xref:../rgsvc/rgsvc.adoc#__rgsvc_api_IsisJdoSupport_type-safe-jdoql-queries[here]
 for further details.
+

http://git-wip-us.apache.org/repos/asf/isis/blob/2693c5ce/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_crud_instantiating.adoc
----------------------------------------------------------------------
diff --git 
a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_crud_instantiating.adoc
 
b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_crud_instantiating.adoc
new file mode 100644
index 0000000..7eae5c8
--- /dev/null
+++ 
b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_crud_instantiating.adoc
@@ -0,0 +1,52 @@
+[[_ugfun_crud_instantiating]]
+= Instantiating
+: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/
+
+
+
+Both domain entities and view models can be instantiated using the 
xref:../rgsvc/rgsvc.adoc#_rgsvc_api_FactoryService[`FactoryService`] provided 
by the framework.
+For example:
+
+[source,java]
+----
+Customer customer = factoryService.instantiate(Customer.class);
+----
+
+or
+
+[source,java]
+----
+Dashboard dashboardVM = factoryService.instantiate(Dashboard.class);
+----
+
+When the framework instantiates the object, all services are injected into the 
framework, and an `ObjectCreated` 
xref:../ugfun/ugfun.adoc#_ugfun_building-blocks_events_lifecycle-events[lifecycle
 event] will also be emitted.
+
+
+For this to work the target class _must_ have a no-arg constructor.
+
+However, you may prefer for your domain objects to have regular constructor 
defining their minimum set of mandatory properties.
+
+For example:
+
+[source,java]
+----
+public class Customer {
+
+    public Customer(String reference, String firstName, String lastName) { ... 
}
+
+    ...
+}
+----
+
+In such cases, the domain object cannot be instantiated using `FactoryService`.
+Instead the 
xref:../rgsvc/rgsvc.adoc#_rgsvc_api_ServiceRegistry[`ServiceRegistry`] service 
can be used to inject services:
+
+[source,java]
+----
+Customer customer = new Customer(reference, firstName, lastName);
+serviceRegister.injectServicesInto(customer);
+----
+
+Note that this does _not_ raise any lifecycle event.

http://git-wip-us.apache.org/repos/asf/isis/blob/2693c5ce/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_crud_persisting.adoc
----------------------------------------------------------------------
diff --git 
a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_crud_persisting.adoc
 
b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_crud_persisting.adoc
new file mode 100644
index 0000000..c169866
--- /dev/null
+++ 
b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_crud_persisting.adoc
@@ -0,0 +1,51 @@
+[[_ugfun_crud_persisting]]
+= Persisting
+: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/
+
+
+
+Once a domain entity has been instantiated, it must be persisted.
+This is done using the 
xref:../rgsvc/rgsvc.adoc#_rgsvc_api_RepositoryService[`RepositoryService`].
+For example:
+
+[source,java]
+----
+Customer customer = ...
+
+repositoryService.persist(customer);
+----
+
+If using the no-arg form to instantiate the entity, then (to save having to 
inject two services), the `RepositoryService` can also be used to instantiate.
+This gives rise to this common idiom:
+
+[source,java]
+----
+Customer customer = repositoryService.instantiate(Customer.class);
+customer.setReference(reference);
+customer.setFirstName(firstName);
+customer.setLastName(lastName);
+...
+repositoryService.persist(customer);
+----
+
+
+
+
+[TIP]
+====
+It is also possible to configure DataNucleus to automatically persist domain 
entities if they are associated with other already-persistent entities.
+This avoid the need to explicitly call "persist".
+
+For this, configure the persistence-by-reachability property:
+
+.isis.properties
+[source,ini]
+----
+isis.persistor.datanucleus.impl.datanucleus.persistenceByReachabilityAtCommit=true
+----
+
+The downside is that the code is arguably less easy to debug.
+====
+

http://git-wip-us.apache.org/repos/asf/isis/blob/2693c5ce/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_ui-hints.adoc
----------------------------------------------------------------------
diff --git 
a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_ui-hints.adoc 
b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_ui-hints.adoc
index 96c8c64..ab2ef6a 100644
--- a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_ui-hints.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_ui-hints.adoc
@@ -9,7 +9,10 @@ The Apache Isis programming model includes several mechanisms 
for a domain objec
 
 
 include::_ugfun_ui-hints_layout.adoc[leveloffset=+1]
+
 include::_ugfun_ui-hints_object-titles-and-icons.adoc[leveloffset=+1]
+include::_ugfun_ui-hints_action-icons-and-css.adoc[leveloffset=+1]
+
 include::_ugfun_ui-hints_names-and-descriptions.adoc[leveloffset=+1]
+
 include::_ugfun_ui-hints_eager-rendering.adoc[leveloffset=+1]
-include::_ugfun_ui-hints_action-icons-and-css.adoc[leveloffset=+1]

http://git-wip-us.apache.org/repos/asf/isis/blob/2693c5ce/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_ui-hints_action-icons-and-css.adoc
----------------------------------------------------------------------
diff --git 
a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_ui-hints_action-icons-and-css.adoc
 
b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_ui-hints_action-icons-and-css.adoc
index b5f84bf..7700bb8 100644
--- 
a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_ui-hints_action-icons-and-css.adoc
+++ 
b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_ui-hints_action-icons-and-css.adoc
@@ -6,22 +6,39 @@
 
 
 Apache Isis allows link:http://fortawesome.github.io/Font-Awesome/icons/[font 
awesome] icons to be associated with each action, and for 
link:http://getbootstrap.com/css/#buttons[Bootstrap CSS] to be applied to 
action rendered as buttons.
+These UI hints can be applied either to individual actions, or can be applied 
en-masse using pattern matching.
 
-These UI hint can be applied either to individual actions, or can be applied 
en-masse using pattern matching.
+It is also possible to specify additional CSS for an object's members (not 
just actions).
 
-== Per action
 
-NOTE: FIXME - 
xref:../rgant/rgant.adoc#_rgant-ActionLayout_cssClass[`@ActionLayout#cssClass()`]
 and 
xref:../rgant/rgant.adoc#_rgant-ActionLayout_cssClassFa[`@ActionLayout#cssClassFa()`]
+== Icons
 
+Action icons can be specified in several ways.
 
-Alternatively, you can specify these hints dynamically in the 
xref:../ugvw/ugvw.adoc#_ugvw_layout[`Xxx.layout.json`] for the entity.
+One option is to use the 
xref:../rgant/rgant.adoc#_rgant-ActionLayout_cssClassFa[`@ActionLayout#cssClassFa()`].
+For example:
 
+[source,java]
+----
+@ActionLayout(cssClassFa="refresh")
+public void renew() {
+    ...
+}
+----
+
+Alternatively, you can specify these hints dynamically in the 
xref:../ugvw/ugvw.adoc#_ugvw_layout[`Xxx.layout.xml`] for the entity:
 
-== Per pattern matching
+[source,xml]
+----
+<cpt:action id="renew" cssClassFa="refresh"/>
+----
 
 Rather than annotating every action with 
xref:../rgant/rgant.adoc#_rgant-ActionLayout_cssClassFa[`@ActionLayout#cssClassFa()`]
 and 
xref:../rgant/rgant.adoc#_rgant-ActionLayout_cssClass[`@ActionLayout#cssClass()`]
 you can instead specify the UI hint globally using regular expressions.
+Not only does this save a lot of boilerplate/editing, it helps ensure 
consistency across all actions.
 
-The xref:../rgcfg/rgcfg.adoc#_rgcfg_configuring-core[configuration property] 
`isis.reflector.facet.cssClassFa.patterns` is a comma separated list of 
key:value pairs, eg:
+To declare fa classes globally, use the 
xref:../rgcfg/rgcfg.adoc#_rgcfg_configuring-core[configuration property] 
`isis.reflector.facet.cssClassFa.patterns` (a comma separated list of key:value 
pairs).
+
+For example:
 
 [source,ini]
 ----
@@ -29,6 +46,7 @@ isis.reflector.facet.cssClassFa.patterns=\
                         new.*:fa-plus,\
                         add.*:fa-plus-square,\
                         create.*:fa-plus,\
+                        renew.*:fa-refresh,\
                         list.*:fa-list, \
                         all.*:fa-list, \
                         download.*:fa-download, \
@@ -37,10 +55,33 @@ isis.reflector.facet.cssClassFa.patterns=\
                         run.*:fa-bolt
 ----
 
-where the key is a regex matching action names (eg `create.*`) and the value 
is a link:http://fortawesome.github.io/Font-Awesome/icons/[font-awesome] icon 
name (eg `fa-plus`) to be applied (as per `@CssClassFa()`) to all action 
members matching the regex.
+Here:
+
+* the key is a regex matching action names (eg `create.*`), and
+* the value is a 
link:http://fortawesome.github.io/Font-Awesome/icons/[font-awesome] icon name
+
+For example, "fa-plus" is applied to all action members called "newXxx"
+
+
+
+== CSS
+
+Similarly, a CSS class can be specified for object members:
+
+* 
xref:../rgant/rgant.adoc#_rgant-ActionLayout_cssClass[`@ActionLayout#cssClass()`]
 for actions
+
+* 
xref:../rgant/rgant.adoc#_rgant-PropertyLayout_cssClass[`@PropertyLayout#cssClass()`]
 for properties, and
+
+* 
xref:../rgant/rgant.adoc#_rgant-CollectionLayout_cssClass[`@CollectionLayout#cssClass()`]
 for collections.
+
+Again, this CSS class will be attached to an appropriate containing `<div>` or 
`<span>` on the rendered page.
+
+Possible use cases for this is to highlight the most important properties of a 
domain object.
+
 
+It is also possible to specify CSS classes globally, using the 
xref:../rgcfg/rgcfg.adoc#_rgcfg_configuring-core[configuration property] 
`isis.reflector.facet.cssClass.patterns` configuration property.
 
-Similarly, the xref:../rgcfg/rgcfg.adoc#_rgcfg_configuring-core[configuration 
property] `isis.reflector.facet.cssClass.patterns` is a comma separated list of 
key:value pairs, eg:
+For example:
 
 [source,ini]
 ----
@@ -48,11 +89,9 @@ isis.reflector.facet.cssClass.patterns=\
                         delete.*:btn-warning
 ----
 
-where (again)the key is a regex matching action names (eg `delete.*`) and the 
value is a link:http://getbootstrap.com/css/[Bootstrap] CSS button class (eg 
`btn-warning) to be applied (as per `@CssClass()`) to all action members 
matching the regex.
+where (again):
 
-[TIP]
-====
-We strongly recommend that you use this technique rather than annotating each 
action with 
xref:../rgant/rgant.adoc#_rgant-ActionLayout_cssClassFa[`@ActionLayout#cssClassFa()`]
 or 
xref:../rgant/rgant.adoc#_rgant-ActionLayout_cssClass[`@ActionLayout#cssClass()`].
  Not only is the code more maintainable, you'll also find that it forces you 
to be consistent in your action names.
-====
+* the key is a regex matching action names (eg `delete.*`), and
+* the value is a link:http://getbootstrap.com/css/[Bootstrap] CSS button class 
(eg `btn-warning) to be applied
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/2693c5ce/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_ui-hints_object-titles-and-icons.adoc
----------------------------------------------------------------------
diff --git 
a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_ui-hints_object-titles-and-icons.adoc
 
b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_ui-hints_object-titles-and-icons.adoc
index fe0d4f6..87fb10d 100644
--- 
a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_ui-hints_object-titles-and-icons.adoc
+++ 
b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_ui-hints_object-titles-and-icons.adoc
@@ -247,7 +247,6 @@ public class OrderSubscriptions extends AbstractSubscriber {
 It is also possible for an object to return a 
xref:../rgcms/rgcms.adoc#_rgcms_methods_reserved_cssClass[CSS class].
 In conjunction with 
xref:../ugvw/ugvw.adoc#_ugvw_customisation_tweaking-css-classes[customized CSS] 
this can be used to apply arbitrary styling; for example each object could be 
rendered in a page with a different background colour.
 
-In fact, it is also possible to specify additional CSS for an object's members.
 
 
 === Declarative style
@@ -261,18 +260,6 @@ Or, when the domain object is rendered as a row in a 
collection, then the CSS cl
 One possible use case would be to render the most important object types with 
a subtle background colour: ``Customer``s shown in light green, or ``Order``s 
shown in a light pink, for example.
 
 
-Similarly, a CSS class can be specified for object members:
-
-* 
xref:../rgant/rgant.adoc#_rgant-ActionLayout_cssClass[`@ActionLayout#cssClass()`]
 for actions
-
-* 
xref:../rgant/rgant.adoc#_rgant-PropertyLayout_cssClass[`@PropertyLayout#cssClass()`]
 for properties, and
-
-* 
xref:../rgant/rgant.adoc#_rgant-CollectionLayout_cssClass[`@CollectionLayout#cssClass()`]
 for collections.
-
-Again, this CSS class will be attached to an appropriate containing `<div>` or 
`<span>` on the rendered page.
-
-Possible use cases for this is to highlight the most important properties of a 
domain object.
-
 
 === Imperative style
 

Reply via email to