This method initializes the array editor and triggers either the creation or the editing of the first item. In the latter case the list of items is also implicitly loaded after first generating the item titles for the list view. This method is invoked for you by
afterShow and should not be invoked again.
This method is now a bc placeholder
This method, called for you when the modal is about to display, binds the various click handlers.
This method removes the "save" click handler after the modal is hidden, necessary to ensure it does not fire again when a parent array is saved.
This method installs the
saveHandler method as the click handler for the outer modal's "save" button. It is invoked for you during
This method removes the save button handler. It is invoked for you during
This method saves the item state for the current item, then saves the array as a whole and dismisses the modal via
hide. It is invoked for you when save is clicked.
This method invokes the
load method to populate the array and prepare for editing. It is invoked for you as the modal becomes visible.
This method adds a new item to the array. It is invoked by
createItem, which should be called instead if your intention is to immediately display the new item in the item editor.
this method is now a bc placeholder, except that it is still responsible for setting
_ordinal to a unique counting number for each item that does not yet have one
bc wrapper. This method was redundant. See
Adds a new item to the array, populating the form with its initial default values from the schema. The list view is refreshed.
createItem, this method asks the server for a empty form; however, it then populates it with the currently active item's content. The list view is refreshed.
This method populates the editing form with the content of the currently active item as determined by the array index
self.active. The list view is also refreshed.
This method saves the content of the currently active item back to
self.arrayItems[self.active] by invoking
convert for the schema fields, and also updates the
_title property for the list view.
This method invokes
options.save and passes
self.arrayItems to it, then dismisses the modal via
This method binds click handlers for all elements inside
self.$el, the modal itself. The save handler is bound elsewhere because it may reside in a parent modal.
This method removes the item with the specified
id property from the array.
Refresh (re-render) the list of items, then invoke the
onChange method if they differ from the previous set. This method is debounced. If calls to this method are nested only two refreshes will take place: the initial one and also the last one, to ensure the impact of any changes made in nested function calls is seen. As a further optimization, only the last one actually updates the markup in the browser.
If a callback is passed, it is always invoked, even if this refresh is being skipped as an optimization due to nesting.
Invoked when the contents of the array have changed, after a refresh of the display. Invokes the limit mechanism.
limit option by showing and hiding the limit message and the add button, respectively.
required option by showing and hiding save button.
refresh to decrement the count of nested
refresh calls. Nested
refresh calls are automatically debounced for performance, however the first and last both result in actual renders by the server to ensure all changes made in between are reflected.