dojox/data/CssClassStore (version 1.10)

dojox/data/CssRuleStore

Summary

Basic store to display CSS information.

The CssClassStore allows users to get information about active Css classes in the page running the CssClassStore. It can also filter out classes from specific stylesheets. The attributes it exposes on classes are as follows:

Usage

var foo = new CssClassStore(keywordParameters);
dojox/data/CssRuleStore
Parameter Type Description
keywordParameters Object

See the dojox/data/CssClassStore reference documentation for more information.

Property Summary

Method Summary

  • _assertIsAttribute(attribute) This function tests whether the item passed in is indeed a valid 'attribute' like type for the store.
  • _assertIsItem(item) This function tests whether the item passed in is indeed an item in the store.
  • _containsValue(item,attribute,value,regexp) Internal function for looking at the values contained by the item.
  • _fetch(request) Populates the _allItems object with unique class names
  • _handleFetchByIdentityReturn(request) Handles a fetchByIdentity request by finding the correct item.
  • _handleFetchReturn(request) Handles a fetchByIdentity request by finding the correct items.
  • _handleReturn() Handles the return from a fetching action.
  • _handleRule(rule,styleSheet,href) Handles the creation of an item based on the passed rule.
  • close() See dojo/data/api/Read.close().
  • containsValue(item,attribute,value) See dojo/data/api/Read.containsValue()
  • fetch(request) See dojo/data/api/Read.fetch()
  • fetchItemByIdentity(request) See dojo/data/api/Identity.fetchItemByIdentity()
  • getAttributes(item) See dojo/data/api/Read.getAttributes()
  • getFeatures() See dojo/data/api/Read.getFeatures()
  • getIdentity(item) See dojo/data/api/Identity.getIdentity()
  • getIdentityAttributes(item) See dojo/data/api/Identity.getIdentityAttributes()
  • getLabel(item) See dojo/data/api/Read.getLabel()
  • getLabelAttributes(item) See dojo/data/api/Read.getLabelAttributes()
  • getValue(item,attribute,defaultValue) See dojo/data/api/Read.getValue()
  • getValues(item,attribute) See dojo/data/api/Read.getValues()
  • hasAttribute(item,attribute) See dojo/data/api/Read.hasAttribute()
  • isItem(item) See dojo/data/api/Read.isItem()
  • isItemLoaded(something) See dojo/data/api/Read.isItemLoaded()
  • loadItem(keywordArgs) See dojo/data/api/Read.loadItem()
  • setContext(context)

Properties

_browserMap
_cache
_cName
_idAttribute
_labelAttribute

text representation of the Item [label and identifier may need to stay due to method names]

_storeRef

Methods

_assertIsAttribute(attribute)

This function tests whether the item passed in is indeed a valid 'attribute' like type for the store.

Parameter Type Description
attribute attribute-name-string

The attribute to test for being contained by the store.

_assertIsItem(item)

This function tests whether the item passed in is indeed an item in the store.

Parameter Type Description
item item

The item to test for being contained by the store.

_containsValue(item,attribute,value,regexp)

Internal function for looking at the values contained by the item.

Internal function for looking at the values contained by the item. This function allows for denoting if the comparison should be case sensitive for strings or not (for handling filtering cases where string case should not matter)

Parameter Type Description
item item

The data item to examine for attribute values.

attribute attribute-name-string

The attribute to inspect.

value anything

The value to match.

regexp RegExp
Optional

Optional regular expression generated off value if value was of string type to handle wildcarding. If present and attribute values are string, then it can be used for comparison instead of 'value'

Returns:undefined
_fetch(request)

Populates the _allItems object with unique class names

Parameter Type Description
request undefined
_handleFetchByIdentityReturn(request)

Handles a fetchByIdentity request by finding the correct item.

Parameter Type Description
request undefined
_handleFetchReturn(request)

Handles a fetchByIdentity request by finding the correct items.

Parameter Type Description
request Request
Returns:Request
_handleReturn()

Handles the return from a fetching action. Delegates requests to act on the resulting item set to eitehr the _handleFetchReturn or _handleFetchByIdentityReturn depending on where the request originated.

_handleRule(rule,styleSheet,href)

Handles the creation of an item based on the passed rule. In this store, this implies parsing out all available class names.

Parameter Type Description
rule undefined
styleSheet undefined
href undefined
close()

See dojo/data/api/Read.close(). Clears out the cache and allItems objects, meaning all future fetches will requery the stylesheets.

containsValue(item,attribute,value)

See dojo/data/api/Read.containsValue()

Parameter Type Description
item item
attribute attribute-name-string
value anything
Returns:undefined
fetch(request)

See dojo/data/api/Read.fetch()

Parameter Type Description
request undefined
Returns:string
fetchItemByIdentity(request)

See dojo/data/api/Identity.fetchItemByIdentity()

Parameter Type Description
request request
Returns:string
getAttributes(item)

See dojo/data/api/Read.getAttributes()

Parameter Type Description
item undefined
Returns:Array
getFeatures()

See dojo/data/api/Read.getFeatures()

Returns:object
getIdentity(item)

See dojo/data/api/Identity.getIdentity()

Parameter Type Description
item item
Returns:undefined
getIdentityAttributes(item)

See dojo/data/api/Identity.getIdentityAttributes()

Parameter Type Description
item item
Returns:Array
getLabel(item)

See dojo/data/api/Read.getLabel()

Parameter Type Description
item undefined
Returns:undefined
getLabelAttributes(item)

See dojo/data/api/Read.getLabelAttributes()

Parameter Type Description
item undefined
Returns:Array
getValue(item,attribute,defaultValue)

See dojo/data/api/Read.getValue()

Parameter Type Description
item undefined
attribute undefined
defaultValue undefined
Returns:undefined
getValues(item,attribute)

See dojo/data/api/Read.getValues()

Parameter Type Description
item undefined
attribute undefined
Returns:Array
hasAttribute(item,attribute)

See dojo/data/api/Read.hasAttribute()

Parameter Type Description
item undefined
attribute undefined
Returns:boolean
isItem(item)

See dojo/data/api/Read.isItem()

Parameter Type Description
item undefined
Returns:boolean
isItemLoaded(something)

See dojo/data/api/Read.isItemLoaded()

Parameter Type Description
something anything
Returns:undefined
loadItem(keywordArgs)

See dojo/data/api/Read.loadItem()

Parameter Type Description
keywordArgs object
setContext(context)
Parameter Type Description
context Array
Error in the documentation? Can’t find what you are looking for? Let us know!