Child pages
  • How to add Diva "lite" to an existing WO app
Skip to end of metadata
Go to start of metadata

DirectToWeb for "CRUD" UI

If you require CRUD (i.e Create, Read, Update and Delete) functionality in your WebObjects application then look no further than DirectToWeb.
Diva look gives you the ability to tailor the theme of DirectToWeb to your existing application.

Steps

  1. Add the following frameworks to the project build path:
    • JavaDirectToWeb
    • JavaDTWGeneration
    • JavaEOProject
    • ERDirectToWeb
    • ERDivaliteLook
  2. Make your DirectAction class inherit from ERD2WDirectAction
    This will give you access to DirectToWeb pages via direct actions. See ERD2WDirectAction
  3. Insert a <div id="a">...</div> container for the page content in your PageWrapper.
    See How to Layout a Diva look page
  4. Include a global CSS theme in the PageWrapper template:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    	<head>
    		<webobject name = "Stylesheet"></webobject>
            ...
    	</head>
    	<body>
            ...
                <div id="a">
                     <webobject name = "ComponentContent" />
                </div>
            ...
            </body>
    </html>
    
    Definition:
    Stylesheet: ERXStyleSheet {
       filename = "d2w.css";
    }
    
    ComponentContent: WOComponentContent {}
    
  5. Add the user.d2wmodel and d2w.d2wmodel files to the project Resources folder.
  6. Clean & build

Now you may link actions in your application to D2W pageConfigs as per ERD2WDirectAction or via logic using the D2W factory API.