Re: D2W Rule Question? - Doh.
Re: D2W Rule Question? - Doh.
- Subject: Re: D2W Rule Question? - Doh.
- From: James Cicenia <email@hidden>
- Date: Wed, 23 Aug 2006 12:21:05 -0500
Well --
After coming back to this with a fresh mind... my pageName value was
missing the Java package prefix. I use eclipse.
Things are working like a charm now...
thanks for reassuring me about the rule nomenclature. "pageName" for
a drop-in "component" just seemed wrong.
James
On Aug 22, 2006, at 8:27 PM, Travis Cripps wrote:
Thanks, James. I'm sorry to hear that didn't work for you. I
built a simple application and it did work for me. Maybe you can
share a little more of your bindings?
When you use a dropin component, it does nothing more than use a
WOSwitchComponent and lets the D2W rule engine determine the
correct component to display, based on the values of the bindings
you gave it. The dropins just have their task hard-wired.
Here's what I did:
- Created a copy of the WOLQueryPageComponent, and change a couple
of things, and called it "MyQueryComponent". MyQueryComponent is
a subclass of D2WQueryPage.
- Created a SearchPage component, defined an EODatabaseDataSource
for my entity, and dropped in the D2WQuery component from the D2W
palette in WOBuilder. Wired up the required bindings
(queryDataSource and entityName). I didn't use the
pageConfiguration binding, but I don't think that's relevant,
unless you did, and your rules are telling it which pageName to use
for the specific pageConfiguration.
- Opened my user.d2wmodel file and entered the rule as described:
(task = 'query') => Priority: 100
Class: com.webobjects.directtoweb.Assignment
Key: pageName
Value: "MyQueryComponent"
- Built the project, ran it, and when I went to the search page, it
showed my custom query component. Tested it and it "Just Works™". :P
You may need to try a higher priority for your rules? Certainly
your rule file is more complex than mine. Also, you might try to
turn on D2W rule tracing to debug which rules are being "fired" as
your application evaluates the d2wmodel. Just set the
D2WTraceRuleFiringEnabled = true property either in your Properties
file or as an argument to your executable, and you'll see probably
more than you ever wanted to see about which rules fire to run your
app.
Travis
On Aug 22, 2006, at 4:40 PM, James Cicenia wrote:
Travis -
Good to see you are around still.
That didn't work. I am using the drop-in component not the page
component. I did peruse all the rules I could find and I could not
find where it references the WOQuery component. Still brings up
the apple's standard component and not mine.
Any other thoughts?
Thanks
James
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40jimijon.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden