• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using AJAX with Swing applet

 
Praful Gupta
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Guys ... i am new to AJAX and am still learning it. I have a swing GUI applet that basically pulls data from an XML string generated by another webapp. The applet refreshes the data every once in a while. Could i use AJAX here to refresh the data from that string?
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems that you are already doing AJAX, only that in your case the "J" is for Java, not JavaScript.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64618
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it sounds like you could replace the heavy-weight applet with light-weight Ajax.

If the webapp you will be contacting is on a separate server, you'll need to employ the use of a server-side proxy to get around the Ajax security sandbox. Chapter 12 of the book covers this in detail when learing how to use Ajax with remote web service APIs like Yahoo! Maps, Google and Flickr.
 
Ted Goddard
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Praful Gupta:
Could i use AJAX here to refresh the data from that string?


You may also want to consider server-initiated rendering approaches, such as Ajax Push (with ICEfaces) or Reverse Ajax (with DWR). This allows an event on the server to trigger an update of the browser page without polling.
 
Malli Raman
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How the server push or comet is working. Since my customer is not interested in going for opensources(icefaces), is there any way can we implement the comet / server push functionality.

Thanks in advance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic