org.wings.resource
Class UpdateResource

java.lang.Object
  extended by org.wings.Resource
      extended by org.wings.resource.DynamicResource
          extended by org.wings.resource.UpdateResource
All Implemented Interfaces:
Serializable, Renderable, URLResource

public class UpdateResource
extends DynamicResource

This resource is responsible for incremental page updates using AJAX. While requests sent to the ReloadResource always entail a full rewrite of the frame's complete component hierarchy, requests received by the UpdateResource will result in preferably small data chunks being sent back to the client. These so called "incremental updates" encapsulate all informations the client needs in order to synchronize its page with the server's state. Because this resource is typically requested from an XMLHttpRequest object, it returns a well-formed XML document with MIME type "text/xml". The updates in this document will be processed by according JavaScript functions. The XML structure looks as follows:

 
 
   
   
   
   ...
 
 

Author:
Stephan Schuster
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.wings.Resource
Resource.HeaderEntry
 
Field Summary
 
Fields inherited from class org.wings.Resource
extension, headers, id, mimeType
 
Constructor Summary
UpdateResource(SFrame f)
           
 
Method Summary
 void write(Device out)
          Write this Renderable component to some output device.
static void writeFooter(Device out)
           
static void writeHeader(Device out)
           
static void writeUpdate(Device out, String update)
           
static void writeUpdate(Device out, Update update)
           
 
Methods inherited from class org.wings.resource.DynamicResource
getFrame, getHeaders, getId, getURL, toString
 
Methods inherited from class org.wings.Resource
getExtension, getLength, getMimeType, getSession, setHeaders
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UpdateResource

public UpdateResource(SFrame f)
Method Detail

write

public void write(Device out)
           throws IOException
Description copied from interface: Renderable
Write this Renderable component to some output device.

Throws:
IOException

writeHeader

public static void writeHeader(Device out)
                        throws IOException
Throws:
IOException

writeFooter

public static void writeFooter(Device out)
                        throws IOException
Throws:
IOException

writeUpdate

public static void writeUpdate(Device out,
                               Update update)
                        throws IOException
Throws:
IOException

writeUpdate

public static void writeUpdate(Device out,
                               String update)
                        throws IOException
Throws:
IOException


wingS Swings ;-)