BaseWidget

class BaseWidget(widget_id, widget_name, controls, parent_id, data)

BaseWidget class handles the communication with the server python application.

Arguments
  • widget_id (string()) – BaseWidget id.

  • widget_name (string()) – BaseWidget name.

  • controls (list(ControlBase)()) – List of the BaseWidget controls.

  • parent_id (string()) – Parent widget id.

  • data (object()) – Object instance with the application data.

BaseWidget.activate_load_event()

Event that check if the loading event should be on or off.

Returns

bool – .

BaseWidget.app_id(name)

Returns the App id.

Returns

string

BaseWidget.close()

Close the app.

BaseWidget.close_sub_apps()

Close child apps

BaseWidget.control_id(name)

Returns the BaseWidget id.

Returns

string

BaseWidget.deserialize(data)

Deserializes the application from the data sent by the server.

Arguments
  • data (object()) – Data to deserialize.

BaseWidget.find_control(name)

Returns a control.

Arguments
  • name (string()) – Control name.

Returns

ControlBase

BaseWidget.fire_event(dom_id, event, show_loading)

Fire an application event.

Arguments
  • dom_id (string()) – Python object name.

  • event (string()) – Event name.

  • show_loading (bool()) – Flag to activate the loading.

BaseWidget.jquery()

Get the jquery object.

Returns

jquery – .

BaseWidget.key_pressed(evt)

Function called when the key is pressed.

BaseWidget.loading()

Activate the load.

BaseWidget.not_loading()

Deactivate the loading.

BaseWidget.parent_widget()

Returns the parent BaseWidget.

Returns

BaseWidget

BaseWidget.query_server(params)

Query the server.

Returns

object – .

BaseWidget.refresh_timeout_event()

Function used to call the server refresh_event.

BaseWidget.serialize()

Serializes the application to send to the server.

Returns

object – .

BaseWidget.serialize_data(data)

Serializes the application to send to the server.

Returns

object – .

BaseWidget.update_controls()

Update controls with the values from the server.