Add dynamic targets to the static targets Array


I want to dynamicly add Targets to the static Array, I tested this one but no success, is that possible and how to do that.

Thank you in Advance.

Do you want to tell us a bit the broader pattern?

Targets create collections of elements each serving a similar purpose, and that you’d want the controller to do stuff to or to read from.

Their name (e.g. checkbox creating checkboxTargets dynamically) goes beyond the creation of these helper collections and getters, they’re internally known to the controller’s methods. There’s some coupling: inside the controller definition, we know what these things are named, and we call them by that name.


Thanks for the Reply, I have solved the Problem in this Way: