Re: Saving a D2W Query component?
Re: Saving a D2W Query component?
- Subject: Re: Saving a D2W Query component?
- From: James Cicenia <email@hidden>
- Date: Wed, 25 Jan 2006 17:05:37 -0600
Anjo
I have been wracking my brains about this issue. I can't seem to get
anything back:
Here is the code borrowed from ERD2WQueryPage where saveQueryBindings
() is called from takeValuesForRequest:
protected void pushQueryBindingsForName(String name) {
NSDictionary queryBindings = queryBindings();
if(queryBindings != null && (queryBindings instanceof
NSMutableDictionary)) {
System.out.println("in push query bindings");
NSMutableDictionary mutableQueryBindings =
(NSMutableDictionary)queryBindings;
NSDictionary source = (NSDictionary)
NSKeyValueCoding.Utility.valueForKey(displayGroup(), name);
System.out.println("name: "+name);
String key;
Enumeration keynum = source.keyEnumerator();
while(keynum.hasMoreElements()){
key = (String) keynum.nextElement();
System.out.println("key: "+key+" - val: "+source.objectForKey
(key)+" END");
}
mutableQueryBindings.setObjectForKey(source.mutableClone(),
name);
}
}
protected void saveQueryBindings() {
NSDictionary queryBindings = queryBindings();
if(queryBindings != null) {
pushQueryBindingsForName("queryMin");
pushQueryBindingsForName("queryMax");
pushQueryBindingsForName("queryMatch");
pushQueryBindingsForName("queryOperator");
pushQueryBindingsForName("queryBindings");
}
}
However my enumeration is always 0. Nothing ever prints out.
Is this supposed to get what the user had entered? Or am I really off
base here?
Thanks
James Cicenia
On Jan 9, 2006, at 2:45 PM, Anjo Krank wrote:
If you just have plain values (no EOs) to search for, you could
take a look at the ERD2WQueryPage in Project Wonder. Copy over the
stuff you need into your subclass of D2WQueryPage or use it directly.
Am 07.01.2006 um 23:45 schrieb James Cicenia:
Hello -
What is the best approach to saving D2WQuery embedded component? I
would
like to save the users values and was wondering do I have to use a
DisplayGroup
for this? I only noticed less than, greater than, equal to
Dictionaries. What about Like?
Any good pointers greatly appreciated.
- James Cicenia
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40logicunited.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