Re: hardcoded DirectActions URL
Re: hardcoded DirectActions URL
- Subject: Re: hardcoded DirectActions URL
- From: Chuck Hill <email@hidden>
- Date: Tue, 12 Aug 2003 10:58:19 -0700
- Organization: Global Village Consulting, Inc.
1. With hard coded links you have two choices that I can see: cookies
and sessionless actions.
2. Be brave. If you only want an editing context there is no need for
a session.
3. You'd be surprised at how many people *do* allow cookies and how
many sites require it.
4. You might want to consider not hard coding the links in the text
but rather using a token that is converted into links on the fly.
Chuck
Santiago wrote:
Hi all
Jonathan, yes, I want a session because I'm going to use some EOs and I
feel more comfortable with a session and its defaultEditingContext at my
back to deal with them. You and Chuck mentioned the
context().directActionURLNamed(...) method; that was one of the the ways
I tried but I have I problem: if I don't have the session ID in the URL
(and in the first page it isn't there) and I don't have the session ID
in the links (because those links are hardcoded in a file), then I can't
see the way I can get the context (nor the session id which is what I'm
looking for). I'll say with an example because I don't know if I'm
explaining this right.
1.- Someone gets into the web site with the basic URL http://mydomain.org
2.- I have the default request handler set to 'wa', so the application
goes to defaultAction and generates the Main page.
3.- I have code to load the page contents from a file (plain text) with
all the links hardcoded.
4.- PROBLEM: The user wants to go to another page and clicks one of the
links, say MyLinkToOtherPage. This is hardcoded like
<a href="/cgi-
bin/WebObjects/wa/lookFor?page=MyLinkToOtherPage>MyLinkToOtherPage<a>.
But this has no session ID so, when the request arrives to the
dispatchRequest method, it is managed like a NEW request (new in the
sense that it is in another session, of course). I have no context data
nor in the URL nor in the link, so how could I access to the context()?
(Chuck, using cookies will be a solution, but as far as I know still
exist people who disable the cookies stuff)
mmm, I'm going to try another way I just have thought on (still too
fuzzy to explain). By the way, I was aware of the WODev wiki site but
the link to the tarball didn't work. Luckily, Pierre have said that he's
going to fix it. Thanks a lot Pierre.
And thanks to you all for the help
Santi.
_______________________________________________
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.
--
Chuck Hill email@hidden
Global Village Consulting Inc. http://www.global-village.net
Progress is the mother of all problems.
- G. K. Chesterton
_______________________________________________
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.