Download Now
ExploraSaurus DocumentationExploraSaurus.SuperThe super is meant to make the initial request to receive the document tree, as well as handle some of the default options for launching a new exploraSaurus object into your document. The Super is your Composition gateway to customizing your implementation of ExploraSaurus, it receives many possible options listed here
subClass : ExploraSaurus.Sub.Base,
subOptions : null,
buildDirFunc : this.buildDirectory.bind(this),
composite : false
The subClass OptionThe idea behind this is to mix a little bit of composition with a little bit of inheritance in an effort to have a more flexible design. The super is like a factory that uses a subclass to handle the XML payload received by the request for a directory. By using this option we can send in custom classes to the subClass property and it will handle that pay load in its own unique way. subOptionssubOptions is intended to be a complex object that is passed to the constructor of the subclass, this is useful for customizing which panels the class will use. buildDirFunc optionThis property is intended to be a function reference that will be called when the super receives the xml payload, this function is passed the xml payload from the ajax request and a reference of the super as a second parameter. The Composite optionOne of my favorite features of the ExploraSaurus library, the composite feature allows you to build the entire directory one level at a time. The idea is that in big systems a request to parse all sub directories would be far too intensive as the amount of recursion would overwhelm the system. So the request only retrieves the face of the specified directory, only the immediate sub directories and files. When the user clicks on a directory that has contents on the server but not on the client it will retrieve that information and load it into the directory tree in the client. ExploraSaurus.Sub.BaseDue to the complexities involved in the ExploraSaurus.Sub library there is a base class that you should extend all ExploraSaurus.Sub classes from. ExploraSaurus.Sub.Base is a comprehensive class that allows all basic file browser capabilities. Allowing the user to open and close directories, click files and retrieve contents. ExploraSaurus.Sub.DirectorySearchThe basic functionality is great for sitemaps or some limited access but when you want to enrich that experience and make that information even more accessible to the user start checking out the pre-written extensions. Typically all that is necessary in creating a custom ExploraSaurus application is to override the event handlers. The ExploraSaurus.Sub.DirectorySearch is a class that overrides the handleDirectoryClick function and utilize a Panel class to allow directory searches. |
||