return null?? [was-> Re: modify search form on result page?]
return null?? [was-> Re: modify search form on result page?]
- Subject: return null?? [was-> Re: modify search form on result page?]
- From: Michael Engelhart <email@hidden>
- Date: Sun, 8 Aug 2004 10:02:04 -0500
In my quest to get a modify search form working by reusing my main
search components validation logic, there are several places within my
code that have "return null" so that the page redisplays as this is the
way all the documentation and books describe how to return the current
component. But this doesn't work when I call a components methods
from another component. So I changed my
return null;
to
return this;
which solves that issue. I decided to investigate why you wouldn't
just do this as matter of course in all pages where you want to return
the current component (which is essentially what return null is for).
Anyway, I saw a thread about return this is the "preferred way" to do
this according to a WWDC presentation in 2001. Is this still
accurate? Should I always use return this instead of return null?
Thanks
MIke
On Aug 7, 2004, at 10:14 PM, Arturo Pirez wrote:
On Aug 7, 2004, at 11:02 PM, Michael Engelhart wrote:
Thanks Arturo -
Is there any way to use my existing code in InitialSearch to validate
the modify search form's data and if there is a problem redisplay
InitialSearch with it's corresponding validation error messages?
Is there anyway to just call validateForSave()? But this isn't an EO,
right? It's just a form? I wonder if you would get anything out of
implementing the NSValidation interface on your search object?
----
WO in philadelphia - wanna cheesesteak with that?
Please visit webobjects.meetup.com.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.