• 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: EOEditingContext.MessageHandler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOEditingContext.MessageHandler


  • Subject: Re: EOEditingContext.MessageHandler
  • From: Zak Burke <email@hidden>
  • Date: Thu, 13 Oct 2005 15:43:10 -0400

Marcos Trejo Munguia wrote on 10/13/05 2:05 PM:
> Hi list!
>
> Someone has successfully implement this class in a WebObjects Application?

In my EC subclass constructor I have:

	...
	setMessageHandler(new I3pkbMessageHandler());
	...

My message handler is the following:

public I3pkbMessageHandler()
{}

/**
* Save the alert in the EditingContext's errorMessage list if this
* is an I3pkbEditingContext.
*
* @param context EC this message applies to
* @param message message to save
*
*/
public void editingContextPresentErrorMessage(EOEditingContext context,
String message)
{
    if (context instanceof I3pkbEditingContext)
    {
        I3pkbEditingContext ec = (I3pkbEditingContext) context;
        if (ec.errorMessages == null)
            ec.errorMessages = new NSMutableArray();
        ec.errorMessages.addObject(message);
    }
}


/**
* Block fetches that return too many rows (i.e. return false) and alert
* the user that this action was taken.
*
* @param context EditingContext in which blocked fetch occurred
* @param count how many rows were retrieved so far
* @param limit how many rows may be retrieved at once
* @param objectStore dunno what this is for
*
* @return false under all circumstances in order to block large fetches
*/
public boolean editingContextShouldContinueFetching(EOEditingContext
context, int count, int limit, EOObjectStore objectStore)
{
    editingContextPresentErrorMessage(context, "Fetch limit ("+limit+")
exceeded; please restrict your search parameters");
    return false;
}
 _______________________________________________
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: 
 >EOEditingContext.MessageHandler (From: Marcos Trejo Munguia <email@hidden>)

  • Prev by Date: Re: EOEditingContext.MessageHandler
  • Next by Date: Re: EOEditingContext.MessageHandler - SOLVED
  • Previous by thread: Re: EOEditingContext.MessageHandler - SOLVED
  • Next by thread: mysterious LDAP problem and "why doesn't EOAdaptorDebugEnabled log LDAP too?"
  • Index(es):
    • Date
    • Thread