Note: Any reference in this article to Mac OS X Server pertains to version 1.2, which was released prior to May 2001.
The Problem
There is a known problem in WebObjects 4 concerning the Wizard panel. When creating a WebObjects application with the Wizard, if you:
- Select "Java Client" as your application type
- Choose an EOModel file that contains cross-model relationships to another EOModel file
instead of giving the user the option of selecting a template, such as EOF Application Skeleton, Single Table, or Master-Detail, the Wizard will silently go straight to Project Builder. None of the ClientJava.subproj files will be generated.
The Workaround
To work around this bug and create a Java Client project that contains models with cross-model relationships, or models that reside in frameworks:
- Start Project Builder and create a new WebObjects Application with the New... menu command.
- Choose "None" for Available Assistance and "Java" as the Primary Language in the WebObjects Application Wizard.
- Remove the ClientSideJava.subproj that is automatically created when you create your project. Use the Delete command from Windows NT Explorer (if working on NT) or the Delete command in the File Viewer (if working with Mac OS X Server). You will not be able to delete this subproject from within Project.
- Create a new subproject named ClientSideJava of type EOJavaClient subproject with ProjectBuilder "New SubProject..." command.
- Go to the Interfaces class folder inside the ClientSideJava.subproject, and use Project Builder's File -> New in Project command to generate a new Interface file.
Please note that by convention, the interface file name in the ClientSideJava subproject is the same as the application name. For example, for an application named MyApp, your interface file should be named MyApp.nib. - Put the eomodel file you want to use into the Project Builder Resources folder.
- The WebObjects Java Client Interface Wizard will come up. You can now specify the EOModeler file to be used.
The wizard will create an English.lproj directory and the .nib file skeleton that you want.
Note: Please remember to add EOJavaClient.framework under the Frameworks directory of Project Builder; otherwise, your compilation will fail.