All,

For those of you who are having difficulties embedding D2W components,
like me, here are a few steps glossed over in the documentation...

More Embedding Steps

(1) Create a new app from scratch and in the wizard select "Direct to
Web". This will set up all the D2W stuff in your project. (I don't have
any advise for those of you who want to add D2W components to an
existing non-D2W WebObjects app).

(2) To use your own page after the login page, implement Main.java's
defaultPage() method to return your page.

(3) Create a new Web Component, open the D2W palette, and drag over the
D2W componet you want (it may need to be placed inside a WOForm, I don't
have time to verify this).

(4) Refer to the Direct to Web documentation, in the WO Tools &
Techniques book, for which attributes of the D2W component that need to
be set. In all cases, the entityName attribute needs to be set to your
class name (including quotes).

(5) You may have to create a WODisplayGroup and bind the D2W's
dataSource to the WODisplayGroup's dataSource, if for example, you want
the results of a query to display in a D2WList or D2WSelect component.

(6) You may need to implement action methods to do something other than
the default, for example, when the query or select buttons are clicked.

(7) You will need to launch the Web assistant via the appletviewer (copy
and paste the "appletviewer..." command from the Launch Panel to a
shell). The Web assistant will NOT know which page you are looking at,
so you'll have to use the Expert mode to select the Entity and D2W
component. Also, the Save and Update will not automatically refresh the
page in your browser, so push the Refresh button after an update.

Otherwise, embedding D2W components is pretty niffty! An added "feature"
is that any hyperlinks in D2W components open additional D2W generated
pages (clicking on a link might open an Inspect page). Well, I hope you
think this is a feature!

- Nancy

Nancy Craighill
Blue Comet Enterprises

Reply via email to