WebWidgetLocate this document in the navigation structure

The WebWidget UI element is used to embed a piece of custom HTML or JavaScript code into a Web Dynpro view where it can be used as a root element.

Note
Note Note that the correctness of HTML and JavaScript syntax is not checked by the Web Dynpro Framework.
Note
Note It is possible to skip WebWidget content rendering by starting the Web Dynpro application with request parametersap-wd-ignoreWebWidgets=true.
Properties
  • html

    Describes the HTML content, which is embedded in the WebWidget UI element. This content is always rendered when the client side is completely rendered, or when only the WebWidget control is rendered in a delta request.

  • scriptOnLoad

    The JavaScript handler is executed after the WebWidget control is rendered which is possible either in an initial request, or in a delta request. In this part you can access the Web Widget parameters, and you can trigger roundtrips. Public References are:

    • oWebWidget: public instance
    • Public JavaScript methods on the oWebWidget:
    • oDomRef: DOM element of the widget
    • Set parameter: oWebWidget.set("name", "value")
    • Get parameter: oWebWidget.get("name")
    • Get an array of all property names: oWebWidget.getPropertyNames()
    • Triggers a roundtrip and transfers all values to the server oWebWidget.save()
    • Values are transferred to context bindings, and the onAction method is called
  • scriptOnUnload

    The Javascript handler, which is executed, after the WebWidget control is destroyed.This happens when

    • The page is destroyed by the browser (e.g. after navigation to a different side)
    • In a delta request, when the WebWidget control is removed or replaced.
  • style

    The style attribute of the root container of widget. Example:For the HTML coding

    ... style='background-color: red'...you have to specify 'background-color: red' in the style property.

Parameters

A Web Widget parameter can be used in the scriptOnLoadattribute.

Overview

Name

Interface

Type

Initial Value

Bindable

fireExitEvent

IWDViewElement

boolean

false

not bindable

name

IWDWebWidgetParameter

String

empty

not bindable

readOnly

IWDWebWidgetParameter

boolean

false

bindable

value

IWDWebWidgetParameter

String

empty

bindable

Properties
Name Interface Type Initial Value Bindable

contextMenuBehaviour

IWDContextMenuProvider

WDContextMenuBehaviour

inherit

not bindable

contextMenuId

IWDContextMenuProvider

String

empty

not bindable

enabled

IWDUIElement

boolean

true

bindable

html

IWDWebWidget

String

empty

bindable

scriptOnLoad

IWDWebWidget

String

empty

bindable

scriptOnUnload

IWDWebWidget

String

empty

bindable

style

IWDWebWidget

String

empty

bindable

tooltip

IWDUIElement

String

empty

bindable

visible

IWDUIElement

WDVisibility

visible

bindable

More information: Common UI Element Properties