ERROR: dynamic list! Cannot read property 'setState' of undefined!

オフライン

Hello all,

I'm very new to ARAS, so please help)

The goal is to create a dynamic list, which will be filled by the onLoad form event with articles.

The code is from the Programmers Guide 12.0 "7.32 How to Create a Dynamic List" (after small modifications):

######################################################################

var inn = aras.IomInnovator;
var dropdown = inn.getItemById("LIST", "29D876DB477243D6AB00C96466CE240C");
var list = inn.newItem("List", "get");
list.setAttribute("select", "id, keyed_name");
list = list.apply();

listOfTeams = [{
  label: '',
  value: ''
}];

listOfTeams.push({
    label: "testtt",
    value: "esttt"
});

dropdown.component.setState({list: listOfTeams});

return null;

######################################################################

Error:

Technical MessageEvent handler failed with message: TypeError: Cannot read property 'setState' of undefined [function onload$user$handler(e) { try { if (onload1(e) === false) return false; } catch (exp) { aras.AlertError(aras.getResource('', 'ui_methods_ex.event_handler_failed'), aras.getResource('', 'ui_methods_ex.event_handler_failure_msg', exp.description ? exp.description : (exp + ' [' +arguments.callee.toString()+ ']')), aras.getResource('','common.client_side_err')); return false; } }]
Stack TraceClient Side Error
So please help!
Kind regards and thanks in advance,
Leonid