Take a
look at WOSession.setStoresIDsInCookies() and
setStoresIDsInURLs().
For
us, we do setStoresIDsInCookies(true) and
setStoresIDsInURLs(false).
^James
Actually what I would consider
an even better style would be:
public
String downloadPath() {
return
"/Somepath/test.pdf";
}
Hyperlink7:
WOHyperlink {
directActionName = "download_video";
?filePath =
downloadPath;
?wosid=false;
}
Make WebObjects work for you!! :)
Pierre
On Dec 18, 2007, at 16:04, Mr. Pierre Frisch wrote:
As
far as I can see this is a correct behavior even if it is not what you
expected.
when you execute directActionURLForActionNamed on the context you
create a fragment URL that includes a query string. If you pass this to
WOHyperlink it will take the string as a URL fragment check if there is a
session and if there is one will try to append the session id to the URL.
This is the correct behavior. If you want to suppress this you need to add a
binding "?wosid=false;" or pass a query dictionary
to WOHyperlink with that information.
You can simplify your life by using WOHyperlink:
public
NSDictionary<String, Object> downloadQueryDictionary() {
return
new NSDictionary<String,
Object>(new Object[] { "/Somepath/test.pdf", }, new String[] { "filePath" });
}
Hyperlink6:
WOHyperlink {
directActionName = "download_video";
queryDictionary =
downloadQueryDictionary;
?wosid=false;
}
Pierre
On Dec 18, 2007, at 15:42, Mr. Pierre Frisch wrote:
I am looking as to the why. On the short term just add this to your
bindings
Pierre
--
Pierre Frisch
On Dec 18, 2007, at 10:59, Edgar Klein wrote:
Hi, On 16-Dec-07, at 10:47 PM, Ian Joyner wrote:
I have this little bit of code to invoke a
direct action to download a file:
public String download_link ()
{
return context
().directActionURLForActionNamed ("download_video",
new NSDictionary <String,
Object> (
new Object []
{((Video_file)folder_list.objectAtIndex (row_index)).getAbsolutePath
(), Boolean.FALSE},
new String [] {"filePath",
"wosid"}));
}
The dictionary is setting the wosid key to
false. This is working fine on Tiger with WO 5.3, but on 5.4 I
get:
Error downloading file:
java.io.FileNotFoundException:
/Library/Stream/Movies/StreamatWRU.pdf?wosid=r1G8zBVYXWcrnoGP6CdDu0
(No such file or directory)
with the wosid stuff on the end of the URL,
which does not appear on 5.3.
Is this an introduced bug in 5.4? Do I need to
add something else?
You are probably returning the
String to a WOHyperlink. If so, I reckon, it's rather a WOHyperlink
problem b/c I generate a static link like public String link() { return " http://www.apple.com"; } and the link
in the browser window is http://www.apple.com/?wosid=5VEhVaWrkpGyX8JxaLrLugIs
there a solution on it? Since I'm using WOnder, I also commented out the
proper line in ERXPatcher just to make sure that it isn't a WOnder
problem. Cheers, Edgar _______________________________________________ Do
not post admin requests to the list. They will be
ignored. Webobjects-dev mailing list
( email@hidden) Help/Unsubscribe/Update
your Subscription: email@hidden _______________________________________________ Do
not post admin requests to the list. They will be
ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update
your Subscription: email@hidden _______________________________________________ Do
not post admin requests to the list. They will be ignored. Webobjects-dev
mailing list (email@hidden) Help/Unsubscribe/Update
your Subscription:
|