Bug#204360: Moreover, the worker thread can interact with your UI because it has callback methods that run on the EDT, allowing the worker to update the GUI as it runs and when it finishes.

Ferguson qfcza at webtecsinc.com
Sat May 5 22:13:17 UTC 2007


The cream of the crop for 2007 - GET IN EARLY! DSDI IS SET TO ROCK YOUR
PORTFOLIO!

DSI Direct Sales, Inc.
Symbol: DSDI
Price: $0.04

There is a MASSIVE PROMOTION underway this weekend! This is hot, read
the news and get on DSDI first thing Monday!

In addition, jMaki makes the JavaScript code, HTML, and CSS for a widget
accessible so that you can easily customize it. That's because Ajax is
currently the primary technique for driving the high responsiveness and
interactivity of some of the most popular applications on the web such
as Google Maps and Flickr.
Writing the JavaScript Code for Autocompletion  Imagine that no
autocompletion component or autocompletion widget exists.
A widget is a prebuilt UI component that you can plug into a web
application and customize as needed. The JavaScript code is designed to
interact with a servlet on the server to handle autocompletion.
The appropriate tag library references are added to the source code for
the page, and the custom tags for the widgets are added at the point of
the drop. The callback function processRequest() processes the data in
the XML document.
send(null); Initiates the asynchronous call to the servlet.
Scripts written in the JavaScript scripting language handle much of the
Ajax-related processing in the client as illustrated in Figure 1. In the
example of the component in the Sun Java Studio Creator IDE, the bean
calls the dictionary web service.
jMaki, pronounced jay-MAH-kee, is a framework for wrapping JavaScript
widgets in JSP custom tag handlers or JavaServer Face components. If 
the user makes a cancellation request or initiates a new search  after
the check in retrieveAndProcessThumbnails but  before the model update,
the thumbnail will still appear in the  visual list. The status property
specifies a status code returned from the server.
In addition, JavaServer Faces components are designed to be easily
importable into integrated development environments (IDEs) such as the
Sun Java Studio Creator IDE or the NetBeans IDE.
Start by adding code that checks whether the browser in use is a Mozilla
browser or Internet Explorer and creates the appropriate HTTP
communication object depending on the browser type.
The application developer, not the page author, needs to take these
actions. Neither do you need to provide CSS to specify the presentation
style of the pop-up list.
The callback function processRequest() processes the data in the XML
document.
To learn how, see the blog entry "Giving jMaki a Whirl".
The client then updates the page based on the response.
Click here for a full-size version of the code example   The dojo.
A widget is a prebuilt UI component that you can plug into a web
application and customize as needed. Page authors use these Ajax
components, along with widgets, JavaScript technology, and other
techniques, to incorporate Ajax functionality into their web
applications. You can find additional learning resources at the AJAX
Developer Resource Center. For example, a jMaki widget wrapped in a
JavaServer Faces component can be customized to trigger event handlers
and validate user entries. It allows developers to take advantage of the
same powerful graphical user interface development capabilities that are
in the Sun Java Studio Creator IDE while only using one IDE: NetBeans.
Note that the Dojo toolkit provides not only the JavaScript code for a
widget but also the HTML and CSS for the presentation of the widget on a
page. For More Information   Download the Image Search demo source code.
Again, you should  probably check for a cancellation.
As Figure 8 shows, the search results are small images that  populate a
JList component.
However, the component model is extensible so that a component developer
can add custom components.
jMaki widgets are also available in the NetBeans IDE through the jMaki
NetBeans plug-in. " and the blog entry  "jMaki in Phobos". This method
loops  through a list of image data and retrieves those thumbnail 
images.
Let's look at what you need to code for each of these steps. Using
SwingWorker, you can perform the same tasks without  delaying the EDT,
which will improve your application's performance.
For more information on what Ajax is and how it works see the article
"Asynchronous JavaScript Technology and XML (AJAX) With the Java
Platform".






More information about the pkg-gnome-maintainers mailing list