• 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
Yet Another Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Yet Another Question


  • Subject: Yet Another Question
  • From: "Yury Peskin" <email@hidden>
  • Date: Thu, 20 Mar 2008 15:33:56 -0500

Hello List,

I have an order number in my EO and I need to have it be a unique number.

How can I check that my users did not type in an identical number?

I’m trying to do validation and my validation right now looks like this:

 

public String validateOrderNum(String value) throws NSValidation.ValidationException

{

            // Check the order number is unique

            NSMutableArray args = new NSMutableArray();

            Args.addObject(value);

>>>>>>EOEditingContext ec = session().defaultEditingContext();

>>>>>>Project project = EOUtilities.objectWithQualifierFormat(ec, “Project”, “orderNum = %@”, args);

            If(project != null)

                        Throw new NSValidation.ValidationException(“This number is already in use.”);

}

 

I keep getting “cannot find symbol” on the ec and the EOUtilities lines.

Is there a way I can get this type of validation to work?

 

Thanks,

Yury Peskin

 

 _______________________________________________
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

  • Follow-Ups:
    • Re: Yet Another Question
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: Better start with Wonder than WO
  • Next by Date: Re: Better start with Wonder than WO
  • Previous by thread: Re: Better start with Wonder than WO
  • Next by thread: Re: Yet Another Question
  • Index(es):
    • Date
    • Thread