Real stuck following D2J example (again)
Real stuck following D2J example (again)
- Subject: Real stuck following D2J example (again)
- From: Ray Ackland <email@hidden>
- Date: Wed, 3 Sep 2003 10:57:04 +1200
Trying to follow the example to incorporate nib based interfaces in a
D2J app. There are a few problems I am encountering though. Hopefully
someone else has also tried this and succeeded, and can tell me what to
do.
The example is at:
http://developer.apple.com/documentation/WebObjects/
DesktopApplications/T7MixingStaticAndDyn/index.html
or in the PDF Inside WebObjects:Java Client Desktop Applications (p287).
Here are the steps I follow. Please note that I will be referring to an
entity called "Client", and this is not a mistaken reference to mean
client side class:
1) Using a basic OpenBase db, only one table, I create an EOModel with
no frills.
2) I create a new D2J template application, adding the above EOModel.
3) I run the application to make sure it all works (it does).
4) I add a Java Client Interface file (called testNib in package
test.client) to the project, put some text fields in the window in the
nib file.
5) Then start following the example:
a) ignore most of the first part of the (contradicting) instructions
as the nib file already contains the class
com.webobjects.eogeneration.EOFormController. This is descended from
com.webobjects.eogeneration.EOEditingContext, rather than the stated
com.webobjects.eoapplication.EOInterfaceController. Is this going to be
a problem (and how to get around it)?
b) set File's owner class to the EOFormController. Save nib file as
document format (rather that default) but this doesn't seem to have an
effect.
c) create a new d2wmodel file, with two rules in it (shown below) and
add it to the application server target
i) ((task = 'form') and (entity.name = 'Client') and (controllerType
= 'entityController')) => archive=test.client.testNibInterfaceController
ii) ((task = 'form') and (entity.name = 'Client') and (controllerType
= 'entityController')) => generateSubcontrollers=false
Question: Does this package of the nib file controller class need to be
in the same package as your client side custom classes (I am using no
custom classes in this test)? Also, is the original
testNibInterfaceController.java file get used anymore, now that I have
changed the owner class in the nib file?
When I run my new contraption, the query window comes up as normal, but
when I go to open a client nothing happens - the open button goes dark
while the cursor is over it, but no other window opens.
I can see the expected rules firing (as defined in the d2w.d2wmodel
file) only on the first time I try to open a Client form window.
I am using Dec 2002 tools (PB 2.1, IB2.3.2, RuleEditor 5.2 v1.1) on OS
X 10.2.6 with Java 1.3.1.
Help!! Any suggestions?
Ray.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.