# Class WidgetUtil

java.lang.Object
org.eclipse.rap.rwt.widgets.WidgetUtil

public final class WidgetUtil extends Object
Helper class to access RWT specific properties of widgets.

Since:
  2.3

## Method Summary

Modifier and Type
Method
Description
`static String`
`getId(Widget widget)`
Returns the protocol ID of the given widget.
`static void`
`registerDataKeys(String... keys)`
Adds keys to the list of widget data keys to be synchronized with the client.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### getId

public static String getId(Widget widget)
Returns the protocol ID of the given widget.

Parameters:
  `widget` - the widget to obtain the id for, must not be `null`
Returns:
  the id for the given `widget`

### registerDataKeys

public static void registerDataKeys(String... keys)
Adds keys to the list of widget data keys to be synchronized with the client. It is save to add the same key twice, there are no side-effects. The method has to be called from the UI thread and affects the entire UI-session. The data is only transferred from server to client, not back.

Parameters:
  `keys` - The keys to add to the list.
See Also:
  - `Widget.setData(String, Object)`