Documentation for a historical release of Infusion: 1.4
Please view the Infusion Documentation site for the latest documentation, or the Infusion 1.3. Documentation for the previous release.
If you're looking for Fluid Project coordination, design, communication, etc, try the Fluid Project Wiki.

DOM Binder API

Creation

*

var domBinder = fluid.createDomBinder (container, selectors);

*

Parameters

Parameter

Description

container

the root element in which to locate named elements

selectors

a collection of named jQuery selectors

On This Page
See Also
Still need help?

Join the infusion-users mailing list and ask your questions there.


Functions

*

locate(name, localContainer);

*
Finds the named element within the specified container.

Return: a jQuery object.

Parameter

Description

name

The selector name, as declared in the component's defaults

localContainer

Optional. The container element used to constrain the search for the element. Defaults to the component container.


*

fastLocate(name, localContainer);

*
Finds the named element within the specified container, using the value in the DOM Binder's cache if present (i.e. the DOM itself will not be searched again). The DOM binder's cache is populated for a query, whenever a query is submitted via locate().

Return: a jQuery object.

Parameter

Description

name

The selector name, as declared in the component's defaults

localContainer

Optional. The container element used to constrain the search for the element. Defaults to the component container.


*

clear()

*

The clear() method completely clears the cache for the DOM binder for all queries. It should be used whenever, for example, the container's markup is replaced completely, or otherwise is known to change in a wholesale way.


*

refresh(names, localContainer);

*

The refresh() method refreshes the cache for one or more selector names, ready for subsequent calls to fastLocate(). It functions exactly as for a call to locate() except that

  • The queried results are not returned to the user, but simply populated into the cache, and
  • More than one selector name (as an array) may be sent to refresh rather than just a single one.