D2W Question
D2W Question
- Subject: D2W Question
- From: Michael Parlee <email@hidden>
- Date: Thu, 23 Sep 2004 11:02:44 -0700
I have a short term project that I'm trying to do entirely in D2W. I'm using ProjectWONDER's ERD2W package, which has been great so far.
The problem that I've run into at the moment stems from a user specification for "click anywhere to navigate" list pages that when narrowed down to a single record show list views of all the relationships within that record.
Do pull this off I've added a repetition beneath the main list to iterate over each relationship in the parent entity. I've wrapped it with a conditional so that it only iterates when the parent result set is a single record. Within the repetition I have placed a D2WList that I pass a list of records to from the currentRelationship. Now, if you haven't guessed yet the problem is recursion. The D2WList uses whichever list page is set as the default which in this case is my "NavListPage". If a relationship yields a single record, it recurses and brings down the app.
To fix that problem, I decided to make a new task called "embeddedList". I subclassed D2WList and modified the task in the component to "embeddedList" from "list". I created an "EmbeddedNavList" component and removed the relationship iteration from it. I created rules as follows:
(task = 'embeddedList') => displayKeyProperties = "defaultPropertyKeysFromEntityWithoutRelationships" [com.webobjects.directtoweb.DefaultAssignment]
(task = 'embeddedList') => pageAvailable = "EmbeddedNavListPage"
(task = 'embeddedList') => pageName = "EmbeddedNavListPage"
I saved these rules in d2w.d2wmodel in my project directory.
When I test this I get the following error:
<x-tad-bigger>ERROR 23:36:00 (er.extensions.ERXApplication:486) -Exception caught: Error - could not find any rule that returns a pageName using the current context <D2WContext task=embeddedList, entity=HetCompound, propertyKey=null, pageConfiguration=null></x-tad-bigger><x-tad-bigger>
</x-tad-bigger>It looks like it doesn't see my pageName assignment and I've tried moving the rules to different d2wmodels but none seem to work any better. If anyone recognizes what I've done wrong please let me know!
Thanks,
Mike
_______________________________________________
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