Contains the Dojo Tree Control for specs and the CreationModalDialog Module.
Extends
- dijit/_WidgetBase
- dijit/_TemplatedMixin
- dijit/_WidgetsInTemplateMixin
- dojo/Evented
Requires
Methods
-
addSpec(title, specId)
-
Adds a new spec to the Tree Control. If a user-created spec doesn't exist yet, a folder called "My Specs" is also added.
Parameters:
Name Type Description title
String Title of the spec to be added. specId
String Id of the spec to be added. - Source:
-
getDefaultId() → {String}
-
Gets the ID of the default spec in the specTree (The spec that is initally displayed).
- Source:
Returns:
The default spec's ID.- Type
- String
-
getDefaultName() → {String}
-
Gets the name of the default spec in the specTree (The spec that is initally displayed).
- Source:
Returns:
The default spec's name.- Type
- String
-
getGadgetSpecService() → {gadgetSpecService}
-
Getter method for the GadgetSpecService module for testing purposes.
- Source:
Returns:
The gadgetSpecService object.- Type
- gadgetSpecService
-
getPath(path, startId) → {String}
-
Gets the ID path of the spec in the tree control. Used to set the specTree focus to the particular spec.
Parameters:
Name Type Description path
String Accumulator parameter, starts as an empty array and is built up and eventually returned. startId
String Id of the current object in the path. - Source:
Returns:
The path of the spec.- Type
- String
-
setNewId(The)
-
Sets the ID of the focused spec in the specTree to the ID provided by the xhr POST. When a spec is added or rerendered, the servlet assigns a new ID to the updated spec. We use this method so that the spec's ID in the Dojo Tree is representative of its updated counterpart server-side.
Parameters:
Name Type Description The
String default spec's ID. - Source:
-
startup()
-
Called right after widget is added to the dom. See link for more information.
- Source:
- See:
-
toggleModal()
-
Opens the CreationModalDialog modal for adding a new spec.
- Source: