@Deprecated
public final class WidgetUtil
extends java.lang.Object
WidgetUtil
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CUSTOM_VARIANT
Deprecated.
Use
RWT.CUSTOM_VARIANT instead |
static java.lang.String |
CUSTOM_WIDGET_ID
Deprecated.
For UI tests, use the web client JavaScript API to set HTML attributes that can
be used to identify widgets. Details can be found in the Developers Guide Chapter "Scripting",
section "Widget HTML".
|
static java.lang.String |
ENABLE_UI_TESTS
Deprecated.
The system property has been moved to the internal class
RWTProperties . Please look up the name in the
documentation of CUSTOM_WIDGET_ID . |
Modifier and Type | Method and Description |
---|---|
static Widget |
find(Composite root,
java.lang.String id)
Deprecated.
Custom widgets that use RemoteObject should not require this method.
|
static WidgetAdapter |
getAdapter(Widget widget)
Deprecated.
The WidgetAdapter interface was provided to facilitate the implementation of LCAs.
New custom widgets should use the RemoteObject API instead of LCAs.
|
static java.lang.String |
getId(Widget widget)
Deprecated.
Use org.eclipse.rap.rwt.widgets.WidgetUtil#getId(Widget) instead.
|
static AbstractWidgetLCA |
getLCA(Widget widget)
Deprecated.
New custom widgets should use the RemoteObject API instead of LCAs.
|
static java.lang.String |
getVariant(Widget widget)
Deprecated.
Application code should obtain the variant using
Widget.getData(RWT.CUSTOM_VARIANT) . |
static void |
registerDataKeys(java.lang.String... keys)
Deprecated.
Use org.eclipse.rap.rwt.widgets.WidgetUtil#registerDataKeys(String...) instead.
|
@Deprecated public static final java.lang.String CUSTOM_VARIANT
RWT.CUSTOM_VARIANT
instead@Deprecated public static final java.lang.String CUSTOM_WIDGET_ID
Note: This constant is provisional and subject to change without further notice.
This constant can be used to apply a custom widget id to a widget. By default, the framework applies a unique widget id to every widget. This id is used to identify the widget in the client/server protocol. For UI tests, it can be helpful to replace these generated ids with custom ids in order to make the ids more human-readable and more stable against changes in the UI. The following snippet applies a custom widget id to a widget:
widget.setData( WidgetUtil.CUSTOM_WIDGET_ID, "myCustomId" )
The support for custom widget ids must be explicitly enabled by setting the
system property org.eclipse.rap.rwt.enableUITests
to
true
. If activated, the default web client will also set the
HTML id attribute for every widget that are rendered to the client to the
widget id.
A custom widget id must be unique within the user session. It is the clients' responsibility to choose a unique id. Assigning an id that is used by another widget will lead to indeterministic behavior.
A custom widget id must only contain characters that are valid according to the W3C recommendation for id and name attributes.
Widget.setData(String,Object)
,
getId(Widget)
@Deprecated public static final java.lang.String ENABLE_UI_TESTS
RWTProperties
. Please look up the name in the
documentation of CUSTOM_WIDGET_ID
.CUSTOM_WIDGET_ID
@Deprecated public static WidgetAdapter getAdapter(Widget widget)
WidgetAdapter
for a specified widget.widget
- the widgetWidgetAdapter
instanceRemoteObject
@Deprecated public static java.lang.String getId(Widget widget)
widget
that is used to identify the widget on the
client.widget
- the widget to obtain the id for, must not be null
widget
@Deprecated public static java.lang.String getVariant(Widget widget)
Widget.getData(RWT.CUSTOM_VARIANT)
.Widget.setData()
.widget
- the widget whose variant is requestednull
if no variant has been specified for the given widget@Deprecated public static AbstractWidgetLCA getLCA(Widget widget)
AbstractWidgetLCA
instance for this widget.widget
- the widget to obtain the life cycle adapter from@Deprecated public static Widget find(Composite root, java.lang.String id)
id
within the widget hierarchy
starting at root
.root
- the root widget where to start the searchid
- the id of the widget to search fornull
if there was no widget found with the given
id
within the widget hierarchy@Deprecated public static void registerDataKeys(java.lang.String... keys)
Note: This method is considered provisional and may change again until the final release.
keys
- The keys to add to the list.Widget.setData(String, Object)
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