I have a simple text input based on a service variable and a button to set it. This used to work fine in UI4 but does not work in UI5.
in deviceButtonClicked, when looking for the input matching the ID defined for the action of the button, it finds the correct input html control but does not return it in getDeviceCOMControlsByIndexFromCPanel (called from ControlAction)
$$(controls[i]).data(“service”) (devices.js line 834) does not fined this data associated with the input control (however that gets created).
To duplicate, create a device using the attached plugin files. Go to the control tab and try to set the “Devices” text box. The variable will be set as “undefined” rather than the value entered by the user.
This appears to be because devices.js line 303 does not set the .data for (“service”) and (“variable”)
case "input":
//echo(clone_input);
_this.append(clone_input.clone()
.data("index",i)
.addClass(no_control_class)
.find("input")
.attr("name",controls[i].ID)
.css({
position:"absolute",
top:controls[i].Display.Top,
left:controls[i].Display.Left,
height:controls[i].Display.Height,
width:controls[i].Display.Width
}).parent());
break;