Hello All,
I'm not very familiar with Ajax and webobjects so I didn't understand what is wrong. I hope one can help me. I only found one comparing question in the internet but without an answer.
Here is my problem:
I have a webobjects application where in a modal window I like to search for something.
So there are some textfields and lists where the user can enter some search criteria. After that he should press a button to search. (This is the step before I will use live search).
When I use the normal Submitbutton it does a refresh of the whole page and the modal window disappears of course. So I like to use the AjaxSubmitButton in the hope that the values of the textfields are send to the server before the button action is run.
But when I use the AjaxSubmitButton I get an error that the class for example: Couldn't locate action class named 'jgtWMWA0AcZ4DtLCSIuQ20' is not found. On the other side the compiler found the
correct method.
I found out that this has something to do with using the directAction class.
So as described in the Wonder documentation I use this code in the Application constructor
String directActionRequestHandlerKey =
this.directActionRequestHandlerKey();
WORequestHandler directActionRequestHandler =
this.requestHandlerForKey(directActionRequestHandlerKey);
this.setDefaultRequestHandler(directActionRequestHandler);
When I don't use this, the AjaxSubmitButton is working properly but the rest of my application doesn't work anymore.
I tried to use the AjaxRequestHandler for ComponentRequests but than the other Ajax functions are not working anymore.
So the question is:
How do I have the Application constructor to change so that both are working, the directActions and the AjaxSubmitButton?
Thank you very much
Jens