Re: Raw Rows and Display Groups
Re: Raw Rows and Display Groups
- Subject: Re: Raw Rows and Display Groups
- From: Simon McLean <email@hidden>
- Date: Tue, 18 Dec 2007 07:13:16 +0000
Hi David -
Personally, I would just do all the searching outside the display
group and only use the DG for display purposes (batching etc). So
bind your search box to an ivar and you search button to a method
(instead of qualifyDataSource) that fetches the raw rows and re-loads
the DG.
One thing to be careful with using this approach is checking whether
the user has navigated to a batch that no longer exists - say when
you first load the DG it has 10 batches and the user navigates to
batch 10. If they then filter the results and your method reloads the
DB with only 6 batches, the user get's presented with no results if
you leave the DG on batch 10!
Simono
On 18 Dec 2007, at 01:02, David Holt wrote:
Hi Simon,
Thanks for your reply. Your suggestion is how I am setting up the
fetch for the display group for its initial display. When I use a
queryMatch binding in a search field followed by a qualifyDataSource
() I get back an error (see below). What I think is happening is
that my array of NSDictionaries is converted to EO's by the qualify
methods and the array then gets set to EO's instead of the original
raw row results. The "anArtifact" dictionary referred to in the
error is the item binding in a WORepetition which works fine for
the initial page load, and then not at all once qualified.
Thanks again,
David
java.lang.IllegalArgumentException: While trying to set the field
"anArtifact" on an object of type ArtifactLibrary we expected a
com.webobjects.foundation.NSDictionary but received a Artifact with
a value of {values =
snip
}. This often happens if you forget to use a formatter.
at com.webobjects.foundation.NSKeyValueCoding
$_FieldBinding.setValueInObject(NSKeyValueCoding.java:1056)
at com.webobjects.foundation.NSKeyValueCoding
$DefaultImplementation.takeValueForKey(NSKeyValueCoding.java:1293)
at com.webobjects.appserver.WOComponent.takeValueForKey
(WOComponent.java:1550)
at com.webobjects.foundation.NSKeyValueCoding
$Utility.takeValueForKey(NSKeyValueCoding.java:519)
at com.webobjects.foundation.NSKeyValueCodingAdditions
$DefaultImplementation.takeValueForKeyPath
(NSKeyValueCodingAdditions.java:242)
at com.webobjects.appserver.WOComponent.takeValueForKeyPath
(WOComponent.java:1611)
at
com.webobjects.appserver._private.WOKeyValueAssociation._setValueNoVal
idation(WOKeyValueAssociation.java:92)
at er.extensions.ERXWORepetition._prepareForIterationWithIndex
(ERXWORepetition.java:236)
at er.extensions.ERXWORepetition.appendToResponse
(ERXWORepetition.java:468)
at
com.webobjects.appserver._private.WODynamicGroup.appendChildrenToRespo
nse(WODynamicGroup.java:121)
at er.extensions.ERXWOForm.appendChildrenToResponse(ERXWOForm.java:
218)
at er.extensions.ERXWOForm.appendToResponse(ERXWOForm.java:342)
at
com.webobjects.appserver._private.WODynamicGroup.appendChildrenToRespo
nse(WODynamicGroup.java:121)
at
com.webobjects.appserver._private.WODynamicGroup.appendToResponse
(WODynamicGroup.java:130)
at
com.webobjects.appserver._private.WOComponentContent.appendToResponse(
WOComponentContent.java:43)
at
com.webobjects.appserver._private.WODynamicGroup.appendChildrenToRespo
nse(WODynamicGroup.java:121)
at
com.webobjects.appserver._private.WODynamicGroup.appendToResponse
(WODynamicGroup.java:130)
at
com.webobjects.appserver._private.WOComponentContent.appendToResponse(
WOComponentContent.java:43)
at
com.webobjects.appserver._private.WODynamicGroup.appendChildrenToRespo
nse(WODynamicGroup.java:121)
at er.extensions.ERXWOConditional.appendChildrenToResponse
(ERXWOConditional.java:115)
at er.extensions.ERXWOConditional.appendToResponse
(ERXWOConditional.java:109)
at
com.webobjects.appserver._private.WODynamicGroup.appendChildrenToRespo
nse(WODynamicGroup.java:121)
at
com.webobjects.appserver._private.WODynamicGroup.appendToResponse
(WODynamicGroup.java:130)
at com.webobjects.appserver.WOComponent.appendToResponse
(WOComponent.java:992)
at
com.webobjects.appserver._private.WOComponentReference.appendToRespons
e(WOComponentReference.java:111)
at
com.webobjects.appserver._private.WODynamicGroup.appendChildrenToRespo
nse(WODynamicGroup.java:121)
at
com.webobjects.appserver._private.WODynamicGroup.appendToResponse
(WODynamicGroup.java:130)
at com.webobjects.appserver.WOComponent.appendToResponse
(WOComponent.java:992)
at
com.webobjects.appserver._private.WOComponentReference.appendToRespons
e(WOComponentReference.java:111)
at
com.webobjects.appserver._private.WODynamicGroup.appendChildrenToRespo
nse(WODynamicGroup.java:121)
at
com.webobjects.appserver._private.WODynamicGroup.appendToResponse
(WODynamicGroup.java:130)
at com.webobjects.appserver.WOComponent.appendToResponse
(WOComponent.java:992)
at com.webobjects.appserver.WOSession.appendToResponse
(WOSession.java:1200)
at er.extensions.ERXSession.appendToResponse(ERXSession.java:529)
at com.webobjects.appserver.WOApplication.appendToResponse
(WOApplication.java:1418)
at er.extensions.ERXApplication.appendToResponse
(ERXApplication.java:1129)
at
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchW
ithPreparedPage(WOComponentRequestHandler.java:230)
at
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchW
ithPreparedSession(WOComponentRequestHandler.java:287)
at
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchW
ithPreparedApplication(WOComponentRequestHandler.java:322)
at
com.webobjects.appserver._private.WOComponentRequestHandler._handleReq
uest(WOComponentRequestHandler.java:358)
at
com.webobjects.appserver._private.WOComponentRequestHandler.handleRequ
est(WOComponentRequestHandler.java:432)
at com.webobjects.appserver.WOApplication.dispatchRequest
(WOApplication.java:1306)
at er.extensions.ERXApplication.dispatchRequest
(ERXApplication.java:1193)
at com.webobjects.appserver._private.WOWorkerThread.runOnce
(WOWorkerThread.java:173)
at com.webobjects.appserver._private.WOWorkerThread.run
(WOWorkerThread.java:254)
at java.lang.Thread.run(Thread.java:613)
1857626 [WorkerThread10] INFO NSLog - WorkerThread10 Session
ZB5bULBL7xvZ9XS2wDPt80 sleep
On 17-Dec-07, at 10:29 AM, Simon McLean wrote:
Hi David -
You can fetch the raw rows yourself using a fetchspecification
that has setFetchesRawRows(true), then to WODG.setObjectArray
(yourResults).
Simon
On 17 Dec 2007, at 18:20, David Holt wrote:
Hi all,
I am defining my display group entirely in my component's .java
file. I just changed the display group to fetch raw rows for its
initial fetch and display. When I do a WODG.qualifyDatasource, or
WODG.qualifyDisplayGroup it doesn't return raw rows. It tries to
return EO's. Is is possible to override the actions above so that
they too return raw rows on this component?
David
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
@mac.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:
40mac.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