org.eclipse.rap.rwt.widgets

## Class WidgetUtil

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

    public final class WidgetUtil
    extends java.lang.Object

Helper class to access RWT specific properties of widgets.

Since:
  2.3

### Method Summary

Methods
`static java.lang.String` `getId(Widget widget)` Returns the protocol ID of the given widget.
`static void` `registerDataKeys(java.lang.String... keys)` Adds keys to the list of widget data keys to be synchronized with the client.

### Methods inherited from class java.lang.Object

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

### Method Detail

#### getId

    public static java.lang.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(java.lang.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)`

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