This documentation is quite incomplete. At the moment, it is simply a holding place for various bits of documentation that don't have a proper home yet. |
|
fluid.accumulate(list, fn, arg)Scan through a list of objects, "accumulating" a value over them (may be a straightforward "sum" or some other chained computation). The results will be added to the initial value passed in by "arg" and returned.
Return: arg fluid.allocateSimpleId(element)Allocate an id to the supplied element if it has none already, by a simple scheme resulting in ids "fluid-id-nnnn" where nnnn is an increasing integer.
Return: String (representing the id) fluid.byId(id, dokkument)Returns a DOM element quickly, given an id.
Return: Element or null if none exists See also: fluid.jById fluid.clear(target)Clears an object or array of its contents. For objects, each property is deleted.
fluid.COMPONENT_OPTIONSA special "marker object" which is recognized as one of the arguments to fluid.initSubComponents. This object is recognized by reference equality - where it is found, it is replaced in the actual argument position supplied to the specific subcomponent instance, with the particular options block for that instance attached to the overall "that" object. Constant: {} See also: fluid.initSubComponents fluid.container(containerSpec)Fetches a single container element and returns it as a jQuery.
Return: jQuery (a single-element jQuery of container) fluid.copy(tocopy)Performs a deep copy (clone) of its argument
Return: Object (the copy) fluid.createDomBinder(container, selectors)Creates a new DOM Binder instance, used to locate elements in the DOM by name.
Return: Object fluid.defaults()Retrieves and stores a component's default settings centrally. See: DOM Binder Guide and API, Fluid Component API fluid.dumpElfluid.emptySubcomponentfluid.event.getEventFirer()
returns:
fluid.expectFilledSelectorfluid.failfluid.findfluid.findAncestorfindKeyInObjectfluid.formatMessagefluid.getIdfluid.initDomBinderfluid.initSubcomponentThis function provides a generic way of instantiating and configuring any "sub-components" that may be a part of, or used by, a parent component. For example, this function is used by the Inline Edit component to instantiate the Undo decorator, a sub-component that provides Undo functionality to components that support it. Parameters
fluid.initSubcomponentsSee also: fluid.COMPONENT_OPTIONS fluid.initView(componentName, container, userOptions)fluid.instantiateFirersfluid.invokeGlobalFunctionfluid.isPrimitivefluid.jByIdSee also: fluid.byId fluid.keyForValuefluid.logfluid.mergeComponentOptionsfluid.mergefluid.mergeListenersfluid.messageLocatorfluid.model.composePathfluid.model.copyModelfluid.model.getBeanValuefluid.removefluid.stringTemplatefluid.transformfluid.unwrapSee also: fluid.wrap fluid.VALUEfluid.versionfluid.wrapSee also: fluid.unwrap fluid.initComponents(that, className, args) |
fluid.dom.cleanseScripts(element)Cleanse the children of a DOM node by removing all <script> tags. This is necessary to prevent the possibility that these blocks are reevaluated if the node were reattached to the document.
fluid.dom.cleanseScripts.MARKERUsed to indicate that the DOM node has been stripped of all <script> tags Constant: "fluid-scripts-cleansed" See also: fluid.dom.cleanseScripts fluid.dom.computeAbsolutePosition(element)Returns the absolute position of a supplied DOM node in pixels. Implementation taken from quirksmode http://www.quirksmode.org/js/findpos.html
fluid.dom.getElementText(element)Returns the element text from the supplied DOM node as a single String.
Return: String fluid.dom.insertAfter(newChild, refChild)Mockup of a missing DOM function Inserts newChild as the next sibling of refChild.
fluid.dom.isContainer(container, containee)Checks if the specified container is actually the parent of containee.
Return: Boolean fluid.dom.isIgnorableNode(node)Determine if a node should be ignored by the iterator functions.
Return: Boolean fluid.dom.isWhitespaceNode(node)Determine whether a node's text content is entirely whitespace
Return: Boolean fluid.dom.iterateDom(node, acceptor, allNodes)Walks the DOM, applying the specified acceptor function to each element. There is a special case for the acceptor, allowing for quick deletion of elements and their children.
fluid.dom.iterateDom.DOM_BAIL_DEPTHThis is provided as a work around for IE's circular DOM issue. This is the default max DOM depth in IE. Constant: 256 |
Each Fluid component includes a standard options structure at its top-level. Options allow implementors to configure and customize a component. User-supplied options are merged with relevant defaults for the given components. These defaults registered by each component with the Fluid defaults management system via a call to fluid.defaults()
:
fluid.default(componentName, defaultsObject); |
where
componentName
is a string name for the component, anddefaultsObject
is a Javascript object containing key/value pairs for the default configuration of the component.The options for each component (and their defaults) will vary, but all components share a subset of required defaults. These are:
The selectors
<something?> is a Javascript object that defines the necessary selector strings that will be used to access the various DOM elements that make up the component. Each component will have different selectors, but all components must have this selectors
. Implementors can override the default selectors, so long as the selectors they provide meet the following requirements: