• 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: return null?? [was-> Re: modify search form on result page?]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: return null?? [was-> Re: modify search form on result page?]


  • Subject: Re: return null?? [was-> Re: modify search form on result page?]
  • From: Michael Engelhart <email@hidden>
  • Date: Sun, 8 Aug 2004 10:23:17 -0500

Actually the more I dig into the various threads it seems that context().page() is actually what should be called unless I know that 'this' refers to the right component (which it does in my case) as it doesn't work with subcomponents.

Mike
On Aug 8, 2004, at 10:02 AM, Michael Engelhart wrote:

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.
_______________________________________________
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.


  • Follow-Ups:
    • Re: return null?? [was-> Re: modify search form on result page?]
      • From: Chuck Hill <email@hidden>
References: 
 >modify search form on result page? (From: Michael Engelhart <email@hidden>)
 >Re: modify search form on result page? (From: Arturo Pérez <email@hidden>)
 >Re: modify search form on result page? (From: Michael Engelhart <email@hidden>)
 >Re: modify search form on result page? (From: Arturo Pérez <email@hidden>)
 >return null?? [was-> Re: modify search form on result page?] (From: Michael Engelhart <email@hidden>)

  • Prev by Date: return null?? [was-> Re: modify search form on result page?]
  • Next by Date: Re: return null?? [was-> Re: modify search form on result page?]
  • Previous by thread: return null?? [was-> Re: modify search form on result page?]
  • Next by thread: Re: return null?? [was-> Re: modify search form on result page?]
  • Index(es):
    • Date
    • Thread