| Hi David, It is important to realize that when using qualifyDataSource, the dg is going to try to qualify via sql qualifiers. If the attributes that you are searching on aren't in the db, then you get this error. I should qualify this by saying that this happens when you use the standard dg construction tools provided by wobuilder, et al. This contrasts with qualifyDisplayGroup which is going to do in-memory filtering, and therefore the object will have programmed attributes available to filter against. Since I assume that you are using a mix of db reachable attributes and programmed attributes, you may have to dig a little deeper. For instance, you may have to bind your filter fields against fields in the java file, then programatically set the querymatch, etc. arrays for db fields, execute qualifyDataSource, then set the programmatically reachable fields and execute qualifyDisplayGroup to filter down to the items. This has the negative effect of leaving the dg's allObjects field populated with the elements from the db fetch. Or, you could create your own fetch spec using the db reachable fields, filter on the results to result in an array, and then set the dg's data source as an arrayDataSource with the resultant array as the arrayDataSource's array. There's about 800 different ways to do this, and we'd need to know more about how flexible you want this to be, etc. to continue. Personally, I created a dg subclass and datasource subclass where in each class I specify a series of strings that I want to make available for db or in-memory filtering, and then have the sql and in-memory qualifiers created automatically using the standard queryMatch, min, max, etc. This was a fun project, but it makes me wonder why since the model knows the attributes that are part of the db model and the other attributes that aren't, why couldn't dg figure it out on its own. Oh well, probably a Project Wonder problem. (?) John On Jul 14, 2006, at 7:03 PM, David Holt wrote: I am using DisplayGroups which make queries on individual attributes very easy. |
_______________________________________________ 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]
