• 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: Handling GET Requests & Redirecting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Handling GET Requests & Redirecting


  • Subject: Re: Handling GET Requests & Redirecting
  • From: Pascal Robert <email@hidden>
  • Date: Fri, 28 Jan 2011 20:02:17 -0500

Le 2011-01-28 à 19:15, Chuck Hill a écrit :

> Hi Kevin,
>
>
> On Jan 28, 2011, at 3:54 PM, Kevin Hinkson wrote:
>
>> Hi,
>> I'm hoping someone can help me with this problem.
>>
>> Let's say I have a Person object. How would I go about handling a GET request (with query strings) to delete a Person, save the changes to the database, and then redirect to a URL (not a WOComponent). Oh, and I need to have a Session available as well.
>>
>> Initially I thought about doing this as a WOComponent and calling one of it's methods from the constructor, but then there is no clean way
>> to redirect the response. The alternative seemed to be to use DirectActions.
>
> That would work.
>
>
>> But using this method seems to mean I will have to write a direct action for each
>> "action" (like delete/add/edit) that I would want to perform on a particular EO. It gets even hairier if I would like to re-use these actions in an API. This seems a bit kludgy and very not the webobjects way so I think I'm missing something.
>>
>> Can anyone offer any suggestions?
>
> That sounds a lot like a REST interface.  Have you looked at ERRest in Project Wonder?
>
>
>> NB: My Session on awake, looks for certain cookie values, verifies hashes and loads a user account EO as a means of implementing Sign In "Remember Me", then cookies are updated and added to the response in the Session sleep method. It's a lazy man's Serialized Session Store. Does this sound like an appropriate use of awake and sleep? I also mention it in case it will mess with any response changes suggested for the redirect action. Thanks.
>
> I would not call it a Serialized Session Store, but I am not sure how it will play with ERRest.

+1 for ERRest!

 _______________________________________________
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: 
 >Handling GET Requests & Redirecting (From: Kevin Hinkson <email@hidden>)
 >Re: Handling GET Requests & Redirecting (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: how to handle dates alone
  • Next by Date: Re: how to handle dates alone
  • Previous by thread: Re: Handling GET Requests & Redirecting
  • Next by thread: ERModern and brain freezing
  • Index(es):
    • Date
    • Thread