Skip to content

События для виждетов #6

Description

@ildar-ceo

Кто должен получать событие от RefreshButton? Поидее, должно быть событие WidgetEvent, которое приходит в TableWidget от всех дочерних виджетов. Событие может приходить в модель и компонент.

Код:

/**
 * Таблица
 */
async void actionIndex()
{
	TableWidget table = this.page_model.addWidget( new TableWidget({ "widget_name": "table" }) );
	table.addField({
		"name": "row_number",
	});
	table.addField({
		"name": "service_name",
	});
	table.addField({
		"name": "status",
	});
	table.addField({
		"name": "replicas",
	});
	table.addField({
		"name": "row_buttons",
	});
	table.setApiName("app.application");
	table.addTopButton( new RefreshButton() );
	
	table.setPage(route.query.get("page"));
	
	/* Загрузка данных */
	async table.loadData();
	
	this.page.setTitle("Список элементов");
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions