Forum

Moritz Strauss
      Has successfully completed the online course Introduction
      Has successfully completed the online course Intermediate (200)
      Has successfully completed the online course Advanced (300)
      Has successfully completed the online course Basics (100)
      Has successfully completed the Intermediate Certification
    1 year ago #39424
    Up
    0
    Down
    ::

    Hello Leonid,

    with sap.ui.getCore().byId(“Screenname–WidgetID”).mProperties you can see all available properties of the widget.
    With sap.ui.getCore().byId(“Screenname–WidgetID”).getProperty(propertyName) you can get the value of a specific property.
    This is the generic way, but each property has a specific getter and setter.

    For your example of a CheckBox you could do this:
    sap.ui.getCore().byId(“Screenname–WidgetID”).getProperty(“selected”) which will return either true or false depending on whether or not the CheckBox is currently selected.
    We recommend using the selected-specific getter .getSelected()

    Please follow the official OpenUI5 documentation for more information on the available properties and methods: https://openui5.hana.ondemand.com/api/sap.m.CheckBox