Re: getting a list of directAction Names
Re: getting a list of directAction Names
- Subject: Re: getting a list of directAction Names
- From: "Jonathan Fleming" <email@hidden>
- Date: Tue, 12 Oct 2004 11:29:02 +0100
Hi Jake,
Just checked this code out and it works fine, it will need some tweaking to
strip out what is not needed but that won't be a problem.
Below is what it gives me for example:
public com.webobjects.appserver.WOActionResults
DirectAction.performActionNamed(java.lang.String),
public com.webobjects.appserver.WOActionResults
DirectAction.defaultAction(),
public com.webobjects.appserver.WOActionResults
DirectAction.mainIndexAction(),
public com.webobjects.appserver.WOActionResults
DirectAction.ReferencesAction(),
public com.webobjects.appserver.WOActionResults
DirectAction.ContactsAction(),
public com.webobjects.appserver.WOActionResults DirectAction.TermsAction(),
public com.webobjects.appserver.WOActionResults
DirectAction.JobAdvertAction(), etc, etc.
Thanks again
Jonathan :^)
From: Jake MacMullin <email@hidden>
To: Jonathan Fleming
<email@hidden>,<email@hidden>
Subject: Re: getting a list of directAction Names
Date: Tue, 12 Oct 2004 18:20:14 +1000
Try using Java's Reflection API.
Something like this might work:
import java.lang.reflect.*;
public NSArray directActions() {
NSMutableArray actions = new NSMutableArray();
try {
Class c = Class.forName("DirectAction");
actions.addObjects(c.getDeclaredMethods());
} catch (Throwable e) {
System.err.println(e);
}
return(actions);
}
HTH,
Jake
On 12/10/04 5:14 PM, "Jonathan Fleming" <email@hidden>
wrote:
> Is there an easy way to get a list of all my directAction Names from my
> DirectAction class and CustomDirectAction classes which extends
> WODirectAction.
>
> I want to do this so that I can put the names into a popup menu for
> myContentEditor so that when the user is adding a link they simply
choose
> the appropriate directAction name (instead of trying to put in an <a
> href="absolute_link_name">link name<a/>) and the app does the rest of
> course.
>
> TIA
> Jonathan :^)
>
> _________________________________________________________________
> Express yourself with cool new emoticons
http://www.msn.co.uk/specials/myemo
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
u
>
> This email sent to email@hidden
_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today!
http://www.msn.co.uk/messenger
_______________________________________________
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