Successfully!

Error!

You are viewing 10.0 help doc. More details are displayed in the latest help doc

Get Component Interface

getAllWidgets

MethodgetAllWidgets()Get all the component information in the report object
  Parameter--
Return value{ [key: string,value:object] }The key is the component name, and the value is the component object
   Example

View all component information in the report object in the dashboard:

_g().getAllWidgets();

Application

example

Browser F12 developer tools to view all component information in the dashboard:

1.png

MobileSupport mobile terminal

getWidgetByName

MethodgetWidgetByName(name)Get a component in the report object, you can get the components in the body and the widgets in the parameter pane
  Parametername: stringcomponent name/widget name,string
Return valueobject component/widget object,need to be used in conjunction with attributes/methods of components/widgets
   Example

Note: When the code is added in the "after initialization" event, it is recommended to add a delay function, otherwise an error may occur because the report object is not fully created. An example is as follows:

setTimeout(function(){
     _g().getWidgetByName("comboBox0");
}, 500);

Example 1: In the dashboard, get the drop-down box widget comboBox0 on the parameter pane

_g().getWidgetByName("comboBox0");

Example 2: In the dashboard, get the drop-down box widget comboBox0 in the body

_g().getWidgetByName("comboBox0");

Example 3: In the dashboard, get the report block report0 in the body

_g().getWidgetByName("report0");

Example 4: In a dashboard, get the tab block tabpane0 in the body

_g().getWidgetByName("tabpane0");

Application

example

Customize a button, get the report block when the button is clicked, and set the report block to be invisible to hide it:

Click to download the template:

Hide and Show Component.frm

2.gif

MobileSuuport mobile terminal


Attachment List


Theme: 11.0 New Features
Already the First
Already the Last
  • Helpful
  • Not helpful
  • Only read

Doc Feedback