On May 31, 2011, at 4:31 PM, David Holt wrote:
>
> On 2011-05-31, at 12:53 PM, Andrew Kinnie wrote:
>
>> Greetings,
>>
>> I have a D2W app that acts as a simple CRUD front end to a datastore
>> supporting a different app. I am working on making changes to the D2W
>> rules, and am having some issues with the queryAll task. I am sure I am
>> just missing something about which key or keypath to try.
>>
>>
>> Specifically:
>> 1. I would like to set the default property for a given entity's query
>> instead of the one D2W chooses for me in the popup. I have tried
>> displayPropertyKeys
>>
>> 45 : (task = 'queryAll' and entity.name = 'MyEntity') => displayPropertyKeys
>> = ("myDefaultKey", "MyOtherKey") [com.webobjects.directtoweb.Assignment]
>
> The displayPropertyKeys are already established as the visible entity names.
> This provide the list of entities in the QueryAll page template, so your rule
> definitely won't do as you hope.
>
>>
>> This doesn't seem to have any effect. I've also tried displayKeyForEntity
>> with similar non-results. I have very few rules (other than those which
>> affect navigationState) so it doesn't appear that I have a higher valued
>> rule.
>
> The display keys inside the pull down are established in the
> ERD2WQueryAnyField. I don't know if you can set a context for the
> relationship in your rules. Worth looking into, I suppose.
>
> keyList = relationshipContextDisplayAttributesKeys;
>
> relationshipContext() - Method in class
> com.webobjects.directtoweb.D2WQueryAnyField
> This method is intentionally undocumented.
> relationshipContextDisplayAttributesKeys() - Method in class
> com.webobjects.directtoweb.D2WQueryAnyField
> This method is intentionally undocumented.
>
>
> I'm guessing no.
I remember seeing the logic behind that when I reimplemented my own query any
field... I think the number one choice for the default is any attribute.name()
like *name*. It's been so long ago now, I forget exactly what the logic was,
but I don't remember it being something you could define via rules.
>
>
>>
>> 2. I would also prefer to use "like" instead of <, >, <>, = etc. for string
>> based properties
>
> This rule works for a normal query page:
>
> 100 : propertyKey = 'summary' => qualifierOperators = ("contains")
> [com.webobjects.directtoweb.Assignment]
>
> For the queryall task you may want to try something like
> task = queryall and propertyKey like '*' => qualifierOperators = ("like")
I *think* you can do that in your localizable strings file with something like
"<>" = "not equals";
>
>
>
>>
>> I vaguely remember that the last one of these posed some problems and may
>> not be easily accomplished via rules, but I could not find the old email
>> about it.
>>
>> Any insight would be greatly appreciated.
>>
>> Thanks
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list ([email protected])
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/programmingosx%40mac.com
>>
>> This email sent to [email protected]
>
> --
> David Holt
>
> Come to WOWODC in Montreal this July for unparalleled WO learning
> opportunities and real peer to peer problem solving! Network, socialize, and
> enjoy a great cosmopolitan city. See you there!
> http://www.wocommunity.org/wowodc11/
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]