To answer your first question.  No I haven't modified 
ERDDefaultDisplayNameAssignment...  and the keys looks like what you have below.

As far as Wonder goes.  I haven't modified it and I'm working off the 
integration branch.  I did a pull sometime today hoping that would fix it.

Thanks,

Johnny

On Mar 14, 2013, at 4:50 PM, Ramsey Gurley <[email protected]> wrote:

> Hmm, even that probably shouldn't be happening. In 
> ERD2WModel.prepareDataStructures, it looks like it should be adding 
> propertyKey as a dependentKey because one of your rules for that RHS is using 
> the DefaultAssignment. What version of wonder are you running and have you 
> modified it?
> 
> Ramsey
> 
> On Mar 14, 2013, at 7:35 PM, Ramsey Gurley wrote:
> 
>> Well now, that's odd. Look at your dependent keys. There's no propertyKey in 
>> there, just session.language, task, entity, and pageConfiguration. But you 
>> are using ERDDefaultDisplayNameAssignment and that should be returning 
>> propertyKey as a dependent key for displayNameForProperty. 
>> 
>> Look at the top of your copy of that class and see if you see:
>> 
>> protected static final NSDictionary keys =
>> ...
>> new NSArray(new Object[] {"pageConfiguration", "task", "entity.name"}), 
>> "displayNameForPageConfiguration",
>> ...
>> new NSArray(new Object[] {"propertyKey"}), "displayNameForProperty",
>> 
>> in the keys dictionary. It looks like you are getting the keys for 
>> displayNameForPageConfiguration instead of displayNameForProperty. Have you 
>> modified that assignment class?
>> 
>> If the dictionary looks right, I would put a conditional breakpoint into 
>> ERDDefaultDisplayNameAssignment .dependentKeys() where keypath == 
>> displayNameForProperty and see how it's returning the wrong answer.
>> 
>> Ramsey
>> 
>> On Mar 14, 2013, at 6:23 PM, Johnny Miller wrote:
>> 
>>> Hi Ramsey,
>>> 
>>> Not sure if this makes any sense to you or not.  But I added the debug flag 
>>> for displayNameForProperty...
>>> 
>>> Mar 14 15:19:17 KMIWebCMSApp_1[5570] DEBUG 
>>> er.directtoweb.rules.propertyNameComponentName.fire (null) - FIRE: 
>>> propertyNameComponentName for propertyKey: name depends on: () = 
>>> propertyNameComponentName) value: KMID2WPropertyName
>>> Mar 14 15:19:17 KMIWebCMSApp_1[5570] DEBUG 
>>> er.directtoweb.rules.displayNameForProperty.fire (null) - CANDIDATES for 
>>> keyPath: displayNameForProperty
>>>         10 : *true* => displayNameForProperty = 
>>> <ERDDefaultDisplayNameAssignment> 
>>> [er.directtoweb.assignments.defaults.ERDDefaultDisplayNameAssignment] 
>>> (10000) From: ERDirectToWeb/Resources
>>>          0 : *true* => displayNameForProperty = 
>>> defaultDisplayNameForProperty 
>>> [com.webobjects.directtoweb.DefaultAssignment] (0) From: 
>>> JavaDirectToWeb.framework/Resources
>>> 
>>> Mar 14 15:19:17 KMIWebCMSApp_1[5570] DEBUG 
>>> er.directtoweb.rules.displayNameForProperty.fire (null) - FIRE: 
>>> displayNameForProperty for propertyKey: name depends on: 
>>> ("session.language", "task", "entity", "pageConfiguration") = English, 
>>> inspect, KMIWebRealm, <NULL>, displayNameForProperty) value: Name
>>> Mar 14 15:19:17 KMIWebCMSApp_1[5570] DEBUG 
>>> er.directtoweb.rules.propertyNameComponentName.cache (null) - CACHE: 
>>> propertyNameComponentName for propertyKey: domainName depends on: () = 
>>> propertyNameComponentName) value: KMID2WPropertyName
>>> Mar 14 15:19:17 KMIWebCMSApp_1[5570] DEBUG 
>>> er.directtoweb.rules.displayNameForProperty.cache (null) - CACHE: 
>>> displayNameForProperty for propertyKey: domainName depends on: 
>>> ("session.language", "task", "entity", "pageConfiguration") = English, 
>>> inspect, KMIWebRealm, <NULL>, displayNameForProperty) value: Name
>>> Mar 14 15:19:17 KMIWebCMSApp_1[5570] DEBUG 
>>> er.directtoweb.rules.propertyNameComponentName.cache (null) - CACHE: 
>>> propertyNameComponentName for propertyKey: uniqueIdentifier depends on: () 
>>> = propertyNameComponentName) value: KMID2WPropertyName
>>> Mar 14 15:19:17 KMIWebCMSApp_1[5570] DEBUG 
>>> er.directtoweb.rules.displayNameForProperty.cache (null) - CACHE: 
>>> displayNameForProperty for propertyKey: uniqueIdentifier depends on: 
>>> ("session.language", "task", "entity", "pageConfiguration") = English, 
>>> inspect, KMIWebRealm, <NULL>, displayNameForProperty) value: Name
>>> 
>>> See how the bolded parts come up with the same value???  I just don't get 
>>> it...
>>> 
>>> 
>>> On Mar 14, 2013, at 3:11 PM, Johnny Miller <[email protected]> wrote:
>>> 
>>>> My mistake I got WOLToolbar confused with ERD2WDebugFlags...
>>>> 
>>>> I can see the rule gets properly set for propertyNameComponentName
>>>> 
>>>> Mar 14 15:09:02 KMIWebCMSApp_1[5570] DEBUG 
>>>> er.directtoweb.rules.propertyNameComponentName.fire (InspectKMIWebRealm) - 
>>>> CANDIDATES for keyPath: propertyNameComponentName
>>>>        20 : (look = 'KMINativeLook') => propertyNameComponentName = 
>>>> KMID2WPropertyName (20001) From: KMINativeLook/Resources
>>>>        20 : *true* => propertyNameComponentName = ERD2WPropertyName 
>>>> (20000) From: ERDirectToWeb/Resources
>>>> 
>>>> 
>>>> On Mar 14, 2013, at 2:55 PM, Johnny Miller <[email protected]> wrote:
>>>> 
>>>>> OK.  it's a bit of pain to get this going because I'm on the MooTools 
>>>>> framework and apparently WOLToolbar is incompatible with it ( the JS 
>>>>> breaks >:( )
>>>>> 
>>>>> I can go to the direct action page and set the values you show in the 
>>>>> video.  Is there another way to clear the cache other than the 
>>>>> WOLToolbar?  I didn't see any rules getting written to the console after 
>>>>> adding the displayNameForPageConfiguration setting on the log4j settings 
>>>>> page.
>>>>> 
>>>>> Johnny
>>>>> 
>>>>> On Mar 14, 2013, at 2:26 PM, Ramsey Gurley <[email protected]> 
>>>>> wrote:
>>>>> 
>>>>>> Ewwww gross. Kill it. Kill it with fire :P That's Apple's rule logger. 
>>>>>> It's useless. It doesn't tell you candidates. It doesn't tell you cached 
>>>>>> values. All it tells you is what fired. Do what I told you earlier. 
>>>>>> Watch the video here. 
>>>>>> 
>>>>>> http://wiki.wocommunity.org/display/documentation/How+to+debug+a+D2W+application
>>>>>> 
>>>>>> Go to /wa/ERXDirectAction/log4j on your app. Set up wonder rule loggers 
>>>>>> on the keys you actually care about. The wonder logging will tell you 
>>>>>> why the key fired a rule or was pulled from the cache. Each time it's 
>>>>>> pulled from the cache it will log that. It will show you the dependent 
>>>>>> keys. It will give you the current state of those dependent keys. 
>>>>>> Without this information, you are just guessing.
>>>>>> 
>>>>>> Ramsey
>>>>>> 
>>>>>> On Mar 14, 2013, at 4:17 PM, Johnny Miller wrote:
>>>>>> 
>>>>>>> Hi David,
>>>>>>> 
>>>>>>> It works but the flag is D2WTraceRuleFiringEnabled
>>>>>>> 
>>>>>>> Here is the rules that get fired on the page where the read only gets 
>>>>>>> cached.  I just don't see anything in there that raises a red flag.  
>>>>>>> It's just like whatever triggers the D2WContext to recalculate it's 
>>>>>>> values stops working.  
>>>>>>> 
>>>>>>> Thanks,
>>>>>>> 
>>>>>>> Johnny
>>>>>>> 
>>>>>>> Mar 14 13:13:03 KMIWebCMSApp_1[5570] DEBUG NSLog  - ****** fire :     
>>>>>>> 20 : (pageConfiguration like 'Edit*') => task = edit (20501)
>>>>>>> Mar 14 13:13:03 KMIWebCMSApp_1[5570] DEBUG NSLog  - ****** fire :     
>>>>>>> 10 : *true* => entity = entityForPageConfiguration 
>>>>>>> [er.directtoweb.assignments.ERDKeyValueAssignment] (10000)
>>>>>>> Mar 14 13:13:03 KMIWebCMSApp_1[5570] DEBUG NSLog  - ****** fire :      
>>>>>>> 0 : *true* => entityForPageConfiguration = <ERDDefaultModelAssignment> 
>>>>>>> [er.directtoweb.assignments.defaults.ERDDefaultModelAssignment] (0)
>>>>>>> Mar 14 13:13:03 KMIWebCMSApp_1[5570] DEBUG NSLog  - ****** fire :     
>>>>>>> 51 : ((task = 'edit') or (task = 'inspect')) => pageName = 
>>>>>>> templateNameForInspectPage 
>>>>>>> [er.directtoweb.assignments.ERDKeyValueAssignment] (51001)
>>>>>>> Mar 14 13:13:03 KMIWebCMSApp_1[5570] DEBUG NSLog (EditKMIPrincipal) - 
>>>>>>> ****** fire :      0 : *true* => targetOutput = html (0)
>>>>>>> Mar 14 13:13:03 KMIWebCMSApp_1[5570] DEBUG NSLog (EditKMIPrincipal) - 
>>>>>>> ****** fire :      0 : (frame = (java.math.BigDecimal)'1') => 
>>>>>>> pageWrapperName = D2WEmptyWrapper (1)
>>>>>>> Mar 14 13:13:03 KMIWebCMSApp_1[5570] DEBUG NSLog (EditKMIPrincipal) - 
>>>>>>> <WOImage>: No height or width information provided for 
>>>>>>> 'DownTriangle.gif'. If possible, this information should be provided 
>>>>>>> for best performance.
>>>>>>> Mar 14 13:13:03 KMIWebCMSApp_1[5570] DEBUG NSLog (EditKMIPrincipal) - 
>>>>>>> ****** fire :    110 : (((task = 'inspect') or (task = 'edit')) and 
>>>>>>> (object.isNonNull = (java.math.BigDecimal)'1') and (object.isNewObject 
>>>>>>> = (java.math.BigDecimal)'0')) => branchChoices = ({branchButtonLabel = 
>>>>>>> "Inspect"; branchIcon = "&#x67;"; branchName = "inspectObject"; }, 
>>>>>>> {branchButtonLabel = "Edit"; branchIcon = "&#x25;"; branchName = 
>>>>>>> "editObject"; }, {branchButtonLabel = "Add"; branchIcon = "&#xe033;"; 
>>>>>>> branchName = "createObject"; }) (110003)
>>>>>>> Mar 14 13:13:03 KMIWebCMSApp_1[5570] DEBUG NSLog (EditKMIPrincipal) - 
>>>>>>> ****** fire :    100 : (task = 'edit') => selectedTabIndex = 1 (100001)
>>>>>>> Mar 14 13:13:03 KMIWebCMSApp_1[5570] DEBUG NSLog (EditKMIPrincipal) - 
>>>>>>> ****** fire :     22 : ((task = 'edit') or (task = 'inspect')) => 
>>>>>>> repetitionComponentName = KMID2WInspectPageRepetition (22001)
>>>>>>> Mar 14 13:13:03 KMIWebCMSApp_1[5570] DEBUG NSLog (EditKMIPrincipal) - 
>>>>>>> ****** fire :    100 : ((task = 'edit') and (entity.name = 
>>>>>>> 'KMIPrincipal')) => displayPropertyKeys = (("Details", "userName", 
>>>>>>> "firstName", "lastName", "emailAddress", "phoneNumber"), ("Password", 
>>>>>>> "password", "passwordConfirm")) (100002)
>>>>>>> Mar 14 13:13:03 KMIWebCMSApp_1[5570] DEBUG NSLog (EditKMIPrincipal) - 
>>>>>>> ****** fire :     10 : *true* => displayNameForProperty = 
>>>>>>> <ERDDefaultDisplayNameAssignment> 
>>>>>>> [er.directtoweb.assignments.defaults.ERDDefaultDisplayNameAssignment] 
>>>>>>> (10000)
>>>>>>> Mar 14 13:13:03 KMIWebCMSApp_1[5570] DEBUG NSLog (EditKMIPrincipal) - 
>>>>>>> ****** fire :      0 : *true* => smartRelationship = 
>>>>>>> <ERDDefaultModelAssignment> 
>>>>>>> [er.directtoweb.assignments.defaults.ERDDefaultModelAssignment] (0)
>>>>>>> Mar 14 13:13:03 KMIWebCMSApp_1[5570] DEBUG NSLog (EditKMIPrincipal) - 
>>>>>>> ****** fire :      0 : *true* => smartAttribute = 
>>>>>>> <ERDDefaultModelAssignment> 
>>>>>>> [er.directtoweb.assignments.defaults.ERDDefaultModelAssignment] (0)
>>>>>>> Mar 14 13:13:03 KMIWebCMSApp_1[5570] DEBUG NSLog (EditKMIPrincipal) - 
>>>>>>> ****** fire :     22 : (task = 'edit') => componentName = 
>>>>>>> KMID2WEditString (22001)
>>>>>>> Mar 14 13:13:03 KMIWebCMSApp_1[5570] DEBUG NSLog (EditKMIPrincipal) - 
>>>>>>> ****** fire :      5 : (smartAttribute.className = 'java.lang.String') 
>>>>>>> => length = smartDefaultAttributeWidth 
>>>>>>> [er.directtoweb.assignments.ERDKeyValueAssignment] (5001)
>>>>>>> Mar 14 13:13:03 KMIWebCMSApp_1[5570] DEBUG NSLog (EditKMIPrincipal) - 
>>>>>>> ****** fire :      0 : *true* => smartDefaultAttributeWidth = 
>>>>>>> <ERDDefaultModelAssignment> 
>>>>>>> [er.directtoweb.assignments.defaults.ERDDefaultModelAssignment] (0)
>>>>>>> Mar 14 13:13:03 KMIWebCMSApp_1[5570] DEBUG NSLog (EditKMIPrincipal) - 
>>>>>>> ****** fire :      0 : (smartAttribute.width > 
>>>>>>> (java.math.BigDecimal)'0') => maxLength = smartAttribute.width 
>>>>>>> [er.directtoweb.assignments.ERDKeyValueAssignment] (1)
>>>>>>> Mar 14 13:13:03 KMIWebCMSApp_1[5570] DEBUG NSLog (EditKMIPrincipal) - 
>>>>>>> ****** fire :    100 : ((task = 'edit') and (entity.name = 
>>>>>>> 'KMIPrincipal') and (propertyKey = 'userName')) => readOnly = 1 
>>>>>>> [com.webobjects.directtoweb.BooleanAssignment] (100003)
>>>>>>> Mar 14 13:13:03 KMIWebCMSApp_1[5570] DEBUG NSLog (EditKMIPrincipal) - 
>>>>>>> ****** fire :     20 : (look = 'KMINativeLook') => 
>>>>>>> elementNameForBottomActionBlock = div (20001)
>>>>>>> Mar 14 13:13:03 KMIWebCMSApp_1[5570] DEBUG NSLog (EditKMIPrincipal) - 
>>>>>>> ****** fire :     20 : (look = 'KMINativeLook') => 
>>>>>>> classForBottomActionBlock = form-actions (20001)
>>>>>>> Mar 14 13:13:03 KMIWebCMSApp_1[5570] DEBUG NSLog (EditKMIPrincipal) - 
>>>>>>> ****** fire :     10 : *true* => saveButtonLabel = 
>>>>>>> ERD2W.saveButtonLabel 
>>>>>>> [er.directtoweb.assignments.delayed.ERDDelayedLocalizedAssignment] 
>>>>>>> (10000)
>>>>>>> Mar 14 13:13:03 KMIWebCMSApp_1[5570] DEBUG NSLog (EditKMIPrincipal) - 
>>>>>>> ****** fire :     10 : *true* => cancelButtonLabel = 
>>>>>>> ERD2W.cancelButtonLabel 
>>>>>>> [er.directtoweb.assignments.delayed.ERDDelayedLocalizedAssignment] 
>>>>>>> (10000)
>>>>>>> 
>>>>>>> On Mar 14, 2013, at 12:00 PM, David Holt <[email protected]> wrote:
>>>>>>> 
>>>>>>>> 
>>>>>>>> On 2013-03-13, at 7:29 PM, Johnny Miller <[email protected]> 
>>>>>>>> wrote:
>>>>>>>> 
>>>>>>>>> Hi Ramsey,
>>>>>>>>> 
>>>>>>>>> Yeah, I have a rule like this:
>>>>>>>>> 
>>>>>>>>> 30 : look = 'KMINativeLook' => propertyNameComponentName = 
>>>>>>>>> "KMID2WPropertyName" [com.webobjects.directtoweb.Assignment],
>>>>>>>>> 
>>>>>>>>> KMID2WPropertyName subclasses ERD2WPropertyName and it's basically 
>>>>>>>>> the same thing except I removed the HTML I didn't need.
>>>>>>>>> 
>>>>>>>>> Is there a way to debug the rules if you are using embedded 
>>>>>>>>> components?  
>>>>>>>> 
>>>>>>>> Does the flag "ERD2WTraceRuleFiringEnabled = true" not work?
>>>>>>>> 
>>>>>>>> http://wiki.wocommunity.org/display/documentation/The+D2W+Rule+System
>>>>>>>> 
>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> Thanks again,
>>>>>>>>> 
>>>>>>>>> Johnny
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> On Mar 13, 2013, at 4:01 PM, Ramsey Gurley <[email protected]> 
>>>>>>>>> wrote:
>>>>>>>>> 
>>>>>>>>>> How are you setting propertyComponentName? I assume through rules, 
>>>>>>>>>> but if you are pushing the context, you're probably permacaching the 
>>>>>>>>>> value for your key. If not, debug your rule firings and see why it's 
>>>>>>>>>> choosing the cached value for your RHS.
>>>>>>>>>> 
>>>>>>>>>> Ramsey
>>>>>>>>>> 
>>>>>>>>>> On Mar 13, 2013, at 5:14 PM, Johnny Miller wrote:
>>>>>>>>>> 
>>>>>>>>>>> Hi,
>>>>>>>>>>> 
>>>>>>>>>>> I'm trying to do the following:
>>>>>>>>>>> 
>>>>>>>>>>> I have an inspect page and inside of that I have an inspect page 
>>>>>>>>>>> repetition.  That all works fine and it looks like the ERD2W 
>>>>>>>>>>> equivalents.
>>>>>>>>>>> 
>>>>>>>>>>> In the inspect page repetition I want to have a switch component 
>>>>>>>>>>> that uses a rule to determine what kind of component to display 
>>>>>>>>>>> i.e. if it is a string put one kind of component, if it's an 
>>>>>>>>>>> ERAttachment put another.
>>>>>>>>>>> 
>>>>>>>>>>> Now here is where the strange things start occurring.  I've defined 
>>>>>>>>>>> my own key "propertyComponentName".  For some odd reason whatever 
>>>>>>>>>>> rule resolves to in the first property is what it displays for 
>>>>>>>>>>> every property?
>>>>>>>>>>> 
>>>>>>>>>>> And what is equally strange is that suppose they all resolve to the 
>>>>>>>>>>> same type of component so it doesn't matter... it will display the 
>>>>>>>>>>> right property value but the property value for key always resolves 
>>>>>>>>>>> to whatever the answer would be for the first property.
>>>>>>>>>>> 
>>>>>>>>>>> It's hard to describe so I created a couple of screenshots:
>>>>>>>>>>> 
>>>>>>>>>>> http://www.kahalawai.com/displaying-same-component.png // It always 
>>>>>>>>>>> shows the component for viewing an ERAttachment
>>>>>>>>>>> http://www.kahalawai.com/displaying-same-property-name.png // Gets 
>>>>>>>>>>> the property key right but the display name for property value wrong
>>>>>>>>>>> 
>>>>>>>>>>> One of my questions is can you just arbitrarily create keys or do 
>>>>>>>>>>> you need to register them somewhere?
>>>>>>>>>>> 
>>>>>>>>>>> Another Is localcontext and d2wcontext completely synonymous?
>>>>>>>>>>> 
>>>>>>>>>>> Thanks in advance,
>>>>>>>>>>> 
>>>>>>>>>>> Aloha,
>>>>>>>>>>> Mr. Johnny Miller
>>>>>>>>>>> Web Development Manager
>>>>>>>>>>> Kahalawai Media Company
>>>>>>>>>>> Lahaina, HI 96761
>>>>>>>>>>> tel: (808) 661-7962 | mobile: (808) 283-0791
>>>>>>>>>>> website | e-mail    
>>>>>>>>>>> 
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Do not post admin requests to the list. They will be ignored.
>>>>>>>>>>> Webobjects-dev mailing list      ([email protected])
>>>>>>>>>>> Help/Unsubscribe/Update your Subscription:
>>>>>>>>>>> https://lists.apple.com/mailman/options/webobjects-dev/ramseygurley%40gmail.com
>>>>>>>>>>> 
>>>>>>>>>>> This email sent to [email protected]
>>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> _______________________________________________
>>>>>>>>> Do not post admin requests to the list. They will be ignored.
>>>>>>>>> Webobjects-dev mailing list      ([email protected])
>>>>>>>>> Help/Unsubscribe/Update your Subscription:
>>>>>>>>> https://lists.apple.com/mailman/options/webobjects-dev/programmingosx%40mac.com
>>>>>>>>> 
>>>>>>>>> This email sent to [email protected]
>>>>>>>> 
>>>>>>> 
>>>>>>> _______________________________________________
>>>>>>> Do not post admin requests to the list. They will be ignored.
>>>>>>> Webobjects-dev mailing list      ([email protected])
>>>>>>> Help/Unsubscribe/Update your Subscription:
>>>>>>> https://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com
>>>>>>> 
>>>>>>> This email sent to [email protected]
>>>>>> 
>>>>> 
>>>> 
>>> 
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list      ([email protected])
>>> Help/Unsubscribe/Update your Subscription:
>>> https://lists.apple.com/mailman/options/webobjects-dev/ramseygurley%40gmail.com
>>> 
>>> This email sent to [email protected]
>> 
> 


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to