I think people might have misunderstood what I was trying to ask. Specifically, I thought that this line:

setDefaultRequestHandler (requestHandlerForKey( directActionRequestHandlerKey() ));

was supposed to set the default handler to "wa" so when I type into my browser http://127.0.0.1:55555/cgi-bin/WebObjects/Benko.woa the console should return a "false" based on the code below. Instead it returns true. It does return false when I go to http://127.0.0.1:55555/cgi-bin/WebObjects/Benko.woa/wa though. So it seems to me that the default handler is still "wo" and isn't getting set to "wa".

public class Application extends ERXApplication {
        public static void main(String[] argv) {
                ERXApplication.main(argv, Application.class);
        }

        public Application() {
                NSLog.out.appendln("Welcome to " + name() + " !");
                /* ** put your initialization code in here ** */
                setDefaultRequestHandler (requestHandlerForKey( "wa" ));
        }
}


public class DirectAction extends ERXDirectAction {
        public DirectAction(WORequest request) {
                super(request);
        }

        public WOActionResults defaultAction() {
                WOComponent page = pageWithName(Main.class.getName());
                return page;
        }
}


public class Session extends ERXSession {
        private static final long serialVersionUID = 1L;

        public Session() {
        }
}

public class Main extends WOComponent {
        private static final long serialVersionUID = 1L;

        public Main(WOContext context) {
                super(context);

                System.out.println(hasSession());
                }

}


my Main WO:

<html>
        <head>
                <title>Untitled</title>
        </head>
        <body>
Hello World
</body>
</html>

no bindings!

On Feb 13, 2008, at 9:56 PM, Guido Neitzer wrote:

On 13.02.2008, at 19:39, Lachlan Deck wrote:

WOSubmitButton is fine -- just bind it's directActionName rather than action to whatever's appropriate.

Right - it's just so easy to get a session with these ... Something to be careful about, lots of the dynamic input elements create sessions.

cug

--
Real-World WebObjects class at the Big Nerd Ranch
March 2008, Frankfurt, Germany
http://www.bignerdranch.com/classes/webobjects.shtml



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/daniel%40brajkovic.com

This email sent to [EMAIL PROTECTED]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to