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 2014/11/29 11:42:09 UTC
[3/3] isis git commit: ISIS-928: recreating todoapp archetype
ISIS-928: recreating todoapp archetype
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/f8b8fad9
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/f8b8fad9
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/f8b8fad9
Branch: refs/heads/master
Commit: f8b8fad97d6fee6147a792cd4ba9c92add4bc039
Parents: 834014f
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sat Nov 29 08:01:52 2014 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sat Nov 29 08:01:52 2014 +0000
----------------------------------------------------------------------
.../src/main/java/dom/todo/ToDoItem.layout.json | 19 +++++-----
.../integration/tests/ToDoItemIntegTest.java | 37 +++++++++-----------
.../src/main/webapp/WEB-INF/isis.properties | 25 ++++++++++---
.../projects/basic/archetype.properties | 2 +-
4 files changed, 49 insertions(+), 34 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/f8b8fad9/example/archetype/todoapp/src/main/resources/archetype-resources/dom/src/main/java/dom/todo/ToDoItem.layout.json
----------------------------------------------------------------------
diff --git a/example/archetype/todoapp/src/main/resources/archetype-resources/dom/src/main/java/dom/todo/ToDoItem.layout.json b/example/archetype/todoapp/src/main/resources/archetype-resources/dom/src/main/java/dom/todo/ToDoItem.layout.json
index 9f8fb30..0619d46 100644
--- a/example/archetype/todoapp/src/main/resources/archetype-resources/dom/src/main/java/dom/todo/ToDoItem.layout.json
+++ b/example/archetype/todoapp/src/main/resources/archetype-resources/dom/src/main/java/dom/todo/ToDoItem.layout.json
@@ -23,13 +23,13 @@
"members": {
"description": {
"typicalLength": { "value": 50 },
- "labelAt": { "value": "TOP" }
+ "propertyLayout": { "labelPosition": "TOP" }
},
"category": {
- "labelAt": { "value": "TOP" }
+ "propertyLayout": { "labelPosition": "TOP" }
},
"subcategory": {
- "labelAt": { "value": "NONE" },
+ "propertyLayout": { "labelPosition": "NONE" },
"actions": {
"updateCategory": {
"named": {
@@ -37,9 +37,8 @@
}
},
"analyseCategory": {
- "cssClassFa": {
- "value": "fa fa-pie-chart"
- }
+ "cssClass": { "value": "btn-default" },
+ "cssClassFa": { "value": "fa fa-pie-chart" }
}
}
},
@@ -53,6 +52,7 @@
"describedAs": {
"value": "Update this todo item as complete"
},
+ "cssClass": { "value": "btn-success" },
"cssClassFa": { "value": "fa fa-thumbs-up" }
},
"notYetCompleted": {
@@ -60,6 +60,7 @@
"describedAs": {
"value": "Update this todo item as not yet complete"
},
+ "cssClass": { "value": "btn-info" },
"cssClassFa": { "value": "fa fa-thumbs-down" }
},
"scheduleExplicitly": {
@@ -125,7 +126,7 @@
"hidden": {
"where": "ALL_TABLES"
},
- "labelAt": { "value": "TOP" }
+ "propertyLayout": { "labelPosition": "TOP" }
},
"attachment": {
"hidden": {
@@ -151,10 +152,11 @@
"disabled": {},
"actions": {
"add":{
+ "cssClass": { "value": "btn-default" },
"cssClassFa": { "value": "fa fa-plus-square" }
},
"remove": {
- "cssClass": { "value": "x-caution btn-danger" },
+ "cssClass": { "value": "x-caution btn-default" },
"cssClassFa": { "value": "fa fa-minus-square" }
}
},
@@ -190,6 +192,7 @@
"describedAs": {
"value": "Create a new todo item from this one"
},
+ "cssClass": { "value": "btn-default" },
"cssClassFa": { "value": "fa fa-copy fa-lg" }
}
}
http://git-wip-us.apache.org/repos/asf/isis/blob/f8b8fad9/example/archetype/todoapp/src/main/resources/archetype-resources/integtests/src/test/java/integration/tests/ToDoItemIntegTest.java
----------------------------------------------------------------------
diff --git a/example/archetype/todoapp/src/main/resources/archetype-resources/integtests/src/test/java/integration/tests/ToDoItemIntegTest.java b/example/archetype/todoapp/src/main/resources/archetype-resources/integtests/src/test/java/integration/tests/ToDoItemIntegTest.java
index 68c2619..0d1c904 100644
--- a/example/archetype/todoapp/src/main/resources/archetype-resources/integtests/src/test/java/integration/tests/ToDoItemIntegTest.java
+++ b/example/archetype/todoapp/src/main/resources/archetype-resources/integtests/src/test/java/integration/tests/ToDoItemIntegTest.java
@@ -61,7 +61,6 @@ import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
public class ToDoItemIntegTest extends AbstractToDoIntegTest {
@@ -269,17 +268,16 @@ public class ToDoItemIntegTest extends AbstractToDoIntegTest {
}
@Test
- public void subscriberThrowingOtherExceptionIsIgnored() throws Exception {
+ public void subscriberVetoesEventWithAnyOtherException() throws Exception {
// given
toDoItemSubscriptions.subscriberBehaviour(ToDoItemSubscriptions.Behaviour.AnyExecuteVetoWithOtherException);
+ // then
+ expectedExceptions.expect(RuntimeException.class);
+
// when
toDoItem.completed();
-
- // then
- // (no expectedExceptions setup, expect to continue)
- assertTrue(true);
}
}
@@ -572,17 +570,16 @@ public class ToDoItemIntegTest extends AbstractToDoIntegTest {
}
@Test
- public void subscriberThrowingOtherExceptionIsIgnored() throws Exception {
+ public void subscriberVetoesEventWithAnyOtherException() throws Exception {
// given
toDoItemSubscriptions.subscriberBehaviour(ToDoItemSubscriptions.Behaviour.AnyExecuteVetoWithOtherException);
+ // then
+ expectedExceptions.expect(RuntimeException.class);
+
// when
toDoItem.add(otherToDoItem);
-
- // then
- // (no expectedExceptions setup, expect to continue)
- assertTrue(true);
}
}
public static class Remove extends ToDoItemIntegTest {
@@ -670,17 +667,16 @@ public class ToDoItemIntegTest extends AbstractToDoIntegTest {
}
@Test
- public void subscriberThrowingOtherExceptionIsIgnored() throws Exception {
+ public void subscriberVetoesEventWithAnyOtherException() throws Exception {
// given
toDoItemSubscriptions.subscriberBehaviour(ToDoItemSubscriptions.Behaviour.AnyExecuteVetoWithOtherException);
+ // then
+ expectedExceptions.expect(RuntimeException.class);
+
// when
toDoItem.remove(otherToDoItem);
-
- // then
- // (no expectedExceptions setup, expect to continue)
- assertTrue(true);
}
}
}
@@ -911,17 +907,16 @@ public class ToDoItemIntegTest extends AbstractToDoIntegTest {
@Test
- public void subscriberThrowingOtherExceptionIsIgnored() throws Exception {
+ public void subscriberVetoesEventWithAnyOtherException() throws Exception {
// given
toDoItemSubscriptions.subscriberBehaviour(ToDoItemSubscriptions.Behaviour.AnyExecuteVetoWithOtherException);
+ // then
+ expectedExceptions.expect(RuntimeException.class);
+
// when
toDoItem.setDescription("Buy bread and butter");
-
- // then
- // (no expectedExceptions setup, expect to continue)
- assertTrue(true);
}
http://git-wip-us.apache.org/repos/asf/isis/blob/f8b8fad9/example/archetype/todoapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/isis.properties
----------------------------------------------------------------------
diff --git a/example/archetype/todoapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/isis.properties b/example/archetype/todoapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/isis.properties
index f91fa59..6375e06 100644
--- a/example/archetype/todoapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/isis.properties
+++ b/example/archetype/todoapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/isis.properties
@@ -102,17 +102,34 @@ ${symbol_pound}
${symbol_pound} patterns for applying CssClassFa facet (font-awesome icons) to member names
${symbol_pound}
isis.reflector.facet.cssClassFa.patterns=${symbol_escape}
+ new.*:fa-plus,${symbol_escape}
+ add.*:fa-plus-square,${symbol_escape}
create.*:fa-plus,${symbol_escape}
update.*:fa-edit,${symbol_escape}
- add.*:fa-plus-square,${symbol_escape}
+ change.*:fa-edit,${symbol_escape}
remove.*:fa-minus-square,${symbol_escape}
move.*:fa-exchange,${symbol_escape}
first.*:fa-star,${symbol_escape}
find.*:fa-search,${symbol_escape}
+ lookup.*:fa-search,${symbol_escape}
clear.*:fa-remove,${symbol_escape}
previous.*:fa-step-backward,${symbol_escape}
next.*:fa-step-forward,${symbol_escape}
- list.*:fa-list
+ list.*:fa-list, ${symbol_escape}
+ all.*:fa-list, ${symbol_escape}
+ download.*:fa-download, ${symbol_escape}
+ upload.*:fa-upload, ${symbol_escape}
+ execute.*:fa-bolt, ${symbol_escape}
+ run.*:fa-bolt, ${symbol_escape}
+ calculate.*:fa-calculator, ${symbol_escape}
+ verify.*:fa-check-circle, ${symbol_escape}
+ refresh.*:fa-refresh, ${symbol_escape}
+ install.*:fa-wrench
+
+isis.reflector.facet.cssClass.patterns=${symbol_escape}
+ delete.*:btn-warning,${symbol_escape}
+ .*:btn-primary
+
${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbo
l_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}
${symbol_pound}
@@ -212,5 +229,5 @@ ${symbol_pound}
${symbol_pound}isis.viewers.paged.standalone=30
${symbol_pound}isis.viewers.paged.parented=10
-${symbol_pound}isis.viewers.labelAt.property=LEFT
-${symbol_pound}isis.viewers.labelAt.parameter=LEFT
+${symbol_pound}isis.viewers.propertyLayout.labelPosition=LEFT
+${symbol_pound}isis.viewers.parameterLayout.labelPosition=LEFT
http://git-wip-us.apache.org/repos/asf/isis/blob/f8b8fad9/example/archetype/todoapp/src/test/resources/projects/basic/archetype.properties
----------------------------------------------------------------------
diff --git a/example/archetype/todoapp/src/test/resources/projects/basic/archetype.properties b/example/archetype/todoapp/src/test/resources/projects/basic/archetype.properties
index 16ccd95..7a99f8b 100644
--- a/example/archetype/todoapp/src/test/resources/projects/basic/archetype.properties
+++ b/example/archetype/todoapp/src/test/resources/projects/basic/archetype.properties
@@ -1,4 +1,4 @@
-#Thu Nov 20 12:18:13 CET 2014
+#Sat Nov 29 08:01:46 GMT 2014
package=it.pkg
version=0.1-SNAPSHOT
groupId=archetype.it