Changes for page Your First D2W Project

Last modified by Bastian Triller on 2013/01/12 00:43

From version 10.1
edited by Pascal Robert
on 2012/08/05 07:20
Change comment: There is no comment for this version
To version 11.1
edited by Pascal Robert
on 2012/08/09 05:09
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -208,3 +208,19 @@
208 208  * modifying the order of attributes when viewing or editing a blog entry so that the title field is the first field, followed by content, the two dates and the author
209 209  
210 210  Those two customizations can be done by adding D2W rules. The D2W rules are in two files, located in the **Resources** folder, **d2w.d2wmodel** and **user.d2wmodel**. To edit the files, make sure you installed RulesModeler, a Mac application that manages D2W rule files. If RuleModeler is present, you can simply double-click on **d2w.d2wmodel** and the file will open in RulesModeler.
211 +
212 +The first rule we need to add is a rule to specify that the //richTextMode// will be _ simpleRichTextMode//, which is a built-in definition that will put TinyMCE in a simple configuration. Create the **New** button in RulesModeler, and the rule must looks like this~://
213 +
214 +[[image:Capture d’écran 2012-08-05 à 07.22.43.png||border="1"]]
215 +
216 +The next rule will specify that we want to use the [[EREditHTML>>http://jenkins.wocommunity.org/job/Wonder/lastSuccessfulBuild/javadoc/er/directtoweb/components/strings/ERDEditHTML.html]] component for the //content// attribute. Again, click **New** in RulesModeler, and add this rule:
217 +
218 +[[image:Capture d’écran 2012-08-05 à 07.29.12.png||border="1"]]
219 +
220 +Last rule: when we want to inspect or edit the blog entry, we want to change how the attributes are displayed, so add this new rule:
221 +
222 +[[image:Capture d’écran 2012-08-05 à 07.30.15.png||border="1"]]
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
225 +
226 +Congratulations, you are done with the D2W tutorial [[The next tutorial is about creating a stateful application>>documentation:Your First Stateful Project]].