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. Chuck -- Chuck Hill Senior Consultant / VP Development 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
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
