• 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: takeValuesFromForm Validation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: takeValuesFromForm Validation


  • Subject: Re: takeValuesFromForm Validation
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 1 Aug 2007 10:36:07 -0700


On Jul 31, 2007, at 8:36 PM, Lachlan Deck wrote:

That's something I'm working on at the moment actually... something like...


public String validateRqfJustification(String newState) throws NSValidation.ValidationException
{
if ( newState != null ) {
if (newState.length() > 1500) {
this._invalidValues.takeValueForKey(newState, ValidateRqfJustificationKey);
throw new NSValidation.ValidationException("The RQF Justification can not be longer than 1500 characters");
}
}
this._invalidValues.takeValueForKey(null, ValidateRqfJustificationKey);
return newState;
}


public Object valueForKey(String key) {
	Object result = this._invalidValues.valueForKey(key);
	if (result != null) return result;
	return super.valueForKey(key);
}

That is an interesting idea. It will handle the common problem where a String did not format into an NSTimestamp and can't be set as the classes differ. BUT I would feel better with this on the page. Having a valueForKey like that in the EO makes me all nervous. EOF might not approve of that sort of behaviour.


Chuck

--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
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


  • Prev by Date: Re: takeValuesFromForm Validation
  • Next by Date: Re: Concurrency question
  • Previous by thread: Re: takeValuesFromForm Validation
  • Next by thread: Re: Concurrency question
  • Index(es):
    • Date
    • Thread