Wiki source code of How to add Diva "lite" to an existing WO app
Last modified by Ravi Mendis on 2012/02/11 08:08
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | === DirectToWeb for "CRUD" UI === | ||
| 2 | |||
| 3 | If you require CRUD (i.e Create, Read, Update and Delete) functionality in your WebObjects application then look no further than DirectToWeb. | ||
| 4 | Diva look gives you the ability to tailor the theme of DirectToWeb to your existing application. | ||
| 5 | |||
| 6 | === Steps === | ||
| 7 | |||
| 8 | 1. Add the following frameworks to the project build path: | ||
| 9 | 1*. {{code language="none"}}JavaDirectToWeb{{/code}} | ||
| 10 | 1*. {{code language="none"}}JavaDTWGeneration{{/code}} | ||
| 11 | 1*. {{code language="none"}}JavaEOProject{{/code}} | ||
| 12 | 1*. {{code language="none"}}ERDirectToWeb{{/code}} | ||
| 13 | 1*. {{code language="none"}}ERDivaliteLook{{/code}} | ||
| 14 | 1. Make your {{code language="none"}}DirectAction{{/code}} class inherit from {{code language="none"}}ERD2WDirectAction{{/code}} | ||
| 15 | This will give you access to DirectToWeb pages via direct actions. See [[ERD2WDirectAction>>url:http://wocommunity.org/documents/javadoc/wonder/legacy/er/directtoweb/ERD2WDirectAction.html||shape="rect"]] | ||
| 16 | 1. Insert a {{code language="none"}}<div id="a">...</div>{{/code}} container for the page content in your {{code language="none"}}PageWrapper{{/code}}. | ||
| 17 | See [[How to Layout a Diva look page>>doc:documentation.Home.Frameworks.ERDivaLook.How to set the Theme of a Diva Look app.Layout of a Diva Look Page.WebHome]] | ||
| 18 | 1. Include a global CSS theme in the {{code language="none"}}PageWrapper{{/code}} template: {{code 0="html"}}<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | ||
| 19 | <html> | ||
| 20 | <head> | ||
| 21 | <webobject name = "Stylesheet"></webobject> | ||
| 22 | ... | ||
| 23 | </head> | ||
| 24 | <body> | ||
| 25 | ... | ||
| 26 | <div id="a"> | ||
| 27 | <webobject name = "ComponentContent" /> | ||
| 28 | </div> | ||
| 29 | ... | ||
| 30 | </body> | ||
| 31 | </html>{{/code}} Definition: | ||
| 32 | 1. {{code}}Stylesheet: ERXStyleSheet { | ||
| 33 | filename = "d2w.css"; | ||
| 34 | } | ||
| 35 | |||
| 36 | ComponentContent: WOComponentContent {}{{/code}}Add the {{code language="none"}}user.d2wmodel{{/code}} and {{code language="none"}}d2w.d2wmodel{{/code}} files to the project {{code language="none"}}Resources{{/code}} folder. | ||
| 37 | 1. Clean & build | ||
| 38 | |||
| 39 | Now you may link actions in your application to D2W pageConfigs as per [[ERD2WDirectAction >>url:http://wocommunity.org/documents/javadoc/wonder/latest/er/directtoweb/ERD2WDirectAction.html||shape="rect"]]or via logic using the D2W factory API. |