public FormElementController addElement ( FormElementController element , int position ) { if ( element instanceof FormSectionController ) { throw new IllegalArgumentException ( "Sub-sections are not supported" ) ; } if ( elements . containsKey ( element . getName ( ) ) ) { throw new IllegalArgumentException ( "Element with that name already exists" ) ; } else { elements . put ( element . getName ( ) , element ) ; orderedElements . add ( position , element ) ; return element ; } }
Adds a form element to this section . Note that sub - sections are not supported .