Changes for page Your First D2W Project
Last modified by Bastian Triller on 2013/01/12 00:43
From version 15.1
edited by Pascal Robert
on 2012/08/05 14:29
on 2012/08/05 14:29
Change comment:
There is no comment for this version
To version 16.1
edited by Steve Peery
on 2013/01/12 00:38
on 2013/01/12 00:38
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki.p robert1 +XWiki.speery - Content
-
... ... @@ -138,8 +138,18 @@ 138 138 139 139 {{/code}} 140 140 141 - The first arraydefineswhatthetoplevelnavigationis goingto be, andthis is where we define the twotabs (the //childrenChoice//dictionary).After that, wedefine the other partsof thenavigation. Yousee referencesto //action= session.navController//. Thisis the action (method) that will be calledfor thespecifiednavigationelement, so let's create those methods inthe **MainNavigationController** class.141 +Add the following method in the **Session** class for the navigation root. 142 142 143 +{{code}} 144 + 145 +public String navigationRootChoice() { 146 + return "home"; 147 +} 148 + 149 +{{/code}} 150 + 151 +The first array in the plist defines what the top level navigation is going to be, and this is where we define the two tabs (the //childrenChoice// dictionary). After that, we define the other parts of the navigation. You see references to //action = session.navController//. This is the action (method) that will be called for the specified navigation element, so let's create those methods in the **MainNavigationController** class. 152 + 143 143 The first method we will implement in **MainNavigationController** is a generic method to list objects for a specific entity. 144 144 145 145 {{code language="java"}} ... ... @@ -195,9 +195,9 @@ 195 195 196 196 Save the file and run the app. 197 197 198 -After login, you will see the blog entries and if you click the **Authors** tab, you see the list of authors. Each item in the list ha ve3 actions by default: **Inspect** (view the object), **Edit** (modify the object) and the red X button to delete the object.208 +After login, you will see the blog entries and if you click the **Authors** tab, you see the list of authors. Each item in the list has 3 actions by default: **Inspect** (view the object), **Edit** (modify the object) and the red X button to delete the object. 199 199 200 -Click **Edit** on an author, and you will see that it display not only the author's details but also blog entries created for that user. You can even create a new blog entry directly from the author. 210 +Click **Edit** on an author, and you will see that it displays not only the author's details but also blog entries created for that user. You can even create a new blog entry directly from the author. 201 201 202 202 Now, edit a blog entry. If you click on the field next to the **Creation Date** or **Last Modified**, a calendar widget appears because those two fields are marked as dates in the data model, that's EOF and D2W magic at work. 203 203 ... ... @@ -221,6 +221,6 @@ 221 221 222 222 [[image:Capture d’écran 2012-08-05 à 07.30.15.png||border="1"]] 223 223 224 -We are done. Save the file in RulesModeler, and run the application again. Try editing a blog entry and you will notice that we know have a rich editor for the content and that the ordering of the fields is different, without having to change the HTML or the Java code !234 +We are done. Save the file in RulesModeler, and run the application again. Try editing a blog entry and you will notice that we know have a rich editor for the content and that the ordering of the fields is different, without having to change the HTML or the Java code 225 225 226 -Congratulations, you are done with the D2W tutorial !236 +Congratulations, you are done with the D2W tutorial [[The next tutorial is about creating a stateful application>>documentation:Your First Stateful Project]].