开发者

struts 1 + AJAX using jquery

I'm a rails developer and I took advantage by the easily of jquery to make asynchronus request to the server. Now I'm deve开发者_JAVA技巧loping an application with struts version1, and I don't know any idea there to start to make an asynchronus request, I want to insert an autosuggestion feature on a textfield querying the database as the user start to type. Do you have something to suggest (or at least some tutorial to redirect me? )

Thanks


Where I work, our main application is built using Struts 1, and for all our asynchronous stuff we use DWR.

We've found ourselves using jQuery more and more on the client side, so there is a desire to use jQuery to make the AJAX calls rather than our DWR javascript classes, which is a bit tricky. One option we've been considering is using Struts to return our JSON (though, that means we would lose DWR's magic when it comes to converting Java objects into JSON for us). We are toying with an approach similar to the one found in the accepted answer to the following SO question: Jquery Modal Forms with Struts 1.3

Hope this helps. Best of luck to you!

EDIT: Just realized this question was posted last year... Well, I hope you HAD good luck, at least ;-)


take a look at this plugin

jQuery make asynchronous request by default so I'm assuming this plugin sticks to that default.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜