I'm trying to use an AjaxSubmitButton, and for some reason the URL generated by clicking it is being treated as a DirectAction URL.
Here's the details:
It does this both when using DirectConnect and when using Apache.
The Wonder Ajax framework and ERExtensions framework are both being imported, and are the latest Wonder source.
This is the form and submit button code I'm using (this is lifted directly from the Expensive Updates Wonder Ajax Examples):
<wo:form multipleSubmit = "$true">
<wo:WOText id = "newComment" rows = "5" cols = "30" value = "$newComment"/>
<br/>
<wo:AjaxSubmitButton action = "" value = "Add as a Remote User" />
</wo:form>
This is the generated HTML for the form:
<form action="" method="post" name="f_0_21_27">
<textarea id="newComment" name="0.21.27.1" cols="30" rows="5"></textarea>
<br>
<input type="button" value="Add as a Remote User" name="0.21.27.3">
</form>
The Exception I'm seeing:
java.lang.reflect.InvocationTargetException
at com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:269)
at com.webobjects.appserver._private.WOActionRequestHandler.handleRequest(WOActionRequestHandler.java:158)
at er.extensions.appserver.ERXDirectActionRequestHandler.handleRequest(ERXDirectActionRequestHandler.java:126)
at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687) //WHY IS THIS INVOKING ERXDirectAction?
at er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:2021)
at er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:1986)
at com.netbrackets.app.Application.dispatchRequest(Application.java:106)
at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.NoSuchMethodException: com.netbrackets.app.DirectAction.5.0.21.27Action()
at com.webobjects.appserver.WODirectAction.performActionNamed(WODirectAction.java:141)
at er.extensions.appserver.ERXDirectAction.performActionNamed(ERXDirectAction.java:401)
at com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:259)
This is the log for the submitted URL. Note at this point it seems to know its an ajax action request, WOApplication is shunting the request off to ERXDirectActionRequestHander. :
Oct 08 10:58:21 netBrackets[8888] (Application.java:103) INFO er.extensions.appserver.ERXApplication - Received ajax action request /cgi-bin/WebObjects/netBrackets.woa/-8888/ajax/35.0.21.27?1318089501545
Oct 08 10:58:21 netBrackets[8888] (ERXNSLogLog4jBridge.java:40) INFO NSLog - form values {WOIsmapCoords = ("1318089501545"); 0.21.27.1 = ("test"); 0.21.27.3 = ("Add as a Remote User"); AJAX_SUBMIT_BUTTON_NAME = ("0.21.27.3"); _ = (""); }
Thanks!
Jeff