View Full Version : Spring and Ajax
azevedo
Aug 9th, 2007, 06:22 AM
Hi,
I would like to use Ajax in my projects. I found that there are a lot projects I could use. I don't want to skip to an ajax project and at the end find out that it is not the best one to use with Spring. I had a look at DWR, IceFaces and Ajax4JSF. :confused:
I am looking to find a way to implement ajax functonality in my projects, without having to rewrite my project from the begining. Are there any suggestions, hints, tips you could give me. Does anyone know if Spring will or is implementing ajax functonalities or tends to support a project?
Thanks,
J
Colin Yates
Aug 9th, 2007, 06:25 AM
DWR integrates very nicely with Spring.
Think of it as a way of accessing your Spring beans from JavaScript. You indicate in your Spring app context which beans should be exposed for DWR and you can then access those beans from JavaScript.
azevedo
Aug 9th, 2007, 08:36 AM
Hi,
Thanks for that quick answer. I will have alook at it.
dr_pompeii
Aug 9th, 2007, 09:43 AM
DWR integrates very nicely with Spring.
i am agree in this 100%
but i must advice you that exists a bug related with popups and firefox , of course this no happens with Opera
best wishes
jglynn
Aug 9th, 2007, 10:19 AM
but i must advice you that exists a bug related with popups and firefox
Please elaborate.
dr_pompeii
Aug 9th, 2007, 11:55 AM
Please elaborate.
ok
http://www.nabble.com/problems-with-popup-windows-and-drw-cant-call-the-server-anymore-tf3285936.html#a9290914
http://www.nabble.com/Still-problem-of-popups-DWR-with-FF-tf3391505.html#a9441058
i am not the unique
http://www.nabble.com/Uncaught-exception-in-Firefox-2.0-tf3237482.html#a8998193
but my good luck, my porject works for an intranet in Opera, if some friendly firend
can avoid this doom problem, pls help
thanks for advanced
jglynn
Aug 9th, 2007, 12:18 PM
Interesting, thanks for the heads up.
It's a good thing I avoid pop-ups at all costs.
dr_pompeii
Aug 9th, 2007, 12:46 PM
Interesting, thanks for the heads up.
no problem, if i can avoid a doom party to other members, it must be done
It's a good thing I avoid pop-ups at all costs.
mmm, my project need to all cost the popups :)
regards
sbtourist
Aug 10th, 2007, 04:00 AM
I am looking to find a way to implement ajax functonality in my projects, without having to rewrite my project from the begining. Are there any suggestions, hints, tips you could give me. Does anyone know if Spring will or is implementing ajax functonalities or tends to support a project?
DWR is a (good) choice, as others suggested you.
However, if you want something more integrated with Spring MVC (or just want to have another option) you can give a look at the Spring Modules XT Ajax Framework: https://springmodules.dev.java.net/docs/reference/0.8/html/xt.html#ajax
Cheers,
Sergio B.
azevedo
Aug 10th, 2007, 05:52 AM
:confused:
I don't get it with Spring and DWR. I found that there is no more need to have a dwr.xml. But I don't get spring to work with dwr. I ahve been looking in the Docs but I have not yet found how to do it. Can anyone post some examples, it would be nice :)
dr_pompeii
Aug 10th, 2007, 10:00 AM
hello
Can anyone post some examples, it would be nice
i learnt from the scratch DWR and Spring (Integration ) with this book
Pro Ajax and Java Frameworks by apress
of course you cna download the free code samples
THT
azevedo
Aug 10th, 2007, 10:24 AM
:)
Thanks I will look first at the sample codes and I might buy it.
(It is always good to support the devellopers and writers of such books ;) )
Cheers,
J
pcorless
Aug 10th, 2007, 01:34 PM
I have taken part in a few projects where we have migrated Spring MVC applications to Spring/JSF/ICEfaces applications. The main advantage of JSF/ICEfaces are:
- Spring Beans can be used as is in JSF/ICEfaces jsp pages via the org.springframework.web.jsf.DelegatingVariableReso lver.
- Porting Spring Controllers to JSF is relatively simple and straight forward.
- ICEfaces provides seamless AJAX; hides the developer from the JavaScript.
- ICEfaces can provide server initiated push if desired.
azevedo
Aug 12th, 2007, 05:52 AM
Where can I find some documentation about Icefaces and Spring or some examples. I would like to choose the right Ajax/JSF project from the begining.
;)
J
snej
Aug 12th, 2007, 08:29 AM
Hello,
as i am not at my dev-machine at the moment i can't post an example, but i will do this the next few days... probably tonight... i have some maven-managed projects using jsf/icefaces/spring/hibernate and i will extract a short example... if you like with the complete stack (jsf ri/icefaces/facelets/spring/hibernate)
The pro's for icefaces are the rich components and the fact that javascript is really totally invisible for the developer while they support IE, Firefox, Opera and Safari... but they have some issuces too, especially in combination with spring, the server initiated rendering didn't work (at least for me, see http://forum.springframework.org/showthread.php?t=42542)
i am sure you know this already
http://component-showcase.icefaces.org/component-showcase/
greetings
Jens
dr_pompeii
Aug 12th, 2007, 10:27 PM
should spring make its own project ajax support?
a lot of options can be cumbersome
regards
azevedo
Aug 13th, 2007, 02:19 AM
should spring make its own project ajax support?
a lot of options can be cumbersome
regards
What do you mean?:confused:
dr_pompeii
Aug 13th, 2007, 09:25 AM
What do you mean? :confused:
i saw many threads with the classic question or doubts,
with which ajax tool should i integrate with spring?
so would spring try create its own ajax tool?only like a simple idea i said
of course it is not critical but .... , same case,
what happens if hibernate project is suddenly close?
i know that spring let integration for most important frameworks and it is good, but ....
regards
yuanji
Aug 18th, 2007, 04:54 PM
Look at this blog http://bram.jteam.nl/index.php/2007/01/31/spring-dwr-ajax-made-easy/
I tried it and it works.
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.