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/10/07 09:22:21 UTC
[2/2] isis git commit: ISIS-1007: updates to docs
ISIS-1007: updates to docs
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/7ecb9485
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/7ecb9485
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/7ecb9485
Branch: refs/heads/master
Commit: 7ecb94853cb564f6f4909ff47a69a63a566127f9
Parents: ecc3262
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Oct 7 08:20:20 2015 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Oct 7 08:20:20 2015 +0100
----------------------------------------------------------------------
.../guides/_rg_annotations_manpage-Action.adoc | 14 ++++++++++++--
.../guides/_rg_services-api_manpage-Scratchpad.adoc | 6 ++++--
.../_ug_restfulobjects-viewer_hints-and-tips.adoc | 10 +++++++---
.../_ug_wicket-viewer_features_bookmarked-pages.adoc | 5 +++--
4 files changed, 26 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/7ecb9485/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-Action.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-Action.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-Action.adoc
index 0079b56..13844d9 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-Action.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_annotations_manpage-Action.adoc
@@ -73,9 +73,13 @@ Currently this is only supported for no-arg actions.
|whether the action is only available in prototyping mode, or whether it is available also in production mode.
|xref:rg.adoc#_rg_annotations_manpage-Action_semantics[`semantics()`]
-|`SAFE_AND_REQUEST_CACHEABLE`, `SAFE`, `IDEMPOTENT`, `NON_IDEMPOTENT` +
+|`SAFE_AND_REQUEST_CACHEABLE`, `SAFE`, +
+`IDEMPOTENT`, `IDEMPOTENT_ARE_YOU_SURE` +
+`NON_IDEMPOTENT`, `NON_IDEMPOTENT_ARE_YOU_SURE` + +
(`NON_IDEMPOTENT`)
-|the action's semantics (ie whether objects are modified as the result of invoking this action, and if so whether reinvoking the action would result in no further change; if not whether the results can be cached for the remainder of the request)
+|the action's semantics (ie whether objects are modified as the result of invoking this action, and if so whether reinvoking the action would result in no further change; if not whether the results can be cached for the remainder of the request).
+
+The `...ARE_YOU_SURE` variants (1.10.0-SNAPSHOT) cause a confirmation dialog to be displayed in the xref:ug.adoc#_ug_wicket-viewer[Wicket viewer].
|xref:rg.adoc#_rg_annotations_manpage-Action_typeOf[`typeOf()`]
|(none)
@@ -118,6 +122,12 @@ public class ToDoItem {
+[NOTE]
+====
+Currently are you sure semantics (1.10.0-SNAPSHOT) only work for actions that take one or more parameters (that is, generate a dialog).
+====
+
+
include::_rg_annotations_manpage-Action_command.adoc[leveloffset=+1]
http://git-wip-us.apache.org/repos/asf/isis/blob/7ecb9485/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-Scratchpad.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-Scratchpad.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-Scratchpad.adoc
index b4ce0b4..6ff24de 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-Scratchpad.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_services-api_manpage-Scratchpad.adoc
@@ -43,8 +43,10 @@ For example, the Isis addons example https://github.com/isisaddons/isis-app-todo
[source,java]
----
-@ActionSemantics(Of.SAFE)
-@Bulk(AppliesTo.BULK_ONLY)
+@Action(
+ semantics=SemanticsOf.SAFE,
+ invokeOn=InvokeOn.COLLECTION_ONLY
+)
public BigDecimal totalCost() {
BigDecimal total = (BigDecimal) scratchpad.get("runningTotal");
if(getCost() != null) {
http://git-wip-us.apache.org/repos/asf/isis/blob/7ecb9485/adocs/documentation/src/main/asciidoc/guides/_ug_restfulobjects-viewer_hints-and-tips.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ug_restfulobjects-viewer_hints-and-tips.adoc b/adocs/documentation/src/main/asciidoc/guides/_ug_restfulobjects-viewer_hints-and-tips.adoc
index b321d1a..52a74cd 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ug_restfulobjects-viewer_hints-and-tips.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ug_restfulobjects-viewer_hints-and-tips.adoc
@@ -34,9 +34,13 @@ Suppose you have a `CustomerService` providing a `findCustomer` action:
[source,java]
----
public class CustomerService {
- public String id() { return "customers"; }
- @ActionSemantics(Of.SAFE)
- public Customer findCustomer(@Named("customerName") String customerName) { ... }
+ public String id() { return "customers"; }
+ @Action(semantics=SemanticsOf.SAFE)
+ public Customer findCustomer(
+ @ParameterLayout(named="customerName")
+ final String customerName) {
+ ...
+ }
}
----
http://git-wip-us.apache.org/repos/asf/isis/blob/7ecb9485/adocs/documentation/src/main/asciidoc/guides/_ug_wicket-viewer_features_bookmarked-pages.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ug_wicket-viewer_features_bookmarked-pages.adoc b/adocs/documentation/src/main/asciidoc/guides/_ug_wicket-viewer_features_bookmarked-pages.adoc
index 530f4df..76e2b28 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ug_wicket-viewer_features_bookmarked-pages.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ug_wicket-viewer_features_bookmarked-pages.adoc
@@ -64,11 +64,12 @@ To indicate that a safe (query only) action is bookmarkable, use the xref:rg.ado
[source,java]
----
public class ToDoItem ... {
- ...
+ @Action(
+ semantics=SemanticsOf.SAFE
+ )
@ActionLayout(
bookmarking=BookmarkPolicy.AS_ROOT
)
- @ActionSemantics(Of.SAFE)
public List<ToDoItem> notYetComplete() { ... }
...
}