Re: DirectAction Creation On The Fly
Re: DirectAction Creation On The Fly
- Subject: Re: DirectAction Creation On The Fly
- From: Dirk Bajohr <email@hidden>
- Date: Thu, 21 Oct 2004 14:26:39 +0200
You can override WODirectAction.performActionNamed(...).
Why don't you create a custom DirectAction class and use the whole
actionName as template/page name?
e.g.
public class CustomAction extends WODirectAction {
...
public WOActionResults performActionNamed(String actionName) {
// actionName could be the name of the page/template
...
}
}
Your URL will look like this:
.../WebObjects/App.woa/wa/CustomAction/actionName
HTH,
Dirk
...
What I have managed so far, is to create one directAction called
navPage_ and I was hoping I could then do a database find to get the
name of the page it should pull out and show, only I'm stuck on
finding a way to get that name in to or out of the request - any
ideas.
Here's what I am trying to do so far:
In the direct action I have a programmatic find and what I have been
trying to do is send in a url similar to this:
http://silver-back/wo-scripts/WebObjects.exe/UKCHP.woa/-9797/wa/
navPage_###courseYear1Certificate
of which I was hoping to extract "courseYear1Certificate" from the
url, this would be the page name. I use the 3 ### signs because I can
get the direct action to work as navPage_ without it reading beyond
the ### signs. I was therefore hoping that using a subString method
would allow me to get anything after the 3 hash signs which could
include a proper anchor name link.
Only I can not seem to get the full url into the request so I can read
the full url.
The code in the directAction below works on a
StringIndexOutOfBoundsException because It has a name to get from the
database, if I can get this from the url all would be well.
...
--
Dirk Bajohr
iSOLUTION - Individuelle Software fuer moderne Kommunikation
Hauptstr. 50
53757 Sankt Augustin
T +49 2241 921567-0
F +49 2241 921567-89
http://www.isolution.de
_______________________________________________
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