AW: Direct action question
"Frank Caputo" <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Randy,
just prepend a question-mark to the desired query-params (WO will do all
neccessary escaping):
Hyperlink1: WOHyperlink {
...
?pool = curAll.pool;
?when = curAll.dATime;
}
Ciao Frank
________________________________
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Randy
Wigginton
Gesendet: Freitag, 17. November 2006 16:28
An: David LeBer
Cc: [email protected]
Betreff: Re: Direct action question
Great! Except... it doesn't work :-(
Here's my .wod:
Hyperlink1: WOHyperlink {
disabled = isAllPoolLine;
directActionName = "hourPoolDetail";
actionClass = "DirectAction";
pool = curAll.pool;
when = curAll.dATime;
}
So, I would expect it to create something like
/cgi-bin/WebObjects/myApp.woa/wa/hourPoolDetail?pool=foo&when=bar
Unfortunately, the parameters are not appended to the url. Is
there anything else I need to do? Will direct connect make any
difference (as I'm debugging)?
On 11/17/06, David LeBer <[email protected]> wrote:
On 17-Nov-06, at 9:35 AM, Randy Wigginton wrote:
> Using WOBuilder, is there a "nice" way to pass
parameters to a
> direct action? I want my app to have bookmarkable
URLs in certain
> areas.
Any of the WODynamicElements (WOHyperlink, etc) allow
for the easy
creation of DA Urls.
For instance, a WOHyperlink .wod snippet might look like
this:
Hyperlink1: WOHyperlink {
name = "david";
actionClass = "DirectAction";
directActionName = "hyper";
}
The resulting URL would look something like this:
/cgi-bin/WebObjects/theapp.woa/wa/hyper?name=david
So it would call the hyperAction in your DirectAction
class and pass
it the key value pair of name = david.
--
;david
--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site: http://www.codeferous.com
blog: http://david.codeferous.com
--
Toronto Area Cocoa / WebObjects developers group:
http://www.tacow.org
_______________________________________________
WebObjects-dev mailing list
[email protected]
http://www.omnigroup.com/mailman/listinfo/webobjects-dev