• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using AJAX with Swing applet

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67748
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic