EOEditingContext.MessageHandler
EOEditingContext.MessageHandler
- Subject: EOEditingContext.MessageHandler
- From: Marcos Trejo Munguia <email@hidden>
- Date: Thu, 13 Oct 2005 13:05:13 -0500
Hi list!
Someone has successfully implement this class in a WebObjects Application?
I have the next code:
private EOEditingContext ec = new EOEditingContext();
public NSArray transactions;
public TransactionsHistory(WOContext context) {
super(context);
ec.setMessageHandler(new Object() {
public void editingContextPresentErrorMessage(EOEditingContext context, String message) {
errMsg = message;
}
public boolean editingContextShouldContinueFetching(EOEditingContext context, int count, int originalLimit, EOObjectStore objectStore) {
return false;
}
});
}
public void next() {
...
EOFetchSpecification fs = new EOFetchSpecification("InventoryTransDetail", qual, sorts, false, false, null);
fs.setRefreshesRefetchedObjects(true);
fs.setPromptsAfterFetchLimit(true);
fs.setFetchLimit(500);
transactions = ec.objectsWithFetchSpecification(fs);
}
When the fetch gets 500 objects or more I get the next exception:
[2005-10-13 12:35:14 CDT] <WorkerThread1> java.lang.IllegalArgumentException: <NSSelector> method is not public: public void TransactionsHistory$1.editingContextPresentErrorMessage(com.webobjects.eocontrol.EOEditingContext,java.lang.String)
Class com.webobjects.foundation.NSSelector can not access a member of class TransactionsHistory$1 with modifiers "public"
at com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:124)
at com.webobjects.foundation._NSDelegate._perform(_NSDelegate.java:225)
at com.webobjects.foundation._NSDelegate.perform(_NSDelegate.java:166)
at com.webobjects.eocontrol.EOEditingContext.handleError(EOEditingContext.java:2927)
at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4055)
at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4438)
at TransactionsHistory.next(TransactionsHistory.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at KeyValueCodingProtectedAccessor.methodValue(KeyValueCodingProtectedAccessor.java:54)
at com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject(NSKeyValueCoding.java:1160)
at com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueForKey(NSKeyValueCoding.java:1268)
at com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java:1539)
at com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValueCoding.java:498)
at com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:212)
at com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java:1600)
at com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:46)
at com.webobjects.appserver._private.WOActiveImage.invokeAction(WOActiveImage.java:255)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:110)
at com.webobjects.appserver._private.WOConditional.invokeAction(WOConditional.java:55)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:110)
at com.webobjects.appserver._private.WOForm.invokeAction(WOForm.java:82)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:110)
at com.webobjects.appserver.WOComponent.invokeAction(WOComponent.java:945)
at com.webobjects.appserver.WOSession.invokeAction(WOSession.java:1166)
at com.webobjects.appserver.WOApplication.invokeAction(WOApplication.java:1375)
Can someone tell me how can I get this to work?
I'll appreciate your help.
Thank you. _______________________________________________
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