Hello all,

   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 = "$addComment" value = "Add as a 
Remote User" onClickServer = "\$('newComment').value = ''"/>
        </wo:form>

This is the generated HTML for the form:
<form action="/cgi-bin/WebObjects/netBrackets.woa/-8888/wo/5.0.21.27" 
method="post" name="f_0_21_27">
<textarea id="newComment" name="0.21.27.1" cols="30" rows="5"></textarea>
<br>
<input type="button" onclick="ASB.request(this.form,null,{_asbn:'0.21.27.3'})" 
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

 _______________________________________________
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