Eclipse Remote Application Platform

org.eclipse.rap.rwt.lifecycle
Interface WidgetLifeCycleAdapter

All Known Implementing Classes:
AbstractWidgetLCA

public interface WidgetLifeCycleAdapter

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. Clients should not directly implement this interface, but extend AbstractWidgetLCA instead.

Since:
2.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 changes for this widget from the message that has been received from the client.
 void render(Widget widget)
          Renders the changes that have been made to this widget to the message that will be sent to the client.
 

Method Detail

readData

void readData(Widget widget)
Reads changes for this widget from the message that has been received from the client. This method is called during the Read Data phase of the request life cycle.

Parameters:
widget - the widget to be processed

preserveValues

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 WidgetAdapter.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 to be processed

render

void render(Widget widget)
            throws java.io.IOException
Renders the changes that have been made to this widget to the message that will be sent to the client. This method is called during the Render phase of the request life cycle.

Parameters:
widget - the widget to render changes for
Throws:
java.io.IOException

Eclipse Remote Application Platform

Copyright (c) EclipseSource and others 2002, 2013. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0