Hello,
Lately a patch has been merged that introduces a widget for
adding/removing entries (e.g. network interfaces when creating/editing a
VM):
http://gerrit.ovirt.org/#/c/19530/
This kind of widgets is becoming common in oVirt, so the idea is to make
adding one easy rather than copying & pasting code. AddRemoveRowWidget
takes care of the plus/minus button logic, disabling an entry that
hasn't been edited, and the arranging in rows.
In order to use it, one is required to override a couple of abstract
methods that are dependent upon the specific entry implementation. An
example may be found in ProfilesInstanceTypeEditor, which handles
adding/removing network interfaces in the new/edit VM dialog.
Yours, Lior.