On 01/12/2005, at 18.15, Jean-François Veillette wrote:

I have a display group quoteDisplayGroup in a webcomponent.
The question is where in the components Java file I set the binding:

quoteDisplayGroup.queryBindings().takeValueForKey(value, "attributeValue");

and how...

Another question... in my research I have come upon this one:

quoteDisplayGroup.queryBindings().setObjectForKey(value, "attributeValue");

Which one should I use?

think of queryBindings() as a NSMutableDictionary ( NSKeyValueCoding ), thus you can use both interfaces.

you can do it almost anywhere you want ( as far as it make sense ;-) ).

- jfv

Hi there...

I never got it to work but I found another way to show the data from the database. I use this code instead. It generates a qualifier and fetch specification programmiticaly and populate my displaygroup with the fetched data.

        public WOComponent visEmne() {
                emne = subjectItem.subjectText();
                
                NSArray args = new NSArray(new Object[] { emne });
                String qualifierString = "(subject.subjectText=%s)";
EOQualifier qualifier = EOQualifier.qualifierWithQualifierFormat (qualifierString, args);
                
EOFetchSpecification fetchSpec = new EOFetchSpecification("Quote", qualifier, null);
                
                EOEditingContext ec = session().defaultEditingContext();
NSArray tempResultsArray = ec.objectsWithFetchSpecification (fetchSpec);
                
                quoteDisplayGroup.setObjectArray(tempResultsArray);
                
                return null;
        }

/Micky Holdorf


_______________________________________________
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]

Reply via email to