Eclipse Rich Ajax Platform Release 1.3

## org.eclipse.rwt.lifecycle
Interface IWidgetLifeCycleAdapter

All Superinterfaces:
  ILifeCycleAdapter

All Known Implementing Classes:
  AbstractWidgetLCA

public interface IWidgetLifeCycleAdapter
extends ILifeCycleAdapter

A stateless callback handler used by RWT to synchronize the client-side and server-side state of a widget. Each widget type should provide its own implementation of this interface.

Since:
  1.0
See Also:
  `AbstractWidgetLCA`, `WidgetLCAUtil`

Method Summary
`void` `preserveValues(Widget widget)` Preserves the current state of the widget in order to be able to keep track of changes.
`void` `readData(Widget widget)` Reads request parameters and applies the state changes that are indicated by the client to the widget.
`void` `render(Widget widget)` Writes JavaScript code to the response that renders the changes that has been made to the widget.

Method Detail

### preserveValues

    public void preserveValues(Widget widget)

  Preserves the current state of the widget in order to be able to keep track of changes. This method is called after the Read Data phase but before the Process Action phase of the request life cycle. Thus, the client and server state is in sync. By preserving the current state of the widget, it is later possible to identify the properties that have been modified during the processing of the request.

  Implementors can use the method `IWidgetAdapter.preserve(String, Object)`. As a rule of thumb, every property that is written in `render` must be preserved in this method.

  Parameters:
    `widget` - the widget, the properties of which are preserved

### readData

    public void readData(Widget widget)

  Reads request parameters and applies the state changes that are indicated by the client to the widget. This method is called during the Read Data phase of the request life cycle.

  Parameters:
    `widget` - the widget to be processed

### render

    public void render(Widget widget)
                throws IOException

  Writes JavaScript code to the response that renders the changes that has been made to the widget.

  Parameters:
    `widget` - the widget to render changes for
  Throws:
    `IOException`

Eclipse Rich Ajax Platform Release 1.3

Copyright (c) Innoopract Informationssysteme GmbH and others 2002, 2011. All rights reserved.