• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Saving a D2W Query component?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Saving a D2W Query component? (From: James Cicenia <email@hidden>)
 >Re: Saving a D2W Query component? (From: Anjo Krank <email@hidden>)

  • Prev by Date: Re: NSTimestamp
  • Next by Date: Re: NSTimestamp
  • Previous by thread: Re: Saving a D2W Query component?
  • Next by thread: Xcode WO template (Xcode 2.2, WO 5.3)
  • Index(es):
    • Date
    • Thread