Eclipse Remote Application Platform

## org.eclipse.rap.rwt.lifecycle
Interface WidgetAdapter

All Superinterfaces:
  IWidgetAdapter

    public interface WidgetAdapter

extends IWidgetAdapter

Instances of this interface provide RWT specific operations on widgets. They are used to preserve the state of a widget.

Since:
  2.0

Method Summary
`java.lang.String` `getId()` Returns the id that identifies the widget on the client.
`Widget` `getParent()` Returns the parent given to the widget constructor.
`java.lang.Object` `getPreserved(java.lang.String propertyName)` Returns the preserved value for a specified key.
`boolean` `isInitialized()` Indicates whether this widget has been initialized already.
`void` `markDisposed(Widget widget)` Notifies the receiver that the given `widget` has been disposed of.
`void` `preserve(java.lang.String propertyName, java.lang.Object value)` Preserves a specified value for a specified key.

Method Detail

### getId

    java.lang.String getId()

  Returns the id that identifies the widget on the client.

  Specified by:
    `getId` in interface `IWidgetAdapter`
  Returns:
    the widget id

### getParent

    Widget getParent()

  Returns the parent given to the widget constructor.

  Specified by:
    `getParent` in interface `IWidgetAdapter`
  Returns:
    the parent widget

### isInitialized

    boolean isInitialized()

  Indicates whether this widget has been initialized already. A widget is considered initialized when the response that creates and initializes the widget has been rendered.

  Specified by:
    `isInitialized` in interface `IWidgetAdapter`
  Returns:
    `true` if this widget has already been initialized, `false` otherwise

### preserve

    void preserve(java.lang.String propertyName,
                  java.lang.Object value)

  Preserves a specified value for a specified key. Used to preserve values in the LCA method `preserveValues`.

  Specified by:
    `preserve` in interface `IWidgetAdapter`
  Parameters:
    `propertyName` - the key to map the preserved value to
    `value` - the value to preserve

### getPreserved

    java.lang.Object getPreserved(java.lang.String propertyName)

  Returns the preserved value for a specified key.

  Specified by:
    `getPreserved` in interface `IWidgetAdapter`
  Parameters:
    `propertyName` - the key for the preserved value
  Returns:
    the preserved value or `null` if there is no value preserved for this key

### markDisposed

    void markDisposed(Widget widget)

  Notifies the receiver that the given `widget` has been disposed of.

  Specified by:
    `markDisposed` in interface `IWidgetAdapter`
  Parameters:
    `widget` - the widget that has been disposed of

Eclipse Remote Application Platform

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