Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Create a Project Templates directory

Image Modified
You need to create a "Project Templates" directory in ~/Library/Application Support/WOLips/

Download the D2JC Project Template

Image Modified
You can add new project templates to WOLips in addition to the built-in ones it ships with.

Go to http://wiki.objectstyle.org/confluence/display/WOL/WOLips+Project+TemplatesImage Removed in a web browser and download the D2JC Project Template.

Save the Project Template

Image Modified
Save the template .zip file in the Project Templates directory, then unzip it.

New Project from Template

Image Modified
Start Eclipse and Select File -> New -> Other... -> WOLips -> WOProject From Template

Select the template

Image Modified
Select Direct To Java Client WebStart Project from the list of Templates

Define Packages

Image Modified
Define the Java Packages for your project. One of the key concepts to understand with a Java Client appication is that there can be both client-side and server-side classes for each of your Entities. The incremental and Ant builders for the client-side classes specifically lookes for classes with "client" in their package name to determine if they should be part of the client-side classes, so make sure your Client-Side EOF Class Package includes "client" in it at some point.

Name your Project

Image Modified
Give it a name just like you would with any other WebObjects Application. Just click Finished here instead of "Next" as we will add your EOModel to the project later.

Launch the Application

Image Modified
Launch the Application just like any other WebObjects application.

Select the Application class

Image Modified
Select the Application class that is in your Base Package.

Missing EOModel Error

Image Modified
The application will launch like a Web Client WebObjects application, but instead of opening a Web browser and displaying the contents of the Main component, A D2JC application will call the client-side launch script that will automatically launch the Clent-Side application. Since we did not add an EOModel File to our project, WebObjects can't automatically create a Swing UI based on it, so we get this error instead.

Quit the Java Client Application

Image Modified
You will see that the Java Client application is a regular application with it's own menu bar and default options. You can quit the Java Client application by iether selecting Quit from the application menu, or by using the standard keyboard shortcut.

Quit the Server-Side Application

Image Modified
You notice that in Eclipse, the server-side appication is still running. When you quit the client side application, the server simply discarded any Objects associated with that instance of client-side application including Sessions, EditingContexts and EOs. You should now stop the server-side application.

Add an EOModel File

Image Modified
Drop an EOModel into the project's Resources directory.

Set WOLips to generate required files

Image Modified
In order for the EOAssistant to be able to modify the user.d2wmodel file in your project root, WOLips must write out both the PB.project and .xcodeproj files when it builds. Without these checked, the EOAssistant will modify the user.d2wmodel file in your project's build directory, which will get erased any time you clean your project.

...